From 9dd8000bf8bc5d795c2e4c5d526d3c10a3d8fd4e Mon Sep 17 00:00:00 2001 From: Awater Date: Wed, 13 Feb 2019 23:21:15 +0800 Subject: [PATCH 001/280] docs(zh): fix a typo (#1501) --- docs/zh/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/README.md b/docs/zh/README.md index bc0e73ba9..c0c093f34 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -50,7 +50,7 @@ new Vue({ 另外,通过定义和隔离状态管理中的各种概念并强制遵守一定的规则,我们的代码将会变得更结构化且易维护。 -这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/)、和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 +这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/)和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 ![vuex](/vuex.png) From a18fa314dd895bfeea6724653e2fe25557b257d1 Mon Sep 17 00:00:00 2001 From: Tao Date: Wed, 13 Feb 2019 23:23:17 +0800 Subject: [PATCH 002/280] chore: support jsdelivr npm cdn like vue package does (#1496) --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 6ed745e46..375ada242 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "dist/vuex.common.js", "module": "dist/vuex.esm.js", "unpkg": "dist/vuex.js", + "jsdelivr": "dist/vuex.js", "typings": "types/index.d.ts", "files": [ "dist", From 31e4fbc8ac0e0f3a39fc4350667c3821bfec6036 Mon Sep 17 00:00:00 2001 From: Sylvain Pace Date: Wed, 13 Feb 2019 16:27:31 +0100 Subject: [PATCH 003/280] docs: enabling DocSearch https://github.com/algolia/docsearch-configs/commit/0b171ddf626dac501b2d9bf4a80e79613c874918 (#1472) --- docs/.vuepress/config.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 98e4b79d5..c67d10273 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -39,6 +39,10 @@ module.exports = { serviceWorker: true, theme: 'vue', themeConfig: { + algolia: { + apiKey: '97f135e4b5f5487fb53f0f2dae8db59d', + indexName: 'vuex', + }, repo: 'vuejs/vuex', docsDir: 'docs', locales: { From 1fd2fc4d8790ac34e327579dcbd4065d79b87e71 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Tue, 19 Feb 2019 00:24:39 +0800 Subject: [PATCH 004/280] docs(zh): update --- docs/zh/README.md | 2 +- docs/zh/guide/modules.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/zh/README.md b/docs/zh/README.md index c0c093f34..a58deffeb 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -50,7 +50,7 @@ new Vue({ 另外,通过定义和隔离状态管理中的各种概念并强制遵守一定的规则,我们的代码将会变得更结构化且易维护。 -这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/)和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 +这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/) 和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 ![vuex](/vuex.png) diff --git a/docs/zh/guide/modules.md b/docs/zh/guide/modules.md index c210d3c66..c5a27fa4c 100644 --- a/docs/zh/guide/modules.md +++ b/docs/zh/guide/modules.md @@ -294,8 +294,12 @@ store.registerModule(['nested', 'myModule'], { 你也可以使用 `store.unregisterModule(moduleName)` 来动态卸载模块。注意,你不能使用此方法卸载静态模块(即创建 store 时声明的模块)。 +#### 保留 state + 在注册一个新 module 时,你很有可能想保留过去的 state,例如从一个服务端渲染的应用保留 state。你可以通过 `preserveState` 选项将其归档:`store.registerModule('a', module, { preserveState: true })`。 +当你设置 `preserveState: true` 时,该模块会被注册,action、mutation 和 getter 会被添加到 store 中,但是 state 不会。这里假设 store 的 state 已经包含了这个 module 的 state 并且你不希望将其覆写。 + ### 模块重用 有时我们可能需要创建一个模块的多个实例,例如: From 665455f8daf8512e7adbf63c2842bc0b1e39efdb Mon Sep 17 00:00:00 2001 From: Igor Randjelovic Date: Mon, 18 Feb 2019 22:15:41 +0100 Subject: [PATCH 005/280] feat(devtool): allow usage in non-browser environments (#1404) --- src/plugins/devtool.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/devtool.js b/src/plugins/devtool.js index a6df685f0..dc6b04f73 100644 --- a/src/plugins/devtool.js +++ b/src/plugins/devtool.js @@ -1,6 +1,9 @@ -const devtoolHook = - typeof window !== 'undefined' && - window.__VUE_DEVTOOLS_GLOBAL_HOOK__ +const target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {} +const devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__ export default function devtoolPlugin (store) { if (!devtoolHook) return From 041df8da91a6f47a4029cab2d999b76f12f47660 Mon Sep 17 00:00:00 2001 From: Per Harald Borgen Date: Thu, 21 Feb 2019 20:16:27 +0100 Subject: [PATCH 006/280] docs: added Scrimba lessons (#1512) --- docs/.vuepress/override.styl | 32 ++++++++++++++++++++++++++++++++ docs/README.md | 2 ++ docs/fr/README.md | 2 ++ docs/fr/guide/README.md | 2 ++ docs/fr/guide/actions.md | 2 ++ docs/fr/guide/forms.md | 2 ++ docs/fr/guide/getters.md | 2 ++ docs/fr/guide/modules.md | 2 ++ docs/fr/guide/mutations.md | 2 ++ docs/fr/guide/plugins.md | 2 ++ docs/fr/guide/state.md | 4 ++++ docs/fr/guide/testing.md | 2 ++ docs/guide/README.md | 2 ++ docs/guide/actions.md | 2 ++ docs/guide/forms.md | 2 ++ docs/guide/getters.md | 2 ++ docs/guide/modules.md | 2 ++ docs/guide/mutations.md | 2 ++ docs/guide/plugins.md | 2 ++ docs/guide/state.md | 4 ++++ docs/guide/testing.md | 2 ++ docs/ja/README.md | 2 ++ docs/ja/guide/README.md | 2 ++ docs/ja/guide/actions.md | 2 ++ docs/ja/guide/forms.md | 2 ++ docs/ja/guide/getters.md | 2 ++ docs/ja/guide/modules.md | 2 ++ docs/ja/guide/mutations.md | 2 ++ docs/ja/guide/plugins.md | 2 ++ docs/ja/guide/state.md | 4 ++++ docs/ja/guide/testing.md | 2 ++ docs/kr/README.md | 2 ++ docs/kr/guide/README.md | 2 ++ docs/kr/guide/actions.md | 2 ++ docs/kr/guide/forms.md | 2 ++ docs/kr/guide/getters.md | 2 ++ docs/kr/guide/modules.md | 2 ++ docs/kr/guide/mutations.md | 2 ++ docs/kr/guide/plugins.md | 2 ++ docs/kr/guide/state.md | 4 ++++ docs/kr/guide/testing.md | 2 ++ docs/ptbr/README.md | 2 ++ docs/ptbr/guide/README.md | 2 ++ docs/ptbr/guide/actions.md | 2 ++ docs/ptbr/guide/forms.md | 2 ++ docs/ptbr/guide/getters.md | 2 ++ docs/ptbr/guide/modules.md | 2 ++ docs/ptbr/guide/mutations.md | 2 ++ docs/ptbr/guide/plugins.md | 2 ++ docs/ptbr/guide/state.md | 4 ++++ docs/ptbr/guide/testing.md | 2 ++ docs/ru/README.md | 2 ++ docs/ru/guide/README.md | 2 ++ docs/ru/guide/actions.md | 2 ++ docs/ru/guide/forms.md | 2 ++ docs/ru/guide/getters.md | 2 ++ docs/ru/guide/modules.md | 2 ++ docs/ru/guide/mutations.md | 2 ++ docs/ru/guide/plugins.md | 2 ++ docs/ru/guide/state.md | 4 ++++ docs/ru/guide/testing.md | 2 ++ docs/zh/README.md | 2 ++ docs/zh/guide/README.md | 2 ++ docs/zh/guide/actions.md | 2 ++ docs/zh/guide/forms.md | 2 ++ docs/zh/guide/getters.md | 2 ++ docs/zh/guide/modules.md | 2 ++ docs/zh/guide/mutations.md | 2 ++ docs/zh/guide/plugins.md | 2 ++ docs/zh/guide/state.md | 4 ++++ docs/zh/guide/testing.md | 2 ++ 71 files changed, 186 insertions(+) create mode 100644 docs/.vuepress/override.styl diff --git a/docs/.vuepress/override.styl b/docs/.vuepress/override.styl new file mode 100644 index 000000000..7222c4be1 --- /dev/null +++ b/docs/.vuepress/override.styl @@ -0,0 +1,32 @@ +.scrimba + background-color #e7ecf3 + padding 1em 1.25em + border-radius 2px + color #486491 + position relative + margin-top: 16px + a + color #486491 !important + position relative + padding-left 36px + &:before + content '' + position absolute + display block + width 30px + height 30px + top -5px + left -4px + border-radius 50% + background-color #73abfe + &:after + content '' + position absolute + display block + width 0 + height 0 + top 5px + left 8px + border-top 5px solid transparent + border-bottom 5px solid transparent + border-left 8px solid #fff \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 3cddf78d3..67283092e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -54,6 +54,8 @@ In addition, by defining and separating the concepts involved in state managemen This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. +If you want to learn Vuex in an interactive way you can check out this [Vuex course on Scrimba](https://scrimba.com/g/gvuex), which gives you a mix of screencast and code playground that you can pause and play around with anytime. + ![vuex](/vuex.png) ### When Should I Use It? diff --git a/docs/fr/README.md b/docs/fr/README.md index 7ff74cb57..21aedb2bc 100644 --- a/docs/fr/README.md +++ b/docs/fr/README.md @@ -52,6 +52,8 @@ De plus, en définissant et en séparant les concepts impliqués dans la gestion Voilà l'idée de base derrière Vuex, inspiré par [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) et [l'architecture Elm](https://guide.elm-lang.org/architecture/). À l'inverse des autres modèles, Vuex est aussi une bibliothèque d'implémentation conçue spécialement pour Vue.js afin de bénéficier de son système de réactivité granulaire pour des modifications efficaces. +Si vous voulez apprendre Vuex de manière interactive, jetez un oeil à ce [cours sur Vuex sur Scrimba.](https://scrimba.com/g/gvuex) + ![vuex](/vuex.png) ### Quand l'utiliser ? diff --git a/docs/fr/guide/README.md b/docs/fr/guide/README.md index 05c32dc2f..ce251fd86 100644 --- a/docs/fr/guide/README.md +++ b/docs/fr/guide/README.md @@ -1,5 +1,7 @@ # Pour commencer + + Au cœur de chaque application Vuex, il y a la **zone de stockage (« store »)**. Un « store » est tout simplement un conteneur avec l'**état (« state »)** de votre application. Il y a deux choses qui différencient un store Vuex d'un simple objet global : 1. Les stores Vuex sont réactifs. Quand les composants Vue y récupèrent l'état, ils se mettront à jour de façon réactive et efficace si l'état du store a changé. diff --git a/docs/fr/guide/actions.md b/docs/fr/guide/actions.md index ebeacc803..2cc82bdd2 100644 --- a/docs/fr/guide/actions.md +++ b/docs/fr/guide/actions.md @@ -1,5 +1,7 @@ # Actions + + Les actions sont similaires aux mutations, à la différence que : - Au lieu de modifier l'état, les actions actent des mutations. diff --git a/docs/fr/guide/forms.md b/docs/fr/guide/forms.md index f304def1c..3d8dfef5e 100644 --- a/docs/fr/guide/forms.md +++ b/docs/fr/guide/forms.md @@ -1,5 +1,7 @@ # Gestion des formulaires + + Lorsque l'on utilise Vuex en mode strict, il peut être compliqué d'utiliser `v-model` sur une partie de l'état qui appartient à Vuex : ``` html diff --git a/docs/fr/guide/getters.md b/docs/fr/guide/getters.md index b6d6eed7c..1b70f8972 100644 --- a/docs/fr/guide/getters.md +++ b/docs/fr/guide/getters.md @@ -1,5 +1,7 @@ # Accesseurs + + Parfois nous avons besoin de calculer des valeurs basées sur l'état du store, par exemple pour filtrer une liste d'éléments et les compter : ``` js diff --git a/docs/fr/guide/modules.md b/docs/fr/guide/modules.md index 39eb9edc8..8c51472fa 100644 --- a/docs/fr/guide/modules.md +++ b/docs/fr/guide/modules.md @@ -1,5 +1,7 @@ # Modules + + Du fait de l'utilisation d'un arbre d'état unique, tout l'état de notre application est contenu dans un seul et même gros objet. Cependant, au fur et à mesure que notre application grandit, le store peut devenir très engorgé. Pour y remédier, Vuex nous permet de diviser notre store en **modules**. Chaque module peut contenir ses propres états, mutations, actions, accesseurs. Il peut même contenir ses propres modules internes. diff --git a/docs/fr/guide/mutations.md b/docs/fr/guide/mutations.md index 3b867d250..edc1f8261 100644 --- a/docs/fr/guide/mutations.md +++ b/docs/fr/guide/mutations.md @@ -1,5 +1,7 @@ # Mutations + + La seule façon de vraiment modifier l'état dans un store Vuex est d'acter une mutation. Les mutations Vuex sont très similaires aux évènements : chaque mutation a un **type** sous forme de chaine de caractères et un **gestionnaire**. La fonction de gestion est en charge de procéder aux véritables modifications de l'état, et elle reçoit l'état en premier argument : ``` js diff --git a/docs/fr/guide/plugins.md b/docs/fr/guide/plugins.md index 30aab77c0..56df03a3a 100644 --- a/docs/fr/guide/plugins.md +++ b/docs/fr/guide/plugins.md @@ -1,5 +1,7 @@ # Plugins + + Les stores Vuex prennent une option `plugins` qui expose des hooks pour chaque mutation. Un plugin Vuex est simplement une fonction qui reçoit un store comme unique argument : ``` js diff --git a/docs/fr/guide/state.md b/docs/fr/guide/state.md index 59ce19b02..63ea28263 100644 --- a/docs/fr/guide/state.md +++ b/docs/fr/guide/state.md @@ -2,6 +2,8 @@ ### Arbre d'état unique + + Vuex utilise un **arbre d'état unique**, c'est-à-dire que cet unique objet contient tout l'état au niveau applicatif et sert de « source de vérité unique ». Cela signifie également que vous n'aurez qu'un seul store pour chaque application. Un arbre d'état unique rend rapide la localisation d'une partie spécifique de l'état et permet de facilement prendre des instantanés de l'état actuel de l'application à des fins de débogage. L'arbre d'état unique n'entre pas en conflit avec la modularité. Dans les prochains chapitres, nous examinerons comment séparer votre état et vos mutations dans des sous-modules. @@ -58,6 +60,8 @@ const Counter = { ### La fonction utilitaire `mapState` + + Lorsqu'un composant a besoin d'utiliser plusieurs accesseurs ou propriétés de l'état du store, déclarer toutes ces propriétés calculées peut devenir répétitif et verbeux. Afin de pallier à ça, nous pouvons utiliser la fonction utilitaire `mapState` qui génère des fonctions d'accession pour nous et nous épargne quelques coups de clavier : ``` js diff --git a/docs/fr/guide/testing.md b/docs/fr/guide/testing.md index f0cae2b10..9682e8ba9 100644 --- a/docs/fr/guide/testing.md +++ b/docs/fr/guide/testing.md @@ -1,5 +1,7 @@ # Tests + + Les parties principales que l'on veut couvrir par des tests unitaires avec Vuex sont les mutations et les actions. ### Tester les mutations diff --git a/docs/guide/README.md b/docs/guide/README.md index 496c665f7..45882a5c3 100644 --- a/docs/guide/README.md +++ b/docs/guide/README.md @@ -1,5 +1,7 @@ # Getting Started + + At the center of every Vuex application is the **store**. A "store" is basically a container that holds your application **state**. There are two things that make a Vuex store different from a plain global object: 1. Vuex stores are reactive. When Vue components retrieve state from it, they will reactively and efficiently update if the store's state changes. diff --git a/docs/guide/actions.md b/docs/guide/actions.md index b022332e2..7bf4fc933 100644 --- a/docs/guide/actions.md +++ b/docs/guide/actions.md @@ -1,5 +1,7 @@ # Actions + + Actions are similar to mutations, the differences being that: - Instead of mutating the state, actions commit mutations. diff --git a/docs/guide/forms.md b/docs/guide/forms.md index 37fd58e56..d9d4d586f 100644 --- a/docs/guide/forms.md +++ b/docs/guide/forms.md @@ -1,5 +1,7 @@ # Form Handling + + When using Vuex in strict mode, it could be a bit tricky to use `v-model` on a piece of state that belongs to Vuex: ``` html diff --git a/docs/guide/getters.md b/docs/guide/getters.md index 124f38fac..981901efc 100644 --- a/docs/guide/getters.md +++ b/docs/guide/getters.md @@ -1,5 +1,7 @@ # Getters + + Sometimes we may need to compute derived state based on store state, for example filtering through a list of items and counting them: ``` js diff --git a/docs/guide/modules.md b/docs/guide/modules.md index 161591b02..8715ce748 100644 --- a/docs/guide/modules.md +++ b/docs/guide/modules.md @@ -1,5 +1,7 @@ # Modules + + Due to using a single state tree, all state of our application is contained inside one big object. However, as our application grows in scale, the store can get really bloated. To help with that, Vuex allows us to divide our store into **modules**. Each module can contain its own state, mutations, actions, getters, and even nested modules - it's fractal all the way down: diff --git a/docs/guide/mutations.md b/docs/guide/mutations.md index 965d0c62c..8c206529c 100644 --- a/docs/guide/mutations.md +++ b/docs/guide/mutations.md @@ -1,5 +1,7 @@ # Mutations + + The only way to actually change state in a Vuex store is by committing a mutation. Vuex mutations are very similar to events: each mutation has a string **type** and a **handler**. The handler function is where we perform actual state modifications, and it will receive the state as the first argument: ``` js diff --git a/docs/guide/plugins.md b/docs/guide/plugins.md index 22f937aa8..fe4939c0a 100644 --- a/docs/guide/plugins.md +++ b/docs/guide/plugins.md @@ -1,5 +1,7 @@ # Plugins + + Vuex stores accept the `plugins` option that exposes hooks for each mutation. A Vuex plugin is simply a function that receives the store as the only argument: ``` js diff --git a/docs/guide/state.md b/docs/guide/state.md index 40d477b08..b89c39bc9 100644 --- a/docs/guide/state.md +++ b/docs/guide/state.md @@ -2,6 +2,8 @@ ### Single State Tree + + Vuex uses a **single state tree** - that is, this single object contains all your application level state and serves as the "single source of truth". This also means usually you will have only one store for each application. A single state tree makes it straightforward to locate a specific piece of state, and allows us to easily take snapshots of the current app state for debugging purposes. The single state tree does not conflict with modularity - in later chapters we will discuss how to split your state and mutations into sub modules. @@ -58,6 +60,8 @@ const Counter = { ### The `mapState` Helper + + When a component needs to make use of multiple store state properties or getters, declaring all these computed properties can get repetitive and verbose. To deal with this we can make use of the `mapState` helper which generates computed getter functions for us, saving us some keystrokes: ``` js diff --git a/docs/guide/testing.md b/docs/guide/testing.md index 63b9d9120..3ca0bdf2d 100644 --- a/docs/guide/testing.md +++ b/docs/guide/testing.md @@ -1,5 +1,7 @@ # Testing + + The main parts we want to unit test in Vuex are mutations and actions. ### Testing Mutations diff --git a/docs/ja/README.md b/docs/ja/README.md index 88d3e3c5b..086217eb1 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -57,6 +57,8 @@ new Vue({ これが Vuex の背景にある基本的なアイディアであり、[Flux](https://facebook.github.io/flux/docs/overview.html)、 [Redux](http://redux.js.org/) そして [The Elm Architecture](https://guide.elm-lang.org/architecture/)から影響を受けています。 他のパターンと異なるのは、Vuex は効率的な更新のために、Vue.js の粒度の細かいリアクティビティシステムを利用するよう特別に調整して実装されたライブラリだということです。 +あなたがもし対話型の方法でVuexを学びたいのであれば、[Scrimba](https://scrimba.com/g/gvuex)のVuexコースをぜひ試してみてください。 + ![vuex](/vuex.png) ### いつ、Vuexを使うべきでしょうか? diff --git a/docs/ja/guide/README.md b/docs/ja/guide/README.md index 7b7373280..d237dcc58 100644 --- a/docs/ja/guide/README.md +++ b/docs/ja/guide/README.md @@ -1,5 +1,7 @@ # Vuex 入門 + + Vuex アプリケーションの中心にあるものは**ストア**です。"ストア" は、基本的にアプリケーションの **状態(state)** を保持するコンテナです。単純なグローバルオブジェクトとの違いが 2つあります。 1. Vuex ストアはリアクティブです。Vue コンポーネントがストアから状態を取り出すとき、もしストアの状態が変化したら、ストアはリアクティブかつ効率的に更新を行います。 diff --git a/docs/ja/guide/actions.md b/docs/ja/guide/actions.md index a37242917..2439b42c5 100644 --- a/docs/ja/guide/actions.md +++ b/docs/ja/guide/actions.md @@ -1,5 +1,7 @@ # アクション + + アクションはミューテーションと似ていますが、下記の点で異なります: - アクションは、状態を変更するのではなく、ミューテーションをコミットします。 diff --git a/docs/ja/guide/forms.md b/docs/ja/guide/forms.md index 075f3d9fa..2ad1f8922 100644 --- a/docs/ja/guide/forms.md +++ b/docs/ja/guide/forms.md @@ -1,5 +1,7 @@ # フォームの扱い + + 厳格モードで Vuex を使用するとき、Vuex に属する状態の一部で `v-model` を使用するのは少しトリッキーです: ``` html diff --git a/docs/ja/guide/getters.md b/docs/ja/guide/getters.md index c016b647a..417ce71de 100644 --- a/docs/ja/guide/getters.md +++ b/docs/ja/guide/getters.md @@ -1,5 +1,7 @@ # ゲッター + + 例えば項目のリストをフィルタリングしたりカウントするときのように、ストアの状態を算出したいときがあります。 ``` js diff --git a/docs/ja/guide/modules.md b/docs/ja/guide/modules.md index e0c7794c5..c8fb33c25 100644 --- a/docs/ja/guide/modules.md +++ b/docs/ja/guide/modules.md @@ -1,5 +1,7 @@ # モジュール + + 単一ステートツリーを使うため、アプリケーションの全ての状態は、一つの大きなストアオブジェクトに内包されます。しかしながら、アプリケーションが大きくなるにつれて、ストアオブジェクトは膨れ上がってきます。 そのような場合に役立てるため Vuex ではストアを**モジュール**に分割できるようになっています。それぞれのモジュールは、モジュール自身の状態(state)、ミューテーション、アクション、ゲッター、モジュールさえも内包できます(モジュールをネストできます)- トップからボトムまでフラクタル構造です: diff --git a/docs/ja/guide/mutations.md b/docs/ja/guide/mutations.md index 967ce9db2..dfd4898e8 100644 --- a/docs/ja/guide/mutations.md +++ b/docs/ja/guide/mutations.md @@ -1,5 +1,7 @@ # ミューテーション + + 実際に Vuex のストアの状態を変更できる唯一の方法は、ミューテーションをコミットすることです。Vuex のミューテーションはイベントにとても近い概念です: 各ミューテーションは**タイプ**と**ハンドラ**を持ちます。ハンドラ関数は Vuex の状態(state)を第1引数として取得し、実際に状態の変更を行います: ``` js diff --git a/docs/ja/guide/plugins.md b/docs/ja/guide/plugins.md index 9ac7da452..7420c7236 100644 --- a/docs/ja/guide/plugins.md +++ b/docs/ja/guide/plugins.md @@ -1,5 +1,7 @@ # プラグイン + + Vuex ストア は、各ミューテーションへのフックを公開する `plugins` オプションを受け付けます。 Vuex プラグインは、単一の引数としてストアを受けつけるただの関数です: ``` js diff --git a/docs/ja/guide/state.md b/docs/ja/guide/state.md index c07a125b0..7141db0de 100644 --- a/docs/ja/guide/state.md +++ b/docs/ja/guide/state.md @@ -2,6 +2,8 @@ ### 単一ステートツリー + + Vuex は **単一ステートツリー (single state tree)** を使います。つまり、この単一なオブジェクトはアプリケーションレベルの状態が全て含まれており、"信頼できる唯一の情報源 (single source of truth)" として機能します。これは、通常、アプリケーションごとに1つしかストアは持たないことを意味します。単一ステートツリーは状態の特定の部分を見つけること、デバッグのために現在のアプリケーションの状態のスナップショットを撮ることを容易にします。 単一ステートツリーはモジュール性と競合しません。以降の章で、アプリケーションの状態とミューテーション(変更)をサブモジュールに分割する方法について説明します。 @@ -57,6 +59,8 @@ const Counter = { ### `mapState`  ヘルパー + + コンポーネントが複数のストアのステートプロパティやゲッターを必要としているとき、これらすべてにおいて、算出プロパティを宣言することは繰り返しで冗長です。これに対処するため、算出ゲッター関数を生成し、いくつかのキーストロークを省くのに役立つ `mapState` ヘルパーを使うことができます: ```js diff --git a/docs/ja/guide/testing.md b/docs/ja/guide/testing.md index 54a00d177..e3340ca20 100644 --- a/docs/ja/guide/testing.md +++ b/docs/ja/guide/testing.md @@ -1,5 +1,7 @@ # テスト + + 私たちが Vuex でユニットテストしたい主な部分はミューテーションとアクションです。 ### ミューテーションのテスト diff --git a/docs/kr/README.md b/docs/kr/README.md index 98730c268..87e2445fe 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -52,6 +52,8 @@ new Vue({ 이는 [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/), [The Elm Architecture](https://guide.elm-lang.org/architecture/)에서 영감을 받은 Vuex의 기본 아이디어 입니다. 다른 패턴과 달리 Vuex는 Vue.js가 효율적인 업데이트를 위해 세분화된 반응 시스템을 활용하도록 특별히 고안된 라이브러리입니다. +대화식으로 Vuex를 배우고 싶다면 [Scrimba]((https://scrimba.com/g/gvuex))의 Vuex 과정에 등록하십시오. + ![vuex](/vuex.png) ### 언제 사용해야 하나요? diff --git a/docs/kr/guide/README.md b/docs/kr/guide/README.md index 4de68dc68..74cf732bc 100644 --- a/docs/kr/guide/README.md +++ b/docs/kr/guide/README.md @@ -1,5 +1,7 @@ # 시작하기 + + 모든 Vuex 애플리케이션의 중심에는 **store** 가 있습니다. "저장소"는 기본적으로 애플리케이션 **상태** 를 보유하고있는 컨테이너입니다. Vuex 저장소가 일반 전역 개체와 두 가지 다른 점이 있습니다. 1. Vuex store는 반응형 입니다. Vue 컴포넌트는 상태를 검색할 때 저장소의 상태가 변경되면 효율적으로 대응하고 업데이트합니다. diff --git a/docs/kr/guide/actions.md b/docs/kr/guide/actions.md index e36c24160..11dfcd215 100644 --- a/docs/kr/guide/actions.md +++ b/docs/kr/guide/actions.md @@ -1,5 +1,7 @@ # 액션 + + 액션은 변이와 유사합니다. 몇가지 다른 점은, - 상태를 변이시키는 대신 액션으로 변이에 대한 커밋을 합니다. diff --git a/docs/kr/guide/forms.md b/docs/kr/guide/forms.md index 03e7320c5..a332aa7ec 100644 --- a/docs/kr/guide/forms.md +++ b/docs/kr/guide/forms.md @@ -1,5 +1,7 @@ # 폼 핸들링 + + strict 모드로 Vuex를 사용하는 경우 Vuex에 포함된 부분에 `v-model`을 사용하는 것은 약간 까다로울 수 있습니다. ``` html diff --git a/docs/kr/guide/getters.md b/docs/kr/guide/getters.md index 0e42c5e1d..f38434f3e 100644 --- a/docs/kr/guide/getters.md +++ b/docs/kr/guide/getters.md @@ -1,5 +1,7 @@ # Getters + + 때로는 저장소 상태를 기반하는 상태를 계산해야 할 수도 있습니다.(예: 아이템 리스트를 필터링하고 계산) ``` js diff --git a/docs/kr/guide/modules.md b/docs/kr/guide/modules.md index 70a00267b..c2e1cd7ae 100644 --- a/docs/kr/guide/modules.md +++ b/docs/kr/guide/modules.md @@ -1,5 +1,7 @@ # 모듈 + + 단일 상태 트리를 사용하기 때문에 애플리케이션의 모든 상태가 하나의 큰 객체 안에 포함됩니다. 그러나 규모가 커짐에 따라 저장소는 매우 비대해질 수 있습니다. 이를 위해 Vuex는 저장소를 **모듈** 로 나눌 수 있습니다. 각 모듈은 자체 상태, 변이, 액션, 게터 및 심지어 중첩된 모듈을 포함 할 수 있습니다. diff --git a/docs/kr/guide/mutations.md b/docs/kr/guide/mutations.md index 6217890e4..1f7f0f156 100644 --- a/docs/kr/guide/mutations.md +++ b/docs/kr/guide/mutations.md @@ -1,5 +1,7 @@ # 변이 + + Vuex 저장소에서 실제로 상태를 변경하는 유일한 방법은 변이하는 것입니다. Vuex 변이는 이벤트와 매우 유사합니다. 각 변이에는 **타입** 문자열 **핸들러** 가 있습니다. 핸들러 함수는 실제 상태 수정을 하는 곳이며, 첫 번째 전달인자로 상태를받습니다. ``` js diff --git a/docs/kr/guide/plugins.md b/docs/kr/guide/plugins.md index 39c264d23..a90cd64a4 100644 --- a/docs/kr/guide/plugins.md +++ b/docs/kr/guide/plugins.md @@ -1,5 +1,7 @@ # 플러그인 + + Vuex 저장소는 각 변이에 대한 훅을 노출하는 `plugins` 옵션을 허용합니다. Vuex 플러그인은 저장소를 유일한 전달인자로 받는 함수입니다. ``` js diff --git a/docs/kr/guide/state.md b/docs/kr/guide/state.md index 4827b6bb0..5dc74f04e 100644 --- a/docs/kr/guide/state.md +++ b/docs/kr/guide/state.md @@ -2,6 +2,8 @@ ### 단일 상태 트리 + + Vuex는 **단일 상태 트리** 를 사용합니다. 즉, 이 단일 객체는 모든 애플리케이션 수준의 상태를 포함하며 "원본 소스" 역할을 합니다. 이는 각 애플리케이션마다 하나의 저장소만 갖게 된다는 것을 의미합니다. 단일 상태 트리를 사용하면 특정 상태를 쉽게 찾을 수 있으므로 디버깅을 위해 현재 앱 상태의 스냅 샷을 쉽게 가져올 수 있습니다. 단일 상태 트리는 모듈성과 충돌하지 않습니다. 나중에 상태와 변이를 하위 모듈로 분할하는 방법에 대해 설명합니다. @@ -58,6 +60,8 @@ const Counter = { ### `mapState` 헬퍼 + + 컴포넌트가 여러 저장소 상태 속성이나 getter를 사용해야하는 경우 계산된 속성을 모두 선언하면 반복적이고 장황해집니다. 이를 처리하기 위해 우리는 계산된 getter 함수를 생성하는 `mapState` 헬퍼를 사용하여 키 입력을 줄일 수 있습니다. ``` js diff --git a/docs/kr/guide/testing.md b/docs/kr/guide/testing.md index 27cc99fd6..64d9f5694 100644 --- a/docs/kr/guide/testing.md +++ b/docs/kr/guide/testing.md @@ -1,5 +1,7 @@ # 테스팅 + + Vuex에서 단위 테스트를 하고자 하는 주요 부분은 변이와 액션입니다. ### 변이 테스팅 diff --git a/docs/ptbr/README.md b/docs/ptbr/README.md index 32930a20b..f80f96de0 100644 --- a/docs/ptbr/README.md +++ b/docs/ptbr/README.md @@ -54,6 +54,8 @@ Além disso, definindo e separando os conceitos envolvidos no gerenciamento do e Esta é a ideia básica por trás do Vuex, inspirada por [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) e [The Elm Architecture](https://guide.elm-lang.org/architecture/). Ao contrário dos outros padrões, o Vuex também é uma implementação de biblioteca adaptada especificamente para o Vue.js tirar proveito de seu sistema de reatividade granular para atualizações eficientes. +Se você quiser aprender Vuex de um modo interativo, você pode conferir esse curso de [Vuex no Scrimba.](https://scrimba.com/g/gvuex) + ![vuex](/vuex.png) ### Quando usar o Vuex? diff --git a/docs/ptbr/guide/README.md b/docs/ptbr/guide/README.md index f9f56360a..388d93f02 100644 --- a/docs/ptbr/guide/README.md +++ b/docs/ptbr/guide/README.md @@ -1,5 +1,7 @@ # Começando + + No centro de cada aplicação Vuex existe o **_store_**. Um "_store_" é basicamente um recipiente que contém o **estado** da sua aplicação. Há duas coisas que tornam um _store_ Vuex diferente de um objeto global simples: 1. Os _stores_ Vuex são reativos. Quando os componentes do Vue obtêm o estado dele, eles atualizarão de forma reativa e eficiente se o estado do _store_ mudar. diff --git a/docs/ptbr/guide/actions.md b/docs/ptbr/guide/actions.md index 8a66eab85..506d4d84c 100644 --- a/docs/ptbr/guide/actions.md +++ b/docs/ptbr/guide/actions.md @@ -1,5 +1,7 @@ # Ações + + As ações são semelhantes às mutações, as diferenças são as seguintes: - Em vez de mudar o estado, as ações confirmam (ou fazem _commit_ de) mutações. diff --git a/docs/ptbr/guide/forms.md b/docs/ptbr/guide/forms.md index 0b1564324..14cd0d724 100644 --- a/docs/ptbr/guide/forms.md +++ b/docs/ptbr/guide/forms.md @@ -1,5 +1,7 @@ # Manipulação de Formulários + + Ao usar o Vuex no modo estrito, pode ser um pouco complicado usar `v-model` em um pedaço do estado que pertence ao Vuex: ``` html diff --git a/docs/ptbr/guide/getters.md b/docs/ptbr/guide/getters.md index b74b7f226..bc0922f4d 100644 --- a/docs/ptbr/guide/getters.md +++ b/docs/ptbr/guide/getters.md @@ -1,5 +1,7 @@ # Getters + + Às vezes, talvez precisemos calcular o estado derivado com base no estado do _store_, por exemplo, filtrar através de uma lista de itens e contá-los: ``` js diff --git a/docs/ptbr/guide/modules.md b/docs/ptbr/guide/modules.md index 54c3365f3..306c50c7f 100644 --- a/docs/ptbr/guide/modules.md +++ b/docs/ptbr/guide/modules.md @@ -1,5 +1,7 @@ # Módulos + + Devido ao uso de uma única árvore de estado, todo o estado de nossa aplicação está contido dentro de um grande objeto. No entanto, à medida que nosso aplicativo cresce em escala, o _store_ pode ficar realmente inchado. Para ajudar com isso, o Vuex nos permite dividir nosso _store_ em **módulos**. Cada módulo pode conter seu próprio estado, mutações, ações, _getters_ e até módulos aninhados - é todo o complexo caminho abaixo: diff --git a/docs/ptbr/guide/mutations.md b/docs/ptbr/guide/mutations.md index f2a5a5805..773f659ec 100644 --- a/docs/ptbr/guide/mutations.md +++ b/docs/ptbr/guide/mutations.md @@ -1,5 +1,7 @@ # Mutações + + A única maneira de realmente mudar de estado em um _store_ Vuex é por confirmar (ou fazer _commit_ de) uma mutação. As mutações do Vuex são muito semelhantes aos eventos: cada mutação tem uma cadeia de caracteres **tipo** e um **manipulador**. A função do manipulador é onde realizamos modificações de estado reais e ele receberá o estado como o 1º argumento: ``` js diff --git a/docs/ptbr/guide/plugins.md b/docs/ptbr/guide/plugins.md index 2e670a3ca..cc0f0fae4 100644 --- a/docs/ptbr/guide/plugins.md +++ b/docs/ptbr/guide/plugins.md @@ -1,5 +1,7 @@ # Plugins + + Os _stores_ do Vuex aceitam a opção _plugins_ que expõe _hooks_ para cada mutação. Um _plugin_ Vuex é simplesmente uma função que recebe um _store_ como seu único argumento: ``` js diff --git a/docs/ptbr/guide/state.md b/docs/ptbr/guide/state.md index 60a67750d..2f4ec24b3 100644 --- a/docs/ptbr/guide/state.md +++ b/docs/ptbr/guide/state.md @@ -2,6 +2,8 @@ ### Árvore Única de Estado + + O Vuex usa uma **árvore única de estado** - ou seja, esse único objeto contém todo o estado do seu nível de aplicação e serve como a "única fonte da verdade". Isso também significa que você terá apenas um _store_ para cada aplicativo. Uma árvore única de estado facilita a localização de uma parte específica do estado, e permite capturar facilmente momentos do estado atual do aplicativo para fins de depuração. A árvore única de estado não entra em conflito com a modularidade - em capítulos posteriores, discutiremos como dividir seu estado e mutações em sub-módulos. @@ -58,6 +60,8 @@ const Counter = { ### O Auxiliar `mapState` + + Quando um componente precisa fazer uso de várias propriedades do estado do _store_ ou _getters_, declarar todos esses dados computados pode ser repetitivo e verboso. Para lidar com isso, podemos usar o auxiliar `mapState` que gera funções _getter_ computadas para nós, economizando algumas linhas de código: ``` js diff --git a/docs/ptbr/guide/testing.md b/docs/ptbr/guide/testing.md index 38101e43e..ecffbcb0d 100644 --- a/docs/ptbr/guide/testing.md +++ b/docs/ptbr/guide/testing.md @@ -1,5 +1,7 @@ # Testando + + As partes principais que queremos testar no Vuex são mutações e ações. ### Testando Mutações diff --git a/docs/ru/README.md b/docs/ru/README.md index cdc6b6bdf..d8523f05b 100644 --- a/docs/ru/README.md +++ b/docs/ru/README.md @@ -54,6 +54,8 @@ new Vue({ Это основная идея Vuex, вдохновлённого [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) и [Архитектурой Elm](https://guide.elm-lang.org/architecture/). В отличие от других паттернов, Vuex реализован в виде библиотеки, специально предназначенной для Vue.js, чтобы использовать его систему реактивности для эффективного обновления. +Если хотите изучить Vuex в интерактивном режиме, попробуйте этот [курс по Vuex на Scrimba.](https://scrimba.com/g/gvuex) + ![vuex](/ru/vuex.png) ### Когда следует использовать Vuex? diff --git a/docs/ru/guide/README.md b/docs/ru/guide/README.md index 68a98df75..a20c0acad 100644 --- a/docs/ru/guide/README.md +++ b/docs/ru/guide/README.md @@ -1,5 +1,7 @@ # Введение + + В центре любого Vuex-приложения находится **хранилище**. «Хранилище» — это контейнер, в котором хранится **состояние** вашего приложения. Два момента отличают хранилище Vuex от простого глобального объекта: 1. Хранилище Vuex реактивно. Когда компоненты Vue полагаются на его состояние, то они будут реактивно и эффективно обновляться, если состояние хранилища изменяется. diff --git a/docs/ru/guide/actions.md b/docs/ru/guide/actions.md index 42d0c4460..511c5ca45 100644 --- a/docs/ru/guide/actions.md +++ b/docs/ru/guide/actions.md @@ -1,5 +1,7 @@ # Действия + + Действия — похожи на мутации с несколькими отличиями: * Вместо того, чтобы напрямую менять состояние, действия инициируют мутации; diff --git a/docs/ru/guide/forms.md b/docs/ru/guide/forms.md index 0658f2b96..239c16ef2 100644 --- a/docs/ru/guide/forms.md +++ b/docs/ru/guide/forms.md @@ -1,5 +1,7 @@ # Работа с формами + + При использовании строгого режима Vuex может показаться неочевидным как использовать `v-model` с частью состояния Vuex: ```html diff --git a/docs/ru/guide/getters.md b/docs/ru/guide/getters.md index 9c9d1daed..e0f126ef0 100644 --- a/docs/ru/guide/getters.md +++ b/docs/ru/guide/getters.md @@ -1,5 +1,7 @@ # Геттеры + + Иногда может потребоваться вычислять производное состояние на основе состояния хранилища, например, отфильтровать список и затем подсчитать количество элементов: ```js diff --git a/docs/ru/guide/modules.md b/docs/ru/guide/modules.md index f080afc5a..70187bcc3 100644 --- a/docs/ru/guide/modules.md +++ b/docs/ru/guide/modules.md @@ -1,5 +1,7 @@ # Модули + + Из-за использования единого дерева состояния, все глобальные данные приложения оказываются помещены в один большой объект. По мере роста приложения, хранилище может существенно раздуться. Чтобы помочь в этой беде, Vuex позволяет разделять хранилище на **модули**. Каждый модуль может содержать собственное состояние, мутации, действия, геттеры и даже встроенные подмодули — структура фрактальна: diff --git a/docs/ru/guide/mutations.md b/docs/ru/guide/mutations.md index 7b1530a15..81033830a 100644 --- a/docs/ru/guide/mutations.md +++ b/docs/ru/guide/mutations.md @@ -1,5 +1,7 @@ # Мутации + + Единственным способом изменения состояния хранилища во Vuex являются мутации. Мутации во Vuex очень похожи на события: каждая мутация имеет строковый **тип** и **функцию-обработчик**. В этом обработчике и происходят, собственно, изменения состояния, переданного в функцию первым аргументом: ```js diff --git a/docs/ru/guide/plugins.md b/docs/ru/guide/plugins.md index 03f1cce64..b52b18c81 100644 --- a/docs/ru/guide/plugins.md +++ b/docs/ru/guide/plugins.md @@ -1,5 +1,7 @@ # Плагины + + Хранилища Vuex принимают опцию `plugins`, предоставляющую хуки для каждой мутации. Vuex-плагин — это просто функция, получающая хранилище в качестве единственного параметра: ```js diff --git a/docs/ru/guide/state.md b/docs/ru/guide/state.md index 274a7995d..462d66457 100644 --- a/docs/ru/guide/state.md +++ b/docs/ru/guide/state.md @@ -2,6 +2,8 @@ ### Единое дерево состояния + + Vuex использует **единое дерево состояния** — когда один объект содержит всё глобальное состояние приложения и служит «единственным источником истины». Это также означает, что в приложении будет только одно такое хранилище. Единое дерево состояния позволяет легко найти нужную его часть или делать снимки текущего состояния приложения в целях отладки. Единое дерево состояния не противоречит модульности — в следующих главах мы изучим, как можно разделить состояние и мутации на под-модули. @@ -58,6 +60,8 @@ const Counter = { ### Вспомогательная функция `mapState` + + Когда компонент должен использовать множество свойств или геттеров хранилища, объявлять все эти вычисляемые свойства может быть утомительно. В таких случаях можно использовать функцию `mapState`, которая автоматически генерирует вычисляемые свойства: ```js diff --git a/docs/ru/guide/testing.md b/docs/ru/guide/testing.md index 616c16ac2..bd77ea655 100644 --- a/docs/ru/guide/testing.md +++ b/docs/ru/guide/testing.md @@ -1,5 +1,7 @@ # Тестирование + + В основном предметом модульного тестирования во Vuex являются мутации и действия. ### Тестирование мутаций diff --git a/docs/zh/README.md b/docs/zh/README.md index a58deffeb..8d2c11c4c 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -52,6 +52,8 @@ new Vue({ 这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/) 和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 +如果你想要以交互式的方式学习Vuex,快来看看在[Scrimba](https://scrimba.com/g/gvuex)上的这门Vuex课程。 + ![vuex](/vuex.png) ### 什么情况下我应该使用 Vuex? diff --git a/docs/zh/guide/README.md b/docs/zh/guide/README.md index eab92199c..dfe4b7ae9 100644 --- a/docs/zh/guide/README.md +++ b/docs/zh/guide/README.md @@ -1,5 +1,7 @@ # 开始 + + 每一个 Vuex 应用的核心就是 store(仓库)。“store”基本上就是一个容器,它包含着你的应用中大部分的**状态 (state)**。Vuex 和单纯的全局对象有以下两点不同: 1. Vuex 的状态存储是响应式的。当 Vue 组件从 store 中读取状态的时候,若 store 中的状态发生变化,那么相应的组件也会相应地得到高效更新。 diff --git a/docs/zh/guide/actions.md b/docs/zh/guide/actions.md index d4ea1d8f2..a829af4d0 100644 --- a/docs/zh/guide/actions.md +++ b/docs/zh/guide/actions.md @@ -1,5 +1,7 @@ # Action + + Action 类似于 mutation,不同在于: - Action 提交的是 mutation,而不是直接变更状态。 diff --git a/docs/zh/guide/forms.md b/docs/zh/guide/forms.md index 99e7f041c..2d2dca19e 100644 --- a/docs/zh/guide/forms.md +++ b/docs/zh/guide/forms.md @@ -1,5 +1,7 @@ # 表单处理 + + 当在严格模式中使用 Vuex 时,在属于 Vuex 的 state 上使用 `v-model` 会比较棘手: ``` html diff --git a/docs/zh/guide/getters.md b/docs/zh/guide/getters.md index b8e2f729f..6cfe163d8 100644 --- a/docs/zh/guide/getters.md +++ b/docs/zh/guide/getters.md @@ -1,5 +1,7 @@ # Getter + + 有时候我们需要从 store 中的 state 中派生出一些状态,例如对列表进行过滤并计数: ``` js diff --git a/docs/zh/guide/modules.md b/docs/zh/guide/modules.md index c5a27fa4c..72950239f 100644 --- a/docs/zh/guide/modules.md +++ b/docs/zh/guide/modules.md @@ -1,5 +1,7 @@ # Module + + 由于使用单一状态树,应用的所有状态会集中到一个比较大的对象。当应用变得非常复杂时,store 对象就有可能变得相当臃肿。 为了解决以上问题,Vuex 允许我们将 store 分割成**模块(module)**。每个模块拥有自己的 state、mutation、action、getter、甚至是嵌套子模块——从上至下进行同样方式的分割: diff --git a/docs/zh/guide/mutations.md b/docs/zh/guide/mutations.md index 76e8be330..25dccb5ac 100644 --- a/docs/zh/guide/mutations.md +++ b/docs/zh/guide/mutations.md @@ -1,5 +1,7 @@ # Mutation + + 更改 Vuex 的 store 中的状态的唯一方法是提交 mutation。Vuex 中的 mutation 非常类似于事件:每个 mutation 都有一个字符串的 **事件类型 (type)** 和 一个 **回调函数 (handler)**。这个回调函数就是我们实际进行状态更改的地方,并且它会接受 state 作为第一个参数: ``` js diff --git a/docs/zh/guide/plugins.md b/docs/zh/guide/plugins.md index 92c157c9c..a68134ec6 100644 --- a/docs/zh/guide/plugins.md +++ b/docs/zh/guide/plugins.md @@ -1,5 +1,7 @@ # 插件 + + Vuex 的 store 接受 `plugins` 选项,这个选项暴露出每次 mutation 的钩子。Vuex 插件就是一个函数,它接收 store 作为唯一参数: ``` js diff --git a/docs/zh/guide/state.md b/docs/zh/guide/state.md index 892773abb..40993b863 100644 --- a/docs/zh/guide/state.md +++ b/docs/zh/guide/state.md @@ -2,6 +2,8 @@ ### 单一状态树 + + Vuex 使用**单一状态树**——是的,用一个对象就包含了全部的应用层级状态。至此它便作为一个“唯一数据源 ([SSOT](https://en.wikipedia.org/wiki/Single_source_of_truth))”而存在。这也意味着,每个应用将仅仅包含一个 store 实例。单一状态树让我们能够直接地定位任一特定的状态片段,在调试的过程中也能轻易地取得整个当前应用状态的快照。 单状态树和模块化并不冲突——在后面的章节里我们会讨论如何将状态和状态变更事件分布到各个子模块中。 @@ -57,6 +59,8 @@ const Counter = { ### `mapState` 辅助函数 + + 当一个组件需要获取多个状态时候,将这些状态都声明为计算属性会有些重复和冗余。为了解决这个问题,我们可以使用 `mapState` 辅助函数帮助我们生成计算属性,让你少按几次键: ``` js diff --git a/docs/zh/guide/testing.md b/docs/zh/guide/testing.md index b2cbc4579..ce511abba 100644 --- a/docs/zh/guide/testing.md +++ b/docs/zh/guide/testing.md @@ -1,5 +1,7 @@ # 测试 + + 我们主要想针对 Vuex 中的 mutation 和 action 进行单元测试。 ### 测试 Mutation From e262c3676d556db27788645b00e3e22c1dadb5b7 Mon Sep 17 00:00:00 2001 From: Jenny_L Date: Fri, 8 Mar 2019 02:10:46 +0800 Subject: [PATCH 007/280] doc: change ECMASCript into ECMAScript (#1514) --- docs/fr/guide/state.md | 2 +- docs/zh/guide/state.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/fr/guide/state.md b/docs/fr/guide/state.md index 63ea28263..84ad0f44e 100644 --- a/docs/fr/guide/state.md +++ b/docs/fr/guide/state.md @@ -96,7 +96,7 @@ computed: mapState([ ### Opérateur de décomposition -Notez que `mapState` renvoie un objet. Comment l'utiliser en complément des autres propriétés calculées locales ? Normalement, il faudrait utiliser un outil pour fusionner les multiples objets en un seul afin de passer cet objet final à `computed`. Cependant avec l'[opérateur de décomposition](https://github.com/sebmarkbage/ecmascript-rest-spread) (qui est une proposition stage-4 ECMASCript), nous pouvons grandement simplifier la syntaxe : +Notez que `mapState` renvoie un objet. Comment l'utiliser en complément des autres propriétés calculées locales ? Normalement, il faudrait utiliser un outil pour fusionner les multiples objets en un seul afin de passer cet objet final à `computed`. Cependant avec l'[opérateur de décomposition](https://github.com/sebmarkbage/ecmascript-rest-spread) (qui est une proposition stage-4 ECMAScript), nous pouvons grandement simplifier la syntaxe : ``` js computed: { diff --git a/docs/zh/guide/state.md b/docs/zh/guide/state.md index 40993b863..1d543ae54 100644 --- a/docs/zh/guide/state.md +++ b/docs/zh/guide/state.md @@ -95,7 +95,7 @@ computed: mapState([ ### 对象展开运算符 -`mapState` 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 `computed` 属性。但是自从有了[对象展开运算符](https://github.com/sebmarkbage/ecmascript-rest-spread)(现处于 ECMASCript 提案 stage-4 阶段),我们可以极大地简化写法: +`mapState` 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 `computed` 属性。但是自从有了[对象展开运算符](https://github.com/sebmarkbage/ecmascript-rest-spread)(现处于 ECMAScript 提案 stage-4 阶段),我们可以极大地简化写法: ``` js computed: { From 0e109e2a38dafdc0c2bd6bd3892bc66cfe252b16 Mon Sep 17 00:00:00 2001 From: David Sandoz Date: Sun, 10 Mar 2019 14:44:15 +0100 Subject: [PATCH 008/280] fix(types): Make mutation and action payload optional in definition file (#1517) * Make mutation payload optional in definition file When testing a mutation without payload in TypeScript, it complains that about the missing payload, even though it's not mandatory. This PR simply makes the payload optional. Fixes #1491 * Make action payload optional in definition file --- types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/index.d.ts b/types/index.d.ts index 46316bb2a..3cd40067a 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -97,7 +97,7 @@ export interface StoreOptions { strict?: boolean; } -export type ActionHandler = (this: Store, injectee: ActionContext, payload: any) => any; +export type ActionHandler = (this: Store, injectee: ActionContext, payload?: any) => any; export interface ActionObject { root?: boolean; handler: ActionHandler; @@ -105,7 +105,7 @@ export interface ActionObject { export type Getter = (state: S, getters: any, rootState: R, rootGetters: any) => any; export type Action = ActionHandler | ActionObject; -export type Mutation = (state: S, payload: any) => any; +export type Mutation = (state: S, payload?: any) => any; export type Plugin = (store: Store) => any; export interface Module { From 1ff6a24db9c619f6736c921df60e13127cf9ddae Mon Sep 17 00:00:00 2001 From: dollinad <39140769+dollinad@users.noreply.github.com> Date: Sat, 16 Mar 2019 14:06:21 -0700 Subject: [PATCH 009/280] Fix minor errors in README.md Changes involve: - Removal of dead links: data flow.png and vuex.png - Removal of discourse markers (although, also, in addition) to make sentences precise --- docs/README.md | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/docs/README.md b/docs/README.md index 67283092e..233d530c2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -31,17 +31,13 @@ new Vue({ It is a self-contained app with the following parts: -- The **state**, which is the source of truth that drives our app; -- The **view**, which is just a declarative mapping of the **state**; -- The **actions**, which are the possible ways the state could change in reaction to user inputs from the **view**. +- The **state**, the source of truth that drives our app; +- The **view**, a declarative mapping of the **state**; +- The **actions**, the possible ways the state could change in reaction to user inputs from the **view**. -This is an extremely simple representation of the concept of "one-way data flow": +This is an simple representation of the concept of "one-way data flow": -

- -

- -However, the simplicity quickly breaks down when we have **multiple components that share common state**: +However, the simplicity quickly breaks down when we have **multiple components that share a common state**: - Multiple views may depend on the same piece of state. - Actions from different views may need to mutate the same piece of state. @@ -50,17 +46,15 @@ For problem one, passing props can be tedious for deeply nested components, and So why don't we extract the shared state out of the components, and manage it in a global singleton? With this, our component tree becomes a big "view", and any component can access the state or trigger actions, no matter where they are in the tree! -In addition, by defining and separating the concepts involved in state management and enforcing certain rules, we also give our code more structure and maintainability. +By defining and separating the concepts involved in state management and enforcing rules that maintain independece between views and states, we give our code more structure and maintainability. This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. If you want to learn Vuex in an interactive way you can check out this [Vuex course on Scrimba](https://scrimba.com/g/gvuex), which gives you a mix of screencast and code playground that you can pause and play around with anytime. -![vuex](/vuex.png) - ### When Should I Use It? -Although Vuex helps us deal with shared state management, it also comes with the cost of more concepts and boilerplate. It's a trade-off between short term and long term productivity. +Vuex helps us deal with shared state management with the cost of more concepts and boilerplate. It's a trade-off between short term and long term productivity. If you've never built a large-scale SPA and jump right into Vuex, it may feel verbose and daunting. That's perfectly normal - if your app is simple, you will most likely be fine without Vuex. A simple [store pattern](https://vuejs.org/v2/guide/state-management.html#Simple-State-Management-from-Scratch) may be all you need. But if you are building a medium-to-large-scale SPA, chances are you have run into situations that make you think about how to better handle state outside of your Vue components, and Vuex will be the natural next step for you. There's a good quote from Dan Abramov, the author of Redux: From d1b2cb79743696b739f2f4591366baa5eaf73540 Mon Sep 17 00:00:00 2001 From: dollinad <39140769+dollinad@users.noreply.github.com> Date: Sat, 16 Mar 2019 19:10:45 -0700 Subject: [PATCH 010/280] Updated Edits Re-added link for Vuex --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 233d530c2..4cdd5c891 100644 --- a/docs/README.md +++ b/docs/README.md @@ -54,7 +54,7 @@ If you want to learn Vuex in an interactive way you can check out this [Vuex cou ### When Should I Use It? -Vuex helps us deal with shared state management with the cost of more concepts and boilerplate. It's a trade-off between short term and long term productivity. +[Vuex](https://vuex.vuejs.org/) helps us deal with shared state management with the cost of more concepts and boilerplate. It's a trade-off between short term and long term productivity. If you've never built a large-scale SPA and jump right into Vuex, it may feel verbose and daunting. That's perfectly normal - if your app is simple, you will most likely be fine without Vuex. A simple [store pattern](https://vuejs.org/v2/guide/state-management.html#Simple-State-Management-from-Scratch) may be all you need. But if you are building a medium-to-large-scale SPA, chances are you have run into situations that make you think about how to better handle state outside of your Vue components, and Vuex will be the natural next step for you. There's a good quote from Dan Abramov, the author of Redux: From d0727249442334f2e3a84431f651688bc24c8e41 Mon Sep 17 00:00:00 2001 From: dollinad <39140769+dollinad@users.noreply.github.com> Date: Sat, 16 Mar 2019 19:28:08 -0700 Subject: [PATCH 011/280] Update edits1 Readded flow.png and veux.png --- docs/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/README.md b/docs/README.md index 4cdd5c891..1e1365760 100644 --- a/docs/README.md +++ b/docs/README.md @@ -37,6 +37,10 @@ It is a self-contained app with the following parts: This is an simple representation of the concept of "one-way data flow": +

+ +

+ However, the simplicity quickly breaks down when we have **multiple components that share a common state**: - Multiple views may depend on the same piece of state. @@ -48,6 +52,8 @@ So why don't we extract the shared state out of the components, and manage it in By defining and separating the concepts involved in state management and enforcing rules that maintain independece between views and states, we give our code more structure and maintainability. +![vuex](/vuex.png) + This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. If you want to learn Vuex in an interactive way you can check out this [Vuex course on Scrimba](https://scrimba.com/g/gvuex), which gives you a mix of screencast and code playground that you can pause and play around with anytime. From 683579c1c7b699e69dee063b935ef4e7ca7453f8 Mon Sep 17 00:00:00 2001 From: ktsn Date: Sun, 17 Mar 2019 12:40:47 +0800 Subject: [PATCH 012/280] docs: tweaks --- docs/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/README.md b/docs/README.md index 1e1365760..905874b95 100644 --- a/docs/README.md +++ b/docs/README.md @@ -52,15 +52,15 @@ So why don't we extract the shared state out of the components, and manage it in By defining and separating the concepts involved in state management and enforcing rules that maintain independece between views and states, we give our code more structure and maintainability. -![vuex](/vuex.png) - This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. If you want to learn Vuex in an interactive way you can check out this [Vuex course on Scrimba](https://scrimba.com/g/gvuex), which gives you a mix of screencast and code playground that you can pause and play around with anytime. +![vuex](/vuex.png) + ### When Should I Use It? -[Vuex](https://vuex.vuejs.org/) helps us deal with shared state management with the cost of more concepts and boilerplate. It's a trade-off between short term and long term productivity. +Vuex helps us deal with shared state management with the cost of more concepts and boilerplate. It's a trade-off between short term and long term productivity. If you've never built a large-scale SPA and jump right into Vuex, it may feel verbose and daunting. That's perfectly normal - if your app is simple, you will most likely be fine without Vuex. A simple [store pattern](https://vuejs.org/v2/guide/state-management.html#Simple-State-Management-from-Scratch) may be all you need. But if you are building a medium-to-large-scale SPA, chances are you have run into situations that make you think about how to better handle state outside of your Vue components, and Vuex will be the natural next step for you. There's a good quote from Dan Abramov, the author of Redux: From 120cec0a1036145b67bc08bdb9839b705ea44ba6 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Tue, 19 Mar 2019 08:39:43 -0500 Subject: [PATCH 013/280] Rephrase dumb to silly (#1525) Replace dumb with silly, since dumb means mute or unable to speak. What the document means here is that this function call may seem to be a bit extra and non obvious at first glance. The whimsical word "silly" is a nice stand in for this. --- docs/guide/actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/actions.md b/docs/guide/actions.md index 7bf4fc933..081141ab8 100644 --- a/docs/guide/actions.md +++ b/docs/guide/actions.md @@ -47,7 +47,7 @@ Actions are triggered with the `store.dispatch` method: store.dispatch('increment') ``` -This may look dumb at first sight: if we want to increment the count, why don't we just call `store.commit('increment')` directly? Remember that **mutations have to be synchronous**? Actions don't. We can perform **asynchronous** operations inside an action: +This may look silly at first sight: if we want to increment the count, why don't we just call `store.commit('increment')` directly? Remember that **mutations have to be synchronous**? Actions don't. We can perform **asynchronous** operations inside an action: ``` js actions: { From b58d3d6a6426e901175a04bf6dcf206561cc82f5 Mon Sep 17 00:00:00 2001 From: Styx <1654630248@qq.com> Date: Tue, 19 Mar 2019 21:40:45 +0800 Subject: [PATCH 014/280] docs: fixed a sentence into bold (#1524) --- docs/zh/guide/strict.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/guide/strict.md b/docs/zh/guide/strict.md index ad71ce59f..38d856aad 100644 --- a/docs/zh/guide/strict.md +++ b/docs/zh/guide/strict.md @@ -13,7 +13,7 @@ const store = new Vuex.Store({ ### 开发环境与发布环境 -**不要在发布环境下启用严格模式!**严格模式会深度监测状态树来检测不合规的状态变更——请确保在发布环境下关闭严格模式,以避免性能损失。 +**不要在发布环境下启用严格模式!** 严格模式会深度监测状态树来检测不合规的状态变更——请确保在发布环境下关闭严格模式,以避免性能损失。 类似于插件,我们可以让构建工具来处理这种情况: From cb9986ae5a62e002a1d876e881ee5f31dd410888 Mon Sep 17 00:00:00 2001 From: Parth Date: Mon, 25 Mar 2019 18:01:53 +0530 Subject: [PATCH 015/280] =?UTF-8?q?fix:=20Memory=20leak=20happening=20whil?= =?UTF-8?q?e=20using=20registerModule/u=E2=80=A6=20(#1508)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fixed issue#1507 : Memory leak happening while using registerModule/unregisterModule. * Adding comment for leak description. Simplyfy partial function to take only one argument. * Removed oldVm.computed = null. This statement is not required --- src/store.js | 6 ++++-- src/util.js | 6 ++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/store.js b/src/store.js index dfcc755f8..a79252b50 100644 --- a/src/store.js +++ b/src/store.js @@ -1,7 +1,7 @@ import applyMixin from './mixin' import devtoolPlugin from './plugins/devtool' import ModuleCollection from './module/module-collection' -import { forEachValue, isObject, isPromise, assert } from './util' +import { forEachValue, isObject, isPromise, assert, partial } from './util' let Vue // bind on install @@ -256,7 +256,9 @@ function resetStoreVM (store, state, hot) { const computed = {} forEachValue(wrappedGetters, (fn, key) => { // use computed to leverage its lazy-caching mechanism - computed[key] = () => fn(store) + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure enviroment. + computed[key] = partial(fn, store) Object.defineProperty(store.getters, key, { get: () => store._vm[key], enumerable: true // for local getters diff --git a/src/util.js b/src/util.js index fb1203251..2df74bb16 100644 --- a/src/util.js +++ b/src/util.js @@ -64,3 +64,9 @@ export function isPromise (val) { export function assert (condition, msg) { if (!condition) throw new Error(`[vuex] ${msg}`) } + +export function partial (fn, arg) { + return function () { + return fn(arg) + } +} From 0b1ceeca760bb6a376ea71426934306a88d046c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8B=BE=E4=B8=89=E8=82=A1=E5=9B=9B?= Date: Mon, 25 Mar 2019 20:44:05 +0800 Subject: [PATCH 016/280] docs(zh): updated (#1529) * docs(zh): updated * Update strict.md --- docs/zh/README.md | 8 ++++---- docs/zh/guide/strict.md | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/zh/README.md b/docs/zh/README.md index 8d2c11c4c..a4e55325d 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -33,7 +33,7 @@ new Vue({ - **view**,以声明方式将 **state** 映射到视图; - **actions**,响应在 **view** 上的用户输入导致的状态变化。 -以下是一个表示“单向数据流”理念的极简示意: +以下是一个表示“单向数据流”理念的简单示意:

@@ -48,17 +48,17 @@ new Vue({ 因此,我们为什么不把组件的共享状态抽取出来,以一个全局单例模式管理呢?在这种模式下,我们的组件树构成了一个巨大的“视图”,不管在树的哪个位置,任何组件都能获取状态或者触发行为! -另外,通过定义和隔离状态管理中的各种概念并强制遵守一定的规则,我们的代码将会变得更结构化且易维护。 +通过定义和隔离状态管理中的各种概念并通过强制规则维持视图和状态间的独立性,我们的代码将会变得更结构化且易维护。 这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/) 和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 -如果你想要以交互式的方式学习Vuex,快来看看在[Scrimba](https://scrimba.com/g/gvuex)上的这门Vuex课程。 +如果你想交互式地学习 Vuex,可以看这个 [Scrimba 上的 Vuex 课程](https://scrimba.com/g/gvuex),它将录屏和代码试验场混合在了一起,你可以随时暂停并尝试。 ![vuex](/vuex.png) ### 什么情况下我应该使用 Vuex? -虽然 Vuex 可以帮助我们管理共享状态,但也附带了更多的概念和框架。这需要对短期和长期效益进行权衡。 +Vuex 可以帮助我们管理共享状态,并附带了更多的概念和框架。这需要对短期和长期效益进行权衡。 如果您不打算开发大型单页应用,使用 Vuex 可能是繁琐冗余的。确实是如此——如果您的应用够简单,您最好不要使用 Vuex。一个简单的 [store 模式](https://cn.vuejs.org/v2/guide/state-management.html#简单状态管理起步使用)就足够您所需了。但是,如果您需要构建一个中大型单页应用,您很可能会考虑如何更好地在组件外部管理状态,Vuex 将会成为自然而然的选择。引用 Redux 的作者 Dan Abramov 的话说就是: diff --git a/docs/zh/guide/strict.md b/docs/zh/guide/strict.md index 38d856aad..fc6175b8e 100644 --- a/docs/zh/guide/strict.md +++ b/docs/zh/guide/strict.md @@ -13,7 +13,7 @@ const store = new Vuex.Store({ ### 开发环境与发布环境 -**不要在发布环境下启用严格模式!** 严格模式会深度监测状态树来检测不合规的状态变更——请确保在发布环境下关闭严格模式,以避免性能损失。 +**不要在发布环境下启用严格模式**!严格模式会深度监测状态树来检测不合规的状态变更——请确保在发布环境下关闭严格模式,以避免性能损失。 类似于插件,我们可以让构建工具来处理这种情况: From 13dc501587bca080b399ff3594146ccdcecadbe1 Mon Sep 17 00:00:00 2001 From: tomouchi Date: Mon, 25 Mar 2019 21:45:47 +0900 Subject: [PATCH 017/280] docs(ja): tweak code example (#1528) --- docs/ja/guide/hot-reload.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ja/guide/hot-reload.md b/docs/ja/guide/hot-reload.md index 8283537fd..8024f77f7 100644 --- a/docs/ja/guide/hot-reload.md +++ b/docs/ja/guide/hot-reload.md @@ -28,8 +28,8 @@ if (module.hot) { module.hot.accept(['./mutations', './modules/a'], () => { // 更新されたモジュールをインポートする // babel 6 のモジュール出力のため、ここでは .default を追加しなければならない - const newActions = require('./actions').default const newMutations = require('./mutations').default + const newModuleA = require('./modules/a').default // 新しいモジュールとミューテーションにスワップ store.hotUpdate({ mutations: newMutations, From 3f87e0ad9dd82eeaa757b59b79f5ed3011008f92 Mon Sep 17 00:00:00 2001 From: Bruno Soares Nepomuceno Date: Mon, 25 Mar 2019 09:47:59 -0300 Subject: [PATCH 018/280] =?UTF-8?q?docs(pt-br):=20Corre=C3=A7=C3=A3o=20de?= =?UTF-8?q?=20erro=20de=20digita=C3=A7=C3=A3o=20(#1527)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mudança de "argumetos" para "argumentos" --- docs-gitbook/pt-br/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs-gitbook/pt-br/getting-started.md b/docs-gitbook/pt-br/getting-started.md index 161937f78..8b3917833 100644 --- a/docs-gitbook/pt-br/getting-started.md +++ b/docs-gitbook/pt-br/getting-started.md @@ -34,7 +34,7 @@ store.commit('increment') console.log(store.state.count) // -> 1 ``` -Novamente, a razão pela qual estamos fazendo _commit_ de uma mutação em vez de mudar `store.state.count` diretamente, é porque queremos rastreá-la explicitamente. Esta convenção simples torna sua intenção mais explícita, de modo que você possa ter melhores argumetos sobre as mudanças de estado em seu aplicativo ao ler o código. Além disso, isso nos dá a oportunidade de implementar ferramentas que podem registrar cada mutação, tirar _snapshots_ de estado ou mesmo realizar depuração viajando pelo histórico de estado (_time travel_). +Novamente, a razão pela qual estamos fazendo _commit_ de uma mutação em vez de mudar `store.state.count` diretamente, é porque queremos rastreá-la explicitamente. Esta convenção simples torna sua intenção mais explícita, de modo que você possa ter melhores argumentos sobre as mudanças de estado em seu aplicativo ao ler o código. Além disso, isso nos dá a oportunidade de implementar ferramentas que podem registrar cada mutação, tirar _snapshots_ de estado ou mesmo realizar depuração viajando pelo histórico de estado (_time travel_). Usar o estado do _store_ em um componente simplesmente envolve o retorno do estado dentro de um dado computado, porque o estado do _store_ é reativo. Fazer alterações simplesmente significa fazer _commit_ de mutações nos métodos dos componentes. From d7c7f9844831f98c5c9aaca213746c4ccc5d6929 Mon Sep 17 00:00:00 2001 From: ziga Date: Wed, 10 Apr 2019 21:48:36 -0400 Subject: [PATCH 019/280] feat(esm build): build ES modules for browser (#1533) --- build/build.main.js | 17 ++++++++++------- build/configs.js | 21 +++++++++++++++++++-- package.json | 2 +- yarn.lock | 24 +++++++++++++++++++++++- 4 files changed, 53 insertions(+), 11 deletions(-) diff --git a/build/build.main.js b/build/build.main.js index bfd68446e..7f6e4e7ec 100644 --- a/build/build.main.js +++ b/build/build.main.js @@ -1,7 +1,7 @@ const fs = require('fs') const path = require('path') const zlib = require('zlib') -const uglify = require('uglify-js') +const terser = require('terser') const rollup = require('rollup') const configs = require('./configs') @@ -27,21 +27,24 @@ function build (builds) { } function buildEntry ({ input, output }) { - const isProd = /min\.js$/.test(output.file) + const { file, banner } = output + const isProd = /min\.js$/.test(file) return rollup.rollup(input) .then(bundle => bundle.generate(output)) .then(({ output: [{ code }] }) => { if (isProd) { - var minified = (output.banner ? output.banner + '\n' : '') + uglify.minify(code, { + const minified = (banner ? banner + '\n' : '') + terser.minify(code, { + toplevel: true, output: { - /* eslint-disable camelcase */ ascii_only: true - /* eslint-enable camelcase */ + }, + compress: { + pure_funcs: ['makeMap'] } }).code - return write(output.file, minified, true) + return write(file, minified, true) } else { - return write(output.file, code) + return write(file, code) } }) } diff --git a/build/configs.js b/build/configs.js index ebabe32ab..54c5f27df 100644 --- a/build/configs.js +++ b/build/configs.js @@ -33,6 +33,20 @@ const configs = { input: resolve('src/index.esm.js'), file: resolve('dist/vuex.esm.js'), format: 'es' + }, + 'esm-browser-dev': { + input: resolve('src/index.esm.js'), + file: resolve('dist/vuex.esm.browser.js'), + format: 'es', + env: 'development', + transpile: false + }, + 'esm-browser-prod': { + input: resolve('src/index.esm.js'), + file: resolve('dist/vuex.esm.browser.min.js'), + format: 'es', + env: 'production', + transpile: false } } @@ -43,8 +57,7 @@ function genConfig (opts) { plugins: [ replace({ __VERSION__: version - }), - buble() + }) ] }, output: { @@ -61,6 +74,10 @@ function genConfig (opts) { })) } + if (opts.transpile !== false) { + config.input.plugins.push(buble()) + } + return config } diff --git a/package.json b/package.json index 375ada242..675e1ee36 100644 --- a/package.json +++ b/package.json @@ -61,9 +61,9 @@ "rollup-plugin-buble": "^0.19.6", "rollup-plugin-replace": "^2.1.0", "selenium-server": "^2.53.1", + "terser": "^3.17.0", "todomvc-app-css": "^2.1.0", "typescript": "^3.2.2", - "uglify-js": "^3.1.2", "vue": "^2.5.22", "vue-loader": "^15.2.1", "vue-template-compiler": "^2.5.22", diff --git a/yarn.lock b/yarn.lock index 4602ea812..0871218f6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2729,6 +2729,11 @@ commander@^2.15.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== +commander@^2.19.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + common-tags@^1.4.0: version "1.8.0" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.0.tgz#8e3153e542d4a39e9b10554434afaaf98956a937" @@ -8406,6 +8411,14 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" +source-map-support@~0.5.10: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-support@~0.5.6: version "0.5.10" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.10.tgz#2214080bc9d51832511ee2bab96e3c2f9353120c" @@ -8825,6 +8838,15 @@ terser-webpack-plugin@^1.1.0: webpack-sources "^1.1.0" worker-farm "^1.5.2" +terser@^3.17.0: + version "3.17.0" + resolved "https://registry.yarnpkg.com/terser/-/terser-3.17.0.tgz#f88ffbeda0deb5637f9d24b0da66f4e15ab10cb2" + integrity sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== + dependencies: + commander "^2.19.0" + source-map "~0.6.1" + source-map-support "~0.5.10" + terser@^3.8.1: version "3.14.1" resolved "https://registry.yarnpkg.com/terser/-/terser-3.14.1.tgz#cc4764014af570bc79c79742358bd46926018a32" @@ -9057,7 +9079,7 @@ uc.micro@^1.0.1, uc.micro@^1.0.5: resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.5.tgz#0c65f15f815aa08b560a61ce8b4db7ffc3f45376" integrity sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg== -uglify-js@3.4.x, uglify-js@^3.1.2: +uglify-js@3.4.x: version "3.4.9" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3" integrity sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q== From cf090632f03d7fb88e456c4d37b1316650599aca Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Wed, 8 May 2019 23:24:12 +0200 Subject: [PATCH 020/280] [build] 3.1.1 --- dist/vuex.common.js | 23 +- dist/vuex.esm.browser.js | 969 +++++++++++++++++++++++++++++++++++ dist/vuex.esm.browser.min.js | 6 + dist/vuex.esm.js | 23 +- dist/vuex.js | 23 +- dist/vuex.min.js | 4 +- 6 files changed, 1028 insertions(+), 20 deletions(-) create mode 100644 dist/vuex.esm.browser.js create mode 100644 dist/vuex.esm.browser.min.js diff --git a/dist/vuex.common.js b/dist/vuex.common.js index 88436c580..28e5f9450 100644 --- a/dist/vuex.common.js +++ b/dist/vuex.common.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.0 + * vuex v3.1.1 * (c) 2019 Evan You * @license MIT */ @@ -41,9 +41,12 @@ function applyMixin (Vue) { } } -var devtoolHook = - typeof window !== 'undefined' && - window.__VUE_DEVTOOLS_GLOBAL_HOOK__; +var target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__; function devtoolPlugin (store) { if (!devtoolHook) { return } @@ -89,6 +92,12 @@ function assert (condition, msg) { if (!condition) { throw new Error(("[vuex] " + msg)) } } +function partial (fn, arg) { + return function () { + return fn(arg) + } +} + // Base data struct for store's module, package with some attribute and method var Module = function Module (rawModule, runtime) { this.runtime = runtime; @@ -550,7 +559,9 @@ function resetStoreVM (store, state, hot) { var computed = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism - computed[key] = function () { return fn(store); }; + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure enviroment. + computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: function () { return store._vm[key]; }, enumerable: true // for local getters @@ -989,7 +1000,7 @@ function getModuleByNamespace (store, helper, namespace) { var index = { Store: Store, install: install, - version: '3.1.0', + version: '3.1.1', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.esm.browser.js b/dist/vuex.esm.browser.js new file mode 100644 index 000000000..679a5d842 --- /dev/null +++ b/dist/vuex.esm.browser.js @@ -0,0 +1,969 @@ +/** + * vuex v3.1.1 + * (c) 2019 Evan You + * @license MIT + */ +function applyMixin (Vue) { + const version = Number(Vue.version.split('.')[0]); + + if (version >= 2) { + Vue.mixin({ beforeCreate: vuexInit }); + } else { + // override init and inject vuex init procedure + // for 1.x backwards compatibility. + const _init = Vue.prototype._init; + Vue.prototype._init = function (options = {}) { + options.init = options.init + ? [vuexInit].concat(options.init) + : vuexInit; + _init.call(this, options); + }; + } + + /** + * Vuex init hook, injected into each instances init hooks list. + */ + + function vuexInit () { + const options = this.$options; + // store injection + if (options.store) { + this.$store = typeof options.store === 'function' + ? options.store() + : options.store; + } else if (options.parent && options.parent.$store) { + this.$store = options.parent.$store; + } + } +} + +const target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +const devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__; + +function devtoolPlugin (store) { + if (!devtoolHook) return + + store._devtoolHook = devtoolHook; + + devtoolHook.emit('vuex:init', store); + + devtoolHook.on('vuex:travel-to-state', targetState => { + store.replaceState(targetState); + }); + + store.subscribe((mutation, state) => { + devtoolHook.emit('vuex:mutation', mutation, state); + }); +} + +/** + * Get the first item that pass the test + * by second argument function + * + * @param {Array} list + * @param {Function} f + * @return {*} + */ + +/** + * forEach for object + */ +function forEachValue (obj, fn) { + Object.keys(obj).forEach(key => fn(obj[key], key)); +} + +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} + +function isPromise (val) { + return val && typeof val.then === 'function' +} + +function assert (condition, msg) { + if (!condition) throw new Error(`[vuex] ${msg}`) +} + +function partial (fn, arg) { + return function () { + return fn(arg) + } +} + +// Base data struct for store's module, package with some attribute and method +class Module { + constructor (rawModule, runtime) { + this.runtime = runtime; + // Store some children item + this._children = Object.create(null); + // Store the origin module object which passed by programmer + this._rawModule = rawModule; + const rawState = rawModule.state; + + // Store the origin module's state + this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; + } + + get namespaced () { + return !!this._rawModule.namespaced + } + + addChild (key, module) { + this._children[key] = module; + } + + removeChild (key) { + delete this._children[key]; + } + + getChild (key) { + return this._children[key] + } + + update (rawModule) { + this._rawModule.namespaced = rawModule.namespaced; + if (rawModule.actions) { + this._rawModule.actions = rawModule.actions; + } + if (rawModule.mutations) { + this._rawModule.mutations = rawModule.mutations; + } + if (rawModule.getters) { + this._rawModule.getters = rawModule.getters; + } + } + + forEachChild (fn) { + forEachValue(this._children, fn); + } + + forEachGetter (fn) { + if (this._rawModule.getters) { + forEachValue(this._rawModule.getters, fn); + } + } + + forEachAction (fn) { + if (this._rawModule.actions) { + forEachValue(this._rawModule.actions, fn); + } + } + + forEachMutation (fn) { + if (this._rawModule.mutations) { + forEachValue(this._rawModule.mutations, fn); + } + } +} + +class ModuleCollection { + constructor (rawRootModule) { + // register root module (Vuex.Store options) + this.register([], rawRootModule, false); + } + + get (path) { + return path.reduce((module, key) => { + return module.getChild(key) + }, this.root) + } + + getNamespace (path) { + let module = this.root; + return path.reduce((namespace, key) => { + module = module.getChild(key); + return namespace + (module.namespaced ? key + '/' : '') + }, '') + } + + update (rawRootModule) { + update([], this.root, rawRootModule); + } + + register (path, rawModule, runtime = true) { + { + assertRawModule(path, rawModule); + } + + const newModule = new Module(rawModule, runtime); + if (path.length === 0) { + this.root = newModule; + } else { + const parent = this.get(path.slice(0, -1)); + parent.addChild(path[path.length - 1], newModule); + } + + // register nested modules + if (rawModule.modules) { + forEachValue(rawModule.modules, (rawChildModule, key) => { + this.register(path.concat(key), rawChildModule, runtime); + }); + } + } + + unregister (path) { + const parent = this.get(path.slice(0, -1)); + const key = path[path.length - 1]; + if (!parent.getChild(key).runtime) return + + parent.removeChild(key); + } +} + +function update (path, targetModule, newModule) { + { + assertRawModule(path, newModule); + } + + // update target module + targetModule.update(newModule); + + // update nested modules + if (newModule.modules) { + for (const key in newModule.modules) { + if (!targetModule.getChild(key)) { + { + console.warn( + `[vuex] trying to add a new module '${key}' on hot reloading, ` + + 'manual reload is needed' + ); + } + return + } + update( + path.concat(key), + targetModule.getChild(key), + newModule.modules[key] + ); + } + } +} + +const functionAssert = { + assert: value => typeof value === 'function', + expected: 'function' +}; + +const objectAssert = { + assert: value => typeof value === 'function' || + (typeof value === 'object' && typeof value.handler === 'function'), + expected: 'function or object with "handler" function' +}; + +const assertTypes = { + getters: functionAssert, + mutations: functionAssert, + actions: objectAssert +}; + +function assertRawModule (path, rawModule) { + Object.keys(assertTypes).forEach(key => { + if (!rawModule[key]) return + + const assertOptions = assertTypes[key]; + + forEachValue(rawModule[key], (value, type) => { + assert( + assertOptions.assert(value), + makeAssertionMessage(path, key, type, value, assertOptions.expected) + ); + }); + }); +} + +function makeAssertionMessage (path, key, type, value, expected) { + let buf = `${key} should be ${expected} but "${key}.${type}"`; + if (path.length > 0) { + buf += ` in module "${path.join('.')}"`; + } + buf += ` is ${JSON.stringify(value)}.`; + return buf +} + +let Vue; // bind on install + +class Store { + constructor (options = {}) { + // Auto install if it is not done yet and `window` has `Vue`. + // To allow users to avoid auto-installation in some cases, + // this code should be placed here. See #731 + if (!Vue && typeof window !== 'undefined' && window.Vue) { + install(window.Vue); + } + + { + assert(Vue, `must call Vue.use(Vuex) before creating a store instance.`); + assert(typeof Promise !== 'undefined', `vuex requires a Promise polyfill in this browser.`); + assert(this instanceof Store, `store must be called with the new operator.`); + } + + const { + plugins = [], + strict = false + } = options; + + // store internal state + this._committing = false; + this._actions = Object.create(null); + this._actionSubscribers = []; + this._mutations = Object.create(null); + this._wrappedGetters = Object.create(null); + this._modules = new ModuleCollection(options); + this._modulesNamespaceMap = Object.create(null); + this._subscribers = []; + this._watcherVM = new Vue(); + + // bind commit and dispatch to self + const store = this; + const { dispatch, commit } = this; + this.dispatch = function boundDispatch (type, payload) { + return dispatch.call(store, type, payload) + }; + this.commit = function boundCommit (type, payload, options) { + return commit.call(store, type, payload, options) + }; + + // strict mode + this.strict = strict; + + const state = this._modules.root.state; + + // init root module. + // this also recursively registers all sub-modules + // and collects all module getters inside this._wrappedGetters + installModule(this, state, [], this._modules.root); + + // initialize the store vm, which is responsible for the reactivity + // (also registers _wrappedGetters as computed properties) + resetStoreVM(this, state); + + // apply plugins + plugins.forEach(plugin => plugin(this)); + + const useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools; + if (useDevtools) { + devtoolPlugin(this); + } + } + + get state () { + return this._vm._data.$$state + } + + set state (v) { + { + assert(false, `use store.replaceState() to explicit replace store state.`); + } + } + + commit (_type, _payload, _options) { + // check object-style commit + const { + type, + payload, + options + } = unifyObjectStyle(_type, _payload, _options); + + const mutation = { type, payload }; + const entry = this._mutations[type]; + if (!entry) { + { + console.error(`[vuex] unknown mutation type: ${type}`); + } + return + } + this._withCommit(() => { + entry.forEach(function commitIterator (handler) { + handler(payload); + }); + }); + this._subscribers.forEach(sub => sub(mutation, this.state)); + + if ( + options && options.silent + ) { + console.warn( + `[vuex] mutation type: ${type}. Silent option has been removed. ` + + 'Use the filter functionality in the vue-devtools' + ); + } + } + + dispatch (_type, _payload) { + // check object-style dispatch + const { + type, + payload + } = unifyObjectStyle(_type, _payload); + + const action = { type, payload }; + const entry = this._actions[type]; + if (!entry) { + { + console.error(`[vuex] unknown action type: ${type}`); + } + return + } + + try { + this._actionSubscribers + .filter(sub => sub.before) + .forEach(sub => sub.before(action, this.state)); + } catch (e) { + { + console.warn(`[vuex] error in before action subscribers: `); + console.error(e); + } + } + + const result = entry.length > 1 + ? Promise.all(entry.map(handler => handler(payload))) + : entry[0](payload); + + return result.then(res => { + try { + this._actionSubscribers + .filter(sub => sub.after) + .forEach(sub => sub.after(action, this.state)); + } catch (e) { + { + console.warn(`[vuex] error in after action subscribers: `); + console.error(e); + } + } + return res + }) + } + + subscribe (fn) { + return genericSubscribe(fn, this._subscribers) + } + + subscribeAction (fn) { + const subs = typeof fn === 'function' ? { before: fn } : fn; + return genericSubscribe(subs, this._actionSubscribers) + } + + watch (getter, cb, options) { + { + assert(typeof getter === 'function', `store.watch only accepts a function.`); + } + return this._watcherVM.$watch(() => getter(this.state, this.getters), cb, options) + } + + replaceState (state) { + this._withCommit(() => { + this._vm._data.$$state = state; + }); + } + + registerModule (path, rawModule, options = {}) { + if (typeof path === 'string') path = [path]; + + { + assert(Array.isArray(path), `module path must be a string or an Array.`); + assert(path.length > 0, 'cannot register the root module by using registerModule.'); + } + + this._modules.register(path, rawModule); + installModule(this, this.state, path, this._modules.get(path), options.preserveState); + // reset store to update getters... + resetStoreVM(this, this.state); + } + + unregisterModule (path) { + if (typeof path === 'string') path = [path]; + + { + assert(Array.isArray(path), `module path must be a string or an Array.`); + } + + this._modules.unregister(path); + this._withCommit(() => { + const parentState = getNestedState(this.state, path.slice(0, -1)); + Vue.delete(parentState, path[path.length - 1]); + }); + resetStore(this); + } + + hotUpdate (newOptions) { + this._modules.update(newOptions); + resetStore(this, true); + } + + _withCommit (fn) { + const committing = this._committing; + this._committing = true; + fn(); + this._committing = committing; + } +} + +function genericSubscribe (fn, subs) { + if (subs.indexOf(fn) < 0) { + subs.push(fn); + } + return () => { + const i = subs.indexOf(fn); + if (i > -1) { + subs.splice(i, 1); + } + } +} + +function resetStore (store, hot) { + store._actions = Object.create(null); + store._mutations = Object.create(null); + store._wrappedGetters = Object.create(null); + store._modulesNamespaceMap = Object.create(null); + const state = store.state; + // init all modules + installModule(store, state, [], store._modules.root, true); + // reset vm + resetStoreVM(store, state, hot); +} + +function resetStoreVM (store, state, hot) { + const oldVm = store._vm; + + // bind store public getters + store.getters = {}; + const wrappedGetters = store._wrappedGetters; + const computed = {}; + forEachValue(wrappedGetters, (fn, key) => { + // use computed to leverage its lazy-caching mechanism + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure enviroment. + computed[key] = partial(fn, store); + Object.defineProperty(store.getters, key, { + get: () => store._vm[key], + enumerable: true // for local getters + }); + }); + + // use a Vue instance to store the state tree + // suppress warnings just in case the user has added + // some funky global mixins + const silent = Vue.config.silent; + Vue.config.silent = true; + store._vm = new Vue({ + data: { + $$state: state + }, + computed + }); + Vue.config.silent = silent; + + // enable strict mode for new vm + if (store.strict) { + enableStrictMode(store); + } + + if (oldVm) { + if (hot) { + // dispatch changes in all subscribed watchers + // to force getter re-evaluation for hot reloading. + store._withCommit(() => { + oldVm._data.$$state = null; + }); + } + Vue.nextTick(() => oldVm.$destroy()); + } +} + +function installModule (store, rootState, path, module, hot) { + const isRoot = !path.length; + const namespace = store._modules.getNamespace(path); + + // register in namespace map + if (module.namespaced) { + store._modulesNamespaceMap[namespace] = module; + } + + // set state + if (!isRoot && !hot) { + const parentState = getNestedState(rootState, path.slice(0, -1)); + const moduleName = path[path.length - 1]; + store._withCommit(() => { + Vue.set(parentState, moduleName, module.state); + }); + } + + const local = module.context = makeLocalContext(store, namespace, path); + + module.forEachMutation((mutation, key) => { + const namespacedType = namespace + key; + registerMutation(store, namespacedType, mutation, local); + }); + + module.forEachAction((action, key) => { + const type = action.root ? key : namespace + key; + const handler = action.handler || action; + registerAction(store, type, handler, local); + }); + + module.forEachGetter((getter, key) => { + const namespacedType = namespace + key; + registerGetter(store, namespacedType, getter, local); + }); + + module.forEachChild((child, key) => { + installModule(store, rootState, path.concat(key), child, hot); + }); +} + +/** + * make localized dispatch, commit, getters and state + * if there is no namespace, just use root ones + */ +function makeLocalContext (store, namespace, path) { + const noNamespace = namespace === ''; + + const local = { + dispatch: noNamespace ? store.dispatch : (_type, _payload, _options) => { + const args = unifyObjectStyle(_type, _payload, _options); + const { payload, options } = args; + let { type } = args; + + if (!options || !options.root) { + type = namespace + type; + if (!store._actions[type]) { + console.error(`[vuex] unknown local action type: ${args.type}, global type: ${type}`); + return + } + } + + return store.dispatch(type, payload) + }, + + commit: noNamespace ? store.commit : (_type, _payload, _options) => { + const args = unifyObjectStyle(_type, _payload, _options); + const { payload, options } = args; + let { type } = args; + + if (!options || !options.root) { + type = namespace + type; + if (!store._mutations[type]) { + console.error(`[vuex] unknown local mutation type: ${args.type}, global type: ${type}`); + return + } + } + + store.commit(type, payload, options); + } + }; + + // getters and state object must be gotten lazily + // because they will be changed by vm update + Object.defineProperties(local, { + getters: { + get: noNamespace + ? () => store.getters + : () => makeLocalGetters(store, namespace) + }, + state: { + get: () => getNestedState(store.state, path) + } + }); + + return local +} + +function makeLocalGetters (store, namespace) { + const gettersProxy = {}; + + const splitPos = namespace.length; + Object.keys(store.getters).forEach(type => { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) return + + // extract local getter type + const localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: () => store.getters[type], + enumerable: true + }); + }); + + return gettersProxy +} + +function registerMutation (store, type, handler, local) { + const entry = store._mutations[type] || (store._mutations[type] = []); + entry.push(function wrappedMutationHandler (payload) { + handler.call(store, local.state, payload); + }); +} + +function registerAction (store, type, handler, local) { + const entry = store._actions[type] || (store._actions[type] = []); + entry.push(function wrappedActionHandler (payload, cb) { + let res = handler.call(store, { + dispatch: local.dispatch, + commit: local.commit, + getters: local.getters, + state: local.state, + rootGetters: store.getters, + rootState: store.state + }, payload, cb); + if (!isPromise(res)) { + res = Promise.resolve(res); + } + if (store._devtoolHook) { + return res.catch(err => { + store._devtoolHook.emit('vuex:error', err); + throw err + }) + } else { + return res + } + }); +} + +function registerGetter (store, type, rawGetter, local) { + if (store._wrappedGetters[type]) { + { + console.error(`[vuex] duplicate getter key: ${type}`); + } + return + } + store._wrappedGetters[type] = function wrappedGetter (store) { + return rawGetter( + local.state, // local state + local.getters, // local getters + store.state, // root state + store.getters // root getters + ) + }; +} + +function enableStrictMode (store) { + store._vm.$watch(function () { return this._data.$$state }, () => { + { + assert(store._committing, `do not mutate vuex store state outside mutation handlers.`); + } + }, { deep: true, sync: true }); +} + +function getNestedState (state, path) { + return path.length + ? path.reduce((state, key) => state[key], state) + : state +} + +function unifyObjectStyle (type, payload, options) { + if (isObject(type) && type.type) { + options = payload; + payload = type; + type = type.type; + } + + { + assert(typeof type === 'string', `expects string as the type, but found ${typeof type}.`); + } + + return { type, payload, options } +} + +function install (_Vue) { + if (Vue && _Vue === Vue) { + { + console.error( + '[vuex] already installed. Vue.use(Vuex) should be called only once.' + ); + } + return + } + Vue = _Vue; + applyMixin(Vue); +} + +/** + * Reduce the code which written in Vue.js for getting the state. + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it. + * @param {Object} + */ +const mapState = normalizeNamespace((namespace, states) => { + const res = {}; + normalizeMap(states).forEach(({ key, val }) => { + res[key] = function mappedState () { + let state = this.$store.state; + let getters = this.$store.getters; + if (namespace) { + const module = getModuleByNamespace(this.$store, 'mapState', namespace); + if (!module) { + return + } + state = module.context.state; + getters = module.context.getters; + } + return typeof val === 'function' + ? val.call(this, state, getters) + : state[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for committing the mutation + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function. + * @return {Object} + */ +const mapMutations = normalizeNamespace((namespace, mutations) => { + const res = {}; + normalizeMap(mutations).forEach(({ key, val }) => { + res[key] = function mappedMutation (...args) { + // Get the commit method from store + let commit = this.$store.commit; + if (namespace) { + const module = getModuleByNamespace(this.$store, 'mapMutations', namespace); + if (!module) { + return + } + commit = module.context.commit; + } + return typeof val === 'function' + ? val.apply(this, [commit].concat(args)) + : commit.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for getting the getters + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} getters + * @return {Object} + */ +const mapGetters = normalizeNamespace((namespace, getters) => { + const res = {}; + normalizeMap(getters).forEach(({ key, val }) => { + // The namespace has been mutated by normalizeNamespace + val = namespace + val; + res[key] = function mappedGetter () { + if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { + return + } + if (!(val in this.$store.getters)) { + console.error(`[vuex] unknown getter: ${val}`); + return + } + return this.$store.getters[val] + }; + // mark vuex getter for devtools + res[key].vuex = true; + }); + return res +}); + +/** + * Reduce the code which written in Vue.js for dispatch the action + * @param {String} [namespace] - Module's namespace + * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function. + * @return {Object} + */ +const mapActions = normalizeNamespace((namespace, actions) => { + const res = {}; + normalizeMap(actions).forEach(({ key, val }) => { + res[key] = function mappedAction (...args) { + // get dispatch function from store + let dispatch = this.$store.dispatch; + if (namespace) { + const module = getModuleByNamespace(this.$store, 'mapActions', namespace); + if (!module) { + return + } + dispatch = module.context.dispatch; + } + return typeof val === 'function' + ? val.apply(this, [dispatch].concat(args)) + : dispatch.apply(this.$store, [val].concat(args)) + }; + }); + return res +}); + +/** + * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object + * @param {String} namespace + * @return {Object} + */ +const createNamespacedHelpers = (namespace) => ({ + mapState: mapState.bind(null, namespace), + mapGetters: mapGetters.bind(null, namespace), + mapMutations: mapMutations.bind(null, namespace), + mapActions: mapActions.bind(null, namespace) +}); + +/** + * Normalize the map + * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ] + * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ] + * @param {Array|Object} map + * @return {Object} + */ +function normalizeMap (map) { + return Array.isArray(map) + ? map.map(key => ({ key, val: key })) + : Object.keys(map).map(key => ({ key, val: map[key] })) +} + +/** + * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. + * @param {Function} fn + * @return {Function} + */ +function normalizeNamespace (fn) { + return (namespace, map) => { + if (typeof namespace !== 'string') { + map = namespace; + namespace = ''; + } else if (namespace.charAt(namespace.length - 1) !== '/') { + namespace += '/'; + } + return fn(namespace, map) + } +} + +/** + * Search a special module from store by namespace. if module not exist, print error message. + * @param {Object} store + * @param {String} helper + * @param {String} namespace + * @return {Object} + */ +function getModuleByNamespace (store, helper, namespace) { + const module = store._modulesNamespaceMap[namespace]; + if (!module) { + console.error(`[vuex] module namespace not found in ${helper}(): ${namespace}`); + } + return module +} + +var index_esm = { + Store, + install, + version: '3.1.1', + mapState, + mapMutations, + mapGetters, + mapActions, + createNamespacedHelpers +}; + +export default index_esm; +export { Store, install, mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers }; diff --git a/dist/vuex.esm.browser.min.js b/dist/vuex.esm.browser.min.js new file mode 100644 index 000000000..1261afbd1 --- /dev/null +++ b/dist/vuex.esm.browser.min.js @@ -0,0 +1,6 @@ +/** + * vuex v3.1.1 + * (c) 2019 Evan You + * @license MIT + */ +const t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(s=>e(t[s],s))}class s{constructor(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;const s=t.state;this.state=("function"==typeof s?s():s)||{}}get namespaced(){return!!this._rawModule.namespaced}addChild(t,e){this._children[t]=e}removeChild(t){delete this._children[t]}getChild(t){return this._children[t]}update(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)}forEachChild(t){e(this._children,t)}forEachGetter(t){this._rawModule.getters&&e(this._rawModule.getters,t)}forEachAction(t){this._rawModule.actions&&e(this._rawModule.actions,t)}forEachMutation(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)}}class i{constructor(t){this.register([],t,!1)}get(t){return t.reduce((t,e)=>t.getChild(e),this.root)}getNamespace(t){let e=this.root;return t.reduce((t,s)=>t+((e=e.getChild(s)).namespaced?s+"/":""),"")}update(t){!function t(e,s,i){s.update(i);if(i.modules)for(const o in i.modules){if(!s.getChild(o))return;t(e.concat(o),s.getChild(o),i.modules[o])}}([],this.root,t)}register(t,i,o=!0){const n=new s(i,o);if(0===t.length)this.root=n;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],n)}i.modules&&e(i.modules,(e,s)=>{this.register(t.concat(s),e,o)})}unregister(t){const e=this.get(t.slice(0,-1)),s=t[t.length-1];e.getChild(s).runtime&&e.removeChild(s)}}let o;class n{constructor(e={}){!o&&"undefined"!=typeof window&&window.Vue&&d(window.Vue);const{plugins:s=[],strict:n=!1}=e;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new i(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new o;const r=this,{dispatch:c,commit:h}=this;this.dispatch=function(t,e){return c.call(r,t,e)},this.commit=function(t,e,s){return h.call(r,t,e,s)},this.strict=n;const l=this._modules.root.state;u(this,l,[],this._modules.root),a(this,l),s.forEach(t=>t(this)),(void 0!==e.devtools?e.devtools:o.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",t=>{e.replaceState(t)}),e.subscribe((e,s)=>{t.emit("vuex:mutation",e,s)}))}(this)}get state(){return this._vm._data.$$state}set state(t){}commit(t,e,s){const{type:i,payload:o,options:n}=l(t,e,s),r={type:i,payload:o},c=this._mutations[i];c&&(this._withCommit(()=>{c.forEach(function(t){t(o)})}),this._subscribers.forEach(t=>t(r,this.state)))}dispatch(t,e){const{type:s,payload:i}=l(t,e),o={type:s,payload:i},n=this._actions[s];if(n){try{this._actionSubscribers.filter(t=>t.before).forEach(t=>t.before(o,this.state))}catch(t){}return(n.length>1?Promise.all(n.map(t=>t(i))):n[0](i)).then(t=>{try{this._actionSubscribers.filter(t=>t.after).forEach(t=>t.after(o,this.state))}catch(t){}return t})}}subscribe(t){return r(t,this._subscribers)}subscribeAction(t){return r("function"==typeof t?{before:t}:t,this._actionSubscribers)}watch(t,e,s){return this._watcherVM.$watch(()=>t(this.state,this.getters),e,s)}replaceState(t){this._withCommit(()=>{this._vm._data.$$state=t})}registerModule(t,e,s={}){"string"==typeof t&&(t=[t]),this._modules.register(t,e),u(this,this.state,t,this._modules.get(t),s.preserveState),a(this,this.state)}unregisterModule(t){"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(()=>{const e=h(this.state,t.slice(0,-1));o.delete(e,t[t.length-1])}),c(this)}hotUpdate(t){this._modules.update(t),c(this,!0)}_withCommit(t){const e=this._committing;this._committing=!0,t(),this._committing=e}}function r(t,e){return e.indexOf(t)<0&&e.push(t),()=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)}}function c(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);const s=t.state;u(t,s,[],t._modules.root,!0),a(t,s,e)}function a(t,s,i){const n=t._vm;t.getters={};const r=t._wrappedGetters,c={};e(r,(e,s)=>{c[s]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,s,{get:()=>t._vm[s],enumerable:!0})});const a=o.config.silent;o.config.silent=!0,t._vm=new o({data:{$$state:s},computed:c}),o.config.silent=a,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},()=>{},{deep:!0,sync:!0})}(t),n&&(i&&t._withCommit(()=>{n._data.$$state=null}),o.nextTick(()=>n.$destroy()))}function u(t,e,s,i,n){const r=!s.length,c=t._modules.getNamespace(s);if(i.namespaced&&(t._modulesNamespaceMap[c]=i),!r&&!n){const n=h(e,s.slice(0,-1)),r=s[s.length-1];t._withCommit(()=>{o.set(n,r,i.state)})}const a=i.context=function(t,e,s){const i=""===e,o={dispatch:i?t.dispatch:(s,i,o)=>{const n=l(s,i,o),{payload:r,options:c}=n;let{type:a}=n;return c&&c.root||(a=e+a),t.dispatch(a,r)},commit:i?t.commit:(s,i,o)=>{const n=l(s,i,o),{payload:r,options:c}=n;let{type:a}=n;c&&c.root||(a=e+a),t.commit(a,r,c)}};return Object.defineProperties(o,{getters:{get:i?()=>t.getters:()=>(function(t,e){const s={},i=e.length;return Object.keys(t.getters).forEach(o=>{if(o.slice(0,i)!==e)return;const n=o.slice(i);Object.defineProperty(s,n,{get:()=>t.getters[o],enumerable:!0})}),s})(t,e)},state:{get:()=>h(t.state,s)}}),o}(t,c,s);i.forEachMutation((e,s)=>{!function(t,e,s,i){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){s.call(t,i.state,e)})}(t,c+s,e,a)}),i.forEachAction((e,s)=>{const i=e.root?s:c+s,o=e.handler||e;!function(t,e,s,i){(t._actions[e]||(t._actions[e]=[])).push(function(e,o){let n=s.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e,o);var r;return(r=n)&&"function"==typeof r.then||(n=Promise.resolve(n)),t._devtoolHook?n.catch(e=>{throw t._devtoolHook.emit("vuex:error",e),e}):n})}(t,i,o,a)}),i.forEachGetter((e,s)=>{!function(t,e,s,i){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return s(i.state,i.getters,t.state,t.getters)}}(t,c+s,e,a)}),i.forEachChild((i,o)=>{u(t,e,s.concat(o),i,n)})}function h(t,e){return e.length?e.reduce((t,e)=>t[e],t):t}function l(t,e,s){var i;return null!==(i=t)&&"object"==typeof i&&t.type&&(s=e,e=t,t=t.type),{type:t,payload:e,options:s}}function d(t){o&&t===o||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{const s=t.prototype._init;t.prototype._init=function(t={}){t.init=t.init?[e].concat(t.init):e,s.call(this,t)}}function e(){const t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(o=t)}const p=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{s[e]=function(){let e=this.$store.state,s=this.$store.getters;if(t){const i=w(this.$store,"mapState",t);if(!i)return;e=i.context.state,s=i.context.getters}return"function"==typeof i?i.call(this,e,s):e[i]},s[e].vuex=!0}),s}),m=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.commit;if(t){const e=w(this.$store,"mapMutations",t);if(!e)return;s=e.context.commit}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),f=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{i=t+i,s[e]=function(){if(!t||w(this.$store,"mapGetters",t))return this.$store.getters[i]},s[e].vuex=!0}),s}),_=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.dispatch;if(t){const e=w(this.$store,"mapActions",t);if(!e)return;s=e.context.dispatch}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),g=t=>({mapState:p.bind(null,t),mapGetters:f.bind(null,t),mapMutations:m.bind(null,t),mapActions:_.bind(null,t)});function y(t){return Array.isArray(t)?t.map(t=>({key:t,val:t})):Object.keys(t).map(e=>({key:e,val:t[e]}))}function b(t){return(e,s)=>("string"!=typeof e?(s=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,s))}function w(t,e,s){return t._modulesNamespaceMap[s]}export default{Store:n,install:d,version:"3.1.1",mapState:p,mapMutations:m,mapGetters:f,mapActions:_,createNamespacedHelpers:g};export{n as Store,d as install,p as mapState,m as mapMutations,f as mapGetters,_ as mapActions,g as createNamespacedHelpers}; \ No newline at end of file diff --git a/dist/vuex.esm.js b/dist/vuex.esm.js index da94e9b59..982977b7a 100644 --- a/dist/vuex.esm.js +++ b/dist/vuex.esm.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.0 + * vuex v3.1.1 * (c) 2019 Evan You * @license MIT */ @@ -39,9 +39,12 @@ function applyMixin (Vue) { } } -var devtoolHook = - typeof window !== 'undefined' && - window.__VUE_DEVTOOLS_GLOBAL_HOOK__; +var target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; +var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__; function devtoolPlugin (store) { if (!devtoolHook) { return } @@ -87,6 +90,12 @@ function assert (condition, msg) { if (!condition) { throw new Error(("[vuex] " + msg)) } } +function partial (fn, arg) { + return function () { + return fn(arg) + } +} + // Base data struct for store's module, package with some attribute and method var Module = function Module (rawModule, runtime) { this.runtime = runtime; @@ -548,7 +557,9 @@ function resetStoreVM (store, state, hot) { var computed = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism - computed[key] = function () { return fn(store); }; + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure enviroment. + computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: function () { return store._vm[key]; }, enumerable: true // for local getters @@ -987,7 +998,7 @@ function getModuleByNamespace (store, helper, namespace) { var index_esm = { Store: Store, install: install, - version: '3.1.0', + version: '3.1.1', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.js b/dist/vuex.js index bae565303..8ac0fe0dc 100644 --- a/dist/vuex.js +++ b/dist/vuex.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.0 + * vuex v3.1.1 * (c) 2019 Evan You * @license MIT */ @@ -45,9 +45,12 @@ } } - var devtoolHook = - typeof window !== 'undefined' && - window.__VUE_DEVTOOLS_GLOBAL_HOOK__; + var target = typeof window !== 'undefined' + ? window + : typeof global !== 'undefined' + ? global + : {}; + var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__; function devtoolPlugin (store) { if (!devtoolHook) { return } @@ -93,6 +96,12 @@ if (!condition) { throw new Error(("[vuex] " + msg)) } } + function partial (fn, arg) { + return function () { + return fn(arg) + } + } + // Base data struct for store's module, package with some attribute and method var Module = function Module (rawModule, runtime) { this.runtime = runtime; @@ -553,7 +562,9 @@ var computed = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism - computed[key] = function () { return fn(store); }; + // direct inline function use will lead to closure preserving oldVm. + // using partial to return function with only arguments preserved in closure enviroment. + computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: function () { return store._vm[key]; }, enumerable: true // for local getters @@ -992,7 +1003,7 @@ var index = { Store: Store, install: install, - version: '3.1.0', + version: '3.1.1', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.min.js b/dist/vuex.min.js index 15b9039cc..787aee830 100644 --- a/dist/vuex.min.js +++ b/dist/vuex.min.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.0 + * vuex v3.1.1 * (c) 2019 Evan You * @license MIT */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var u="undefined"!=typeof window&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function a(e,n){Object.keys(e).forEach(function(t){return n(e[t],t)})}var r=function(t,e){this.runtime=e,this._children=Object.create(null);var n=(this._rawModule=t).state;this.state=("function"==typeof n?n():n)||{}},t={namespaced:{configurable:!0}};t.namespaced.get=function(){return!!this._rawModule.namespaced},r.prototype.addChild=function(t,e){this._children[t]=e},r.prototype.removeChild=function(t){delete this._children[t]},r.prototype.getChild=function(t){return this._children[t]},r.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},r.prototype.forEachChild=function(t){a(this._children,t)},r.prototype.forEachGetter=function(t){this._rawModule.getters&&a(this._rawModule.getters,t)},r.prototype.forEachAction=function(t){this._rawModule.actions&&a(this._rawModule.actions,t)},r.prototype.forEachMutation=function(t){this._rawModule.mutations&&a(this._rawModule.mutations,t)},Object.defineProperties(r.prototype,t);var m,f=function(t){this.register([],t,!1)};f.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},f.prototype.getNamespace=function(t){var n=this.root;return t.reduce(function(t,e){return t+((n=n.getChild(e)).namespaced?e+"/":"")},"")},f.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},f.prototype.register=function(n,t,o){var i=this;void 0===o&&(o=!0);var e=new r(t,o);0===n.length?this.root=e:this.get(n.slice(0,-1)).addChild(n[n.length-1],e);t.modules&&a(t.modules,function(t,e){i.register(n.concat(e),t,o)})},f.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var e=function(t){var e=this;void 0===t&&(t={}),!m&&"undefined"!=typeof window&&window.Vue&&p(window.Vue);var n=t.plugins;void 0===n&&(n=[]);var o=t.strict;void 0===o&&(o=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new f(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new m;var i=this,r=this.dispatch,s=this.commit;this.dispatch=function(t,e){return r.call(i,t,e)},this.commit=function(t,e,n){return s.call(i,t,e,n)},this.strict=o;var a,c=this._modules.root.state;v(this,c,[],this._modules.root),h(this,c),n.forEach(function(t){return t(e)}),(void 0!==t.devtools?t.devtools:m.config.devtools)&&(a=this,u&&((a._devtoolHook=u).emit("vuex:init",a),u.on("vuex:travel-to-state",function(t){a.replaceState(t)}),a.subscribe(function(t,e){u.emit("vuex:mutation",t,e)})))},n={state:{configurable:!0}};function o(e,n){return n.indexOf(e)<0&&n.push(e),function(){var t=n.indexOf(e);-1-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),f(t,n,e)}function f(t,n,o){var r=t._vm;t.getters={};var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=i.config.silent;i.config.silent=!0,t._vm=new i({data:{$$state:n},computed:a}),i.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),r&&(o&&t._withCommit(function(){r._data.$$state=null}),i.nextTick(function(){return r.$destroy()}))}function p(t,e,n,o,r){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a]=o),!s&&!r){var c=h(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){i.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),n}(t,e)}},state:{get:function(){return h(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var r,s=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e,i);return(r=s)&&"function"==typeof r.then||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):s})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,i){p(t,e,n.concat(i),o,r)})}function h(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function l(t,e,n){var o;return null!==(o=t)&&"object"==typeof o&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function d(t){i&&t===i||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(i=t)}a.state.get=function(){return this._vm._data.$$state},a.state.set=function(t){},s.prototype.commit=function(t,e,n){var o=this,i=l(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},s.prototype.dispatch=function(t,e){var n=this,o=l(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},s.prototype.subscribe=function(t){return c(t,this._subscribers)},s.prototype.subscribeAction=function(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)},s.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},s.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),f(this,this.state)},s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=h(e.state,t.slice(0,-1));i.delete(n,t[t.length-1])}),u(this)},s.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(s.prototype,a);var m=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=w(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),v=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=w(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),_=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||w(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),y=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=w(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function g(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function b(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function w(t,e,n){return t._modulesNamespaceMap[n]}return{Store:s,install:d,version:"3.1.1",mapState:m,mapMutations:v,mapGetters:_,mapActions:y,createNamespacedHelpers:function(t){return{mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:v.bind(null,t),mapActions:y.bind(null,t)}}}}); \ No newline at end of file From ffc7d00314a371c09d288bc5123793031d182cd2 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Wed, 8 May 2019 23:24:12 +0200 Subject: [PATCH 021/280] [release] 3.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 675e1ee36..23f421901 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuex", - "version": "3.1.0", + "version": "3.1.1", "description": "state management for Vue.js", "main": "dist/vuex.common.js", "module": "dist/vuex.esm.js", From 7f0cdb2722f63bc2014e7fd0bfd4b35ab8a2eac2 Mon Sep 17 00:00:00 2001 From: Stuart Date: Tue, 21 May 2019 11:49:46 +0100 Subject: [PATCH 022/280] docs: Update README.md (#1555) minor typo --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 905874b95..3c5ea191f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -50,7 +50,7 @@ For problem one, passing props can be tedious for deeply nested components, and So why don't we extract the shared state out of the components, and manage it in a global singleton? With this, our component tree becomes a big "view", and any component can access the state or trigger actions, no matter where they are in the tree! -By defining and separating the concepts involved in state management and enforcing rules that maintain independece between views and states, we give our code more structure and maintainability. +By defining and separating the concepts involved in state management and enforcing rules that maintain independence between views and states, we give our code more structure and maintainability. This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. From 91f3e69ed9e290cf91f8885c6d5ae2c97fa7ab81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B4=8B?= <1909457483@qq.com> Date: Wed, 22 May 2019 10:28:11 +0800 Subject: [PATCH 023/280] =?UTF-8?q?fix:=20add=20warnings=20when=20the=20di?= =?UTF-8?q?fferent=20namespaced=20modules=20has=20the=20same=20names?= =?UTF-8?q?=E2=80=A6=20(#1554)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add warnings when the different namespaced modules has the same namespace * Add warnings when duplicate namespace for different namespaced modules * Add warnings when duplicate namespace, merge if --- src/store.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store.js b/src/store.js index a79252b50..b32d7b0ad 100644 --- a/src/store.js +++ b/src/store.js @@ -301,6 +301,9 @@ function installModule (store, rootState, path, module, hot) { // register in namespace map if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && process.env.NODE_ENV !== 'production') { + console.error(`[vuex] duplicate namespace ${namespace} for the namespaced module ${path.join('/')}`) + } store._modulesNamespaceMap[namespace] = module } From de06f76380e7429489c0eb15acc8e0b34a383860 Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Tue, 13 Aug 2019 04:15:31 +0200 Subject: [PATCH 024/280] fix(docs): Clearify state object type (#1601) --- docs/guide/state.md | 2 ++ docs/ptbr/guide/state.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/guide/state.md b/docs/guide/state.md index b89c39bc9..584b9db3d 100644 --- a/docs/guide/state.md +++ b/docs/guide/state.md @@ -8,6 +8,8 @@ Vuex uses a **single state tree** - that is, this single object contains all you The single state tree does not conflict with modularity - in later chapters we will discuss how to split your state and mutations into sub modules. +The data you store in Vuex follows the same rules as the `data` in a Vue instance, ie the state object must be plain. **See also:** [Vue#data](https://vuejs.org/v2/api/#data). + ### Getting Vuex State into Vue Components So how do we display state inside the store in our Vue components? Since Vuex stores are reactive, the simplest way to "retrieve" state from it is simply returning some store state from within a [computed property](https://vuejs.org/guide/computed.html): diff --git a/docs/ptbr/guide/state.md b/docs/ptbr/guide/state.md index 2f4ec24b3..676c2905f 100644 --- a/docs/ptbr/guide/state.md +++ b/docs/ptbr/guide/state.md @@ -8,6 +8,8 @@ O Vuex usa uma **árvore única de estado** - ou seja, esse único objeto conté A árvore única de estado não entra em conflito com a modularidade - em capítulos posteriores, discutiremos como dividir seu estado e mutações em sub-módulos. +O tipo de dados guardados no Vuex segue as mesmas regras que `data` em instâncias Vue, ou seja o _state_ têm de ser um objeto simples. [Detalhes](https://br.vuejs.org/v2/api/index.html#data) + ### Obtendo o Estado Vuex nos Componentes Vue Então, como exibimos o estado dentro do _store_ em nossos componentes Vue? Uma vez que os _stores_ Vuex são reativos, a maneira mais simples de "recuperar" o estado é simplesmente retornar algum estado do _store_ dentro de um [dado computado](https://br.vuejs.org/v2/guide/computed.html): From f8fb76d9fbf02311ef39f812b8fa42c536982f11 Mon Sep 17 00:00:00 2001 From: Alexander Sokolov Date: Wed, 14 Aug 2019 04:07:00 +0300 Subject: [PATCH 025/280] docs: [RU] Translation update (#1602) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * structure.md исправлена опечатка * actions.md мелкие правки * api.md мелкие правки * intro.md мелкие правки * state.md мелкие правки * strict.md мелкие правки * testing.md мелкие правки * actions.md правки * testing.md правки * Fix typos. ru * SUMMARY.md правки заголовков * Минусы на тире * [RU] Moved to VuePress * Fix & single quotes * [RU] Update * Remove settings.json * fix link * fix images links * translated ru image and ai sources * Localized images * README.md исправлена ссылка * api: formatting example * api: fix links * docs: remove core-concepts.md * modules.md правка примеров * docs: [RU] fix links anchors * docs: (ru) plugins.md fix * api.md добавлен devtools * api.md добавлена ссылка * api.md обновление * installation.md обновление * README.md обновление * getting-started.md удален, дубль * README.md обновление * installation.md изменена ссылка * README.md правка * state.md обновление * state.md правки * getters.md правки * README.md fix * state.md fix * state.md правки * hot-reload.md правка * mutations.md правка * README.md add video-preview component * api/README.md added about subscribeAction before/after * modules.md update * README.md update * README.md fix * state.md update * mutations.md fix --- docs/ru/README.md | 4 ++-- docs/ru/guide/mutations.md | 2 +- docs/ru/guide/state.md | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/ru/README.md b/docs/ru/README.md index d8523f05b..25a44203a 100644 --- a/docs/ru/README.md +++ b/docs/ru/README.md @@ -50,7 +50,7 @@ new Vue({ Так почему бы не вынести всё общее состояние приложения из компонентов и управлять им в глобальном синглтоне? При этом наше дерево компонентов становится одним большим «представлением» и любой компонент может получить доступ к состоянию приложения или вызывать действия для изменения состояния, независимо от того, где они находятся в дереве! -Кроме того, чётко определяя и разделяя концепции, возникающие при управлении состоянием, и требуя соблюдения определённых правил, мы лучше структурируем код и облегчаем его поддержку. +Чётко определяя и разделяя концепции, возникающие при управлении состоянием, и требуя соблюдения определённых правил, которые поддерживают независимость между представлениями и состояниями, мы лучше структурируем код и облегчаем его поддержку. Это основная идея Vuex, вдохновлённого [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) и [Архитектурой Elm](https://guide.elm-lang.org/architecture/). В отличие от других паттернов, Vuex реализован в виде библиотеки, специально предназначенной для Vue.js, чтобы использовать его систему реактивности для эффективного обновления. @@ -60,7 +60,7 @@ new Vue({ ### Когда следует использовать Vuex? -Хотя Vuex помогает управлять совместно используемым состоянием, это реализуется ценой привнесения новых концепций и вспомогательного кода. Компромисс, когда кратковременная продуктивность страдает на благо долгосрочной. +Vuex помогает управлять совместно используемым состоянием, ценой привнесения новых концепций и вспомогательного кода. Компромисс, когда кратковременная продуктивность страдает на благо долгосрочной. Если ещё не приходилось создавать крупные SPA и вы лишь знакомитесь с Vuex, это может показаться многословным и сложным. Всё в порядке — простые приложения могут легко обходиться и без Vuex. Возможно, будет достаточно простого паттерна [глобальной шины событий](https://ru.vuejs.org/v2/guide/state-management.html#Простой-контейнер-состояния-с-нуля). Но если вы создаёте SPA среднего или крупного размера, то, скорее всего, уже сталкивались с ситуациями, которые заставляли задуматься о том, как лучше управлять состоянием вне компонентов Vue, а Vuex в таком случае может стать вполне естественным следующим шагом. Есть хорошая цитата от Дэна Абрамова, автора Redux: diff --git a/docs/ru/guide/mutations.md b/docs/ru/guide/mutations.md index 81033830a..cfca0198e 100644 --- a/docs/ru/guide/mutations.md +++ b/docs/ru/guide/mutations.md @@ -141,7 +141,7 @@ mutations: { ### Вызов мутаций в компонентах -Мутации можно вызывать из кода компонентов, используя `this.$store.commit('xxx')`, или применяя хелпер `mapMutations`, который проксирует вызовы `store.commit` через методы компонентов (для этого требуется наличие корневой ссылки на хранилище `$store`): +Мутации можно вызывать из кода компонентов, используя `this.$store.commit('xxx')`, или применяя вспомогательный метод `mapMutations`, который проксирует вызовы `store.commit` через методы компонентов (для этого требуется наличие корневой ссылки на хранилище `$store`): ```js import { mapMutations } from 'vuex'; diff --git a/docs/ru/guide/state.md b/docs/ru/guide/state.md index 462d66457..25c064ab2 100644 --- a/docs/ru/guide/state.md +++ b/docs/ru/guide/state.md @@ -8,6 +8,8 @@ Vuex использует **единое дерево состояния** — Единое дерево состояния не противоречит модульности — в следующих главах мы изучим, как можно разделить состояние и мутации на под-модули. +Данные, которые хранятся во Vuex должны следовать тем же правилам, что и `data` в экземпляре Vue, т.е. объект состояния должен быть простым. **См. также:** [Vue#data](https://ru.vuejs.org/v2/api/#data). + ### Использование состояния Vuex в компонентах Vue Итак, как использовать состояние хранилища в компонентах Vue? Поскольку хранилище Vuex реактивно, самый простой способ «получения» — просто вернуть часть состояния хранилища в [вычисляемом свойстве](https://ru.vuejs.org/v2/guide/computed.html): From 2257036aaa020b96eb52f507b65b1c292a6732e1 Mon Sep 17 00:00:00 2001 From: Alexander Sokolov Date: Wed, 21 Aug 2019 15:42:03 +0300 Subject: [PATCH 026/280] docs: [RU] Example syntax fixes (#1607) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * structure.md исправлена опечатка * actions.md мелкие правки * api.md мелкие правки * intro.md мелкие правки * state.md мелкие правки * strict.md мелкие правки * testing.md мелкие правки * actions.md правки * testing.md правки * Fix typos. ru * SUMMARY.md правки заголовков * Минусы на тире * [RU] Moved to VuePress * Fix & single quotes * [RU] Update * Remove settings.json * fix link * fix images links * translated ru image and ai sources * Localized images * README.md исправлена ссылка * api: formatting example * api: fix links * docs: remove core-concepts.md * modules.md правка примеров * docs: [RU] fix links anchors * docs: (ru) plugins.md fix * api.md добавлен devtools * api.md добавлена ссылка * api.md обновление * installation.md обновление * README.md обновление * getting-started.md удален, дубль * README.md обновление * installation.md изменена ссылка * README.md правка * state.md обновление * state.md правки * getters.md правки * README.md fix * state.md fix * state.md правки * hot-reload.md правка * mutations.md правка * README.md add video-preview component * api/README.md added about subscribeAction before/after * modules.md update * README.md update * README.md fix * state.md update * mutations.md fix * getters.md fix * docs: (ru) README.md fix typo --- docs/ru/guide/README.md | 2 +- docs/ru/guide/getters.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ru/guide/README.md b/docs/ru/guide/README.md index a20c0acad..5c9600923 100644 --- a/docs/ru/guide/README.md +++ b/docs/ru/guide/README.md @@ -39,7 +39,7 @@ console.log(store.state.count) // -> 1 Запомните, причина, по которой мы вызываем мутацию, вместо изменения `store.state.count` напрямую, в том, что мы хотим явным образом отслеживать её. Это простое соглашение делает наше намерение более явным, что упрощает понимание происходящих изменений состояния приложения при чтении кода. Кроме того, это позволяет использовать инструменты для отслеживания каждой мутации, создания снимков состояния или даже использования «машины времени» для отладки. -Использование состояние хранилища в компоненте предполагает просто возврат необходимой части состояния в вычисляемом свойстве, поскольку состояние хранилища реактивно. Инициирование изменений — это просто запуск мутаций в методах компонентов. +Использование состояния хранилища в компоненте предполагает просто возврат необходимой части состояния в вычисляемом свойстве, поскольку состояние хранилища реактивно. Инициирование изменений — это просто запуск мутаций в методах компонентов. Вот пример [простейшего приложения Vuex, реализующего счётчик](https://jsfiddle.net/n9jmu5v7/1269/). diff --git a/docs/ru/guide/getters.md b/docs/ru/guide/getters.md index e0f126ef0..b04f228d6 100644 --- a/docs/ru/guide/getters.md +++ b/docs/ru/guide/getters.md @@ -49,7 +49,7 @@ getters: { // ... doneTodosCount: (state, getters) => { return getters.doneTodos.length; - }; + } } ``` @@ -78,7 +78,7 @@ getters: { // ... getTodoById: state => id => { return state.todos.find(todo => todo.id === id); - }; + } } ``` From a5dd20cfafe3eea20b77b9647dcd967b42d75d89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=BF=8A=E6=9D=B0?= <287150625@qq.com> Date: Wed, 4 Sep 2019 12:16:03 +0800 Subject: [PATCH 027/280] docs(zh): fix typo (#1612) --- docs/zh/guide/modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/zh/guide/modules.md b/docs/zh/guide/modules.md index 72950239f..195b8b6ae 100644 --- a/docs/zh/guide/modules.md +++ b/docs/zh/guide/modules.md @@ -134,7 +134,7 @@ const store = new Vuex.Store({ #### 在带命名空间的模块内访问全局内容(Global Assets) -如果你希望使用全局 state 和 getter,`rootState` 和 `rootGetter` 会作为第三和第四参数传入 getter,也会通过 `context` 对象的属性传入 action。 +如果你希望使用全局 state 和 getter,`rootState` 和 `rootGetters` 会作为第三和第四参数传入 getter,也会通过 `context` 对象的属性传入 action。 若需要在全局命名空间内分发 action 或提交 mutation,将 `{ root: true }` 作为第三参数传给 `dispatch` 或 `commit` 即可。 From 91aa727d42f05cc2d25c42cbde542f66026866cf Mon Sep 17 00:00:00 2001 From: Ben Turner <7623873+ben-turner@users.noreply.github.com> Date: Wed, 18 Sep 2019 23:00:05 -0700 Subject: [PATCH 028/280] docs: Update link to flux in README (#1582) * Update link to flux in README The current link to flux is broken. Looks like the paths have been updated to not include a file extension. * Update link in other languages --- docs-gitbook/fr/intro.md | 2 +- docs-gitbook/ja/intro.md | 2 +- docs-gitbook/kr/intro.md | 2 +- docs-gitbook/pt-br/intro.md | 2 +- docs-gitbook/ru/intro.md | 2 +- docs/README.md | 2 +- docs/fr/README.md | 2 +- docs/ja/README.md | 2 +- docs/kr/README.md | 2 +- docs/ptbr/README.md | 2 +- docs/ru/README.md | 2 +- docs/zh/README.md | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs-gitbook/fr/intro.md b/docs-gitbook/fr/intro.md index ab933b401..0c4c6bd84 100644 --- a/docs-gitbook/fr/intro.md +++ b/docs-gitbook/fr/intro.md @@ -50,7 +50,7 @@ Alors pourquoi ne pas extraire l'état global partagé des composants, et le gé De plus, en définissant et en séparant les concepts impliqués dans la gestion de l'état global et en appliquant certaines règles, on donne aussi une structure et une maintenabilité à notre code. -Voilà l'idée de base derrière Vuex, inspiré par [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) et [l'architecture Elm](https://guide.elm-lang.org/architecture/). À l'inverse des autres modèles, Vuex est aussi une bibliothèque d'implémentation conçue spécialement pour Vue.js afin de bénéficier de son système de réactivité granulaire pour des modifications efficaces. +Voilà l'idée de base derrière Vuex, inspiré par [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) et [l'architecture Elm](https://guide.elm-lang.org/architecture/). À l'inverse des autres modèles, Vuex est aussi une bibliothèque d'implémentation conçue spécialement pour Vue.js afin de bénéficier de son système de réactivité granulaire pour des modifications efficaces. ![vuex](./images/vuex.png) diff --git a/docs-gitbook/ja/intro.md b/docs-gitbook/ja/intro.md index a7a093307..8a7df9003 100644 --- a/docs-gitbook/ja/intro.md +++ b/docs-gitbook/ja/intro.md @@ -52,7 +52,7 @@ new Vue({ さらに、状態管理に関わる概念を定義、分離し、特定のルールを敷くことで、コードの構造と保守性を向上させることができます。 -これが Vuex の背景にある基本的なアイディアであり、[Flux](https://facebook.github.io/flux/docs/overview.html)、 [Redux](http://redux.js.org/) そして [The Elm Architecture](https://guide.elm-lang.org/architecture/)から影響を受けています。 +これが Vuex の背景にある基本的なアイディアであり、[Flux](https://facebook.github.io/flux/docs/overview)、 [Redux](http://redux.js.org/) そして [The Elm Architecture](https://guide.elm-lang.org/architecture/)から影響を受けています。 他のパターンと異なるのは、Vuex は効率的な更新のために、Vue.js の粒度の細かいリアクティビティシステムを利用するよう特別に調整して実装されたライブラリだということです。 ![vuex](./images/vuex.png) diff --git a/docs-gitbook/kr/intro.md b/docs-gitbook/kr/intro.md index 1150ea3d9..41f53d77b 100644 --- a/docs-gitbook/kr/intro.md +++ b/docs-gitbook/kr/intro.md @@ -50,7 +50,7 @@ new Vue({ 또한 상태 관리 및 특정 규칙 적용과 관련된 개념을 정의하고 분리함으로써 코드의 구조와 유지 관리 기능을 향상시킵니다. -이는 [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/), [The Elm Architecture](https://guide.elm-lang.org/architecture/)에서 영감을 받은 Vuex의 기본 아이디어 입니다. 다른 패턴과 달리 Vuex는 Vue.js가 효율적인 업데이트를 위해 세분화된 반응 시스템을 활용하도록 특별히 고안된 라이브러리입니다. +이는 [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/), [The Elm Architecture](https://guide.elm-lang.org/architecture/)에서 영감을 받은 Vuex의 기본 아이디어 입니다. 다른 패턴과 달리 Vuex는 Vue.js가 효율적인 업데이트를 위해 세분화된 반응 시스템을 활용하도록 특별히 고안된 라이브러리입니다. ![vuex](./images/vuex.png) diff --git a/docs-gitbook/pt-br/intro.md b/docs-gitbook/pt-br/intro.md index 2348be4ea..8358047b4 100644 --- a/docs-gitbook/pt-br/intro.md +++ b/docs-gitbook/pt-br/intro.md @@ -50,7 +50,7 @@ Então, por que não extraímos o estado compartilhado dos componentes e gerenci Além disso, definindo e separando os conceitos envolvidos na gestão do estado e aplicando certas regras, também damos ao nosso código mais estrutura e capacidade de manutenção. Esta é a idéia básica por trás do Vuex, inspirada por - [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) e [The Elm Architecture](https://guide.elm-lang.org/architecture/). Ao contrário dos outros padrões, o Vuex também é uma implementação de biblioteca adaptada especificamente para Vue.js para aproveitar seu sistema de reatividade granular para atualizações eficientes. + [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) e [The Elm Architecture](https://guide.elm-lang.org/architecture/). Ao contrário dos outros padrões, o Vuex também é uma implementação de biblioteca adaptada especificamente para Vue.js para aproveitar seu sistema de reatividade granular para atualizações eficientes. ![vuex](./images/vuex.png) diff --git a/docs-gitbook/ru/intro.md b/docs-gitbook/ru/intro.md index 722941ba2..bc38dda93 100644 --- a/docs-gitbook/ru/intro.md +++ b/docs-gitbook/ru/intro.md @@ -50,7 +50,7 @@ new Vue({ Кроме того, чётко определяя и разделяя концепции, возникающие при управлении состоянием, и требуя соблюдения некоторых правил, мы улучшаем структурированность и поддерживаемость нашего кода. -Такова основная идея, лежащая в основе Vuex, вдохновлённого [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) и [Архитектурой Elm](https://guide.elm-lang.org/architecture/). В отличие от других паттернов, Vuex реализован в виде библиотеки, специально заточенной на использование совместно с Vue.js и использующей его производительную систему реактивных обновлений. +Такова основная идея, лежащая в основе Vuex, вдохновлённого [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) и [Архитектурой Elm](https://guide.elm-lang.org/architecture/). В отличие от других паттернов, Vuex реализован в виде библиотеки, специально заточенной на использование совместно с Vue.js и использующей его производительную систему реактивных обновлений. ![vuex](./images/vuex.png) diff --git a/docs/README.md b/docs/README.md index 3c5ea191f..e6012ac77 100644 --- a/docs/README.md +++ b/docs/README.md @@ -52,7 +52,7 @@ So why don't we extract the shared state out of the components, and manage it in By defining and separating the concepts involved in state management and enforcing rules that maintain independence between views and states, we give our code more structure and maintainability. -This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. +This is the basic idea behind Vuex, inspired by [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) and [The Elm Architecture](https://guide.elm-lang.org/architecture/). Unlike the other patterns, Vuex is also a library implementation tailored specifically for Vue.js to take advantage of its granular reactivity system for efficient updates. If you want to learn Vuex in an interactive way you can check out this [Vuex course on Scrimba](https://scrimba.com/g/gvuex), which gives you a mix of screencast and code playground that you can pause and play around with anytime. diff --git a/docs/fr/README.md b/docs/fr/README.md index 21aedb2bc..c381c4e2b 100644 --- a/docs/fr/README.md +++ b/docs/fr/README.md @@ -50,7 +50,7 @@ Alors pourquoi ne pas extraire l'état global partagé des composants, et le gé De plus, en définissant et en séparant les concepts impliqués dans la gestion de l'état global et en appliquant certaines règles, on donne aussi une structure et une maintenabilité à notre code. -Voilà l'idée de base derrière Vuex, inspiré par [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) et [l'architecture Elm](https://guide.elm-lang.org/architecture/). À l'inverse des autres modèles, Vuex est aussi une bibliothèque d'implémentation conçue spécialement pour Vue.js afin de bénéficier de son système de réactivité granulaire pour des modifications efficaces. +Voilà l'idée de base derrière Vuex, inspiré par [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) et [l'architecture Elm](https://guide.elm-lang.org/architecture/). À l'inverse des autres modèles, Vuex est aussi une bibliothèque d'implémentation conçue spécialement pour Vue.js afin de bénéficier de son système de réactivité granulaire pour des modifications efficaces. Si vous voulez apprendre Vuex de manière interactive, jetez un oeil à ce [cours sur Vuex sur Scrimba.](https://scrimba.com/g/gvuex) diff --git a/docs/ja/README.md b/docs/ja/README.md index 086217eb1..a37fbec2f 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -54,7 +54,7 @@ new Vue({ さらに、状態管理に関わる概念を定義、分離し、特定のルールを敷くことで、コードの構造と保守性を向上させることができます。 -これが Vuex の背景にある基本的なアイディアであり、[Flux](https://facebook.github.io/flux/docs/overview.html)、 [Redux](http://redux.js.org/) そして [The Elm Architecture](https://guide.elm-lang.org/architecture/)から影響を受けています。 +これが Vuex の背景にある基本的なアイディアであり、[Flux](https://facebook.github.io/flux/docs/overview)、 [Redux](http://redux.js.org/) そして [The Elm Architecture](https://guide.elm-lang.org/architecture/)から影響を受けています。 他のパターンと異なるのは、Vuex は効率的な更新のために、Vue.js の粒度の細かいリアクティビティシステムを利用するよう特別に調整して実装されたライブラリだということです。 あなたがもし対話型の方法でVuexを学びたいのであれば、[Scrimba](https://scrimba.com/g/gvuex)のVuexコースをぜひ試してみてください。 diff --git a/docs/kr/README.md b/docs/kr/README.md index 87e2445fe..6fe27fe5c 100644 --- a/docs/kr/README.md +++ b/docs/kr/README.md @@ -50,7 +50,7 @@ new Vue({ 또한 상태 관리 및 특정 규칙 적용과 관련된 개념을 정의하고 분리함으로써 코드의 구조와 유지 관리 기능을 향상시킵니다. -이는 [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/), [The Elm Architecture](https://guide.elm-lang.org/architecture/)에서 영감을 받은 Vuex의 기본 아이디어 입니다. 다른 패턴과 달리 Vuex는 Vue.js가 효율적인 업데이트를 위해 세분화된 반응 시스템을 활용하도록 특별히 고안된 라이브러리입니다. +이는 [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/), [The Elm Architecture](https://guide.elm-lang.org/architecture/)에서 영감을 받은 Vuex의 기본 아이디어 입니다. 다른 패턴과 달리 Vuex는 Vue.js가 효율적인 업데이트를 위해 세분화된 반응 시스템을 활용하도록 특별히 고안된 라이브러리입니다. 대화식으로 Vuex를 배우고 싶다면 [Scrimba]((https://scrimba.com/g/gvuex))의 Vuex 과정에 등록하십시오. diff --git a/docs/ptbr/README.md b/docs/ptbr/README.md index f80f96de0..945ff0424 100644 --- a/docs/ptbr/README.md +++ b/docs/ptbr/README.md @@ -52,7 +52,7 @@ Então, por que não extraímos o estado compartilhado dos componentes, e o gere Além disso, definindo e separando os conceitos envolvidos no gerenciamento do estado e aplicando certas regras, também damos ao nosso código mais estrutura e sustentabilidade. -Esta é a ideia básica por trás do Vuex, inspirada por [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) e [The Elm Architecture](https://guide.elm-lang.org/architecture/). Ao contrário dos outros padrões, o Vuex também é uma implementação de biblioteca adaptada especificamente para o Vue.js tirar proveito de seu sistema de reatividade granular para atualizações eficientes. +Esta é a ideia básica por trás do Vuex, inspirada por [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) e [The Elm Architecture](https://guide.elm-lang.org/architecture/). Ao contrário dos outros padrões, o Vuex também é uma implementação de biblioteca adaptada especificamente para o Vue.js tirar proveito de seu sistema de reatividade granular para atualizações eficientes. Se você quiser aprender Vuex de um modo interativo, você pode conferir esse curso de [Vuex no Scrimba.](https://scrimba.com/g/gvuex) diff --git a/docs/ru/README.md b/docs/ru/README.md index 25a44203a..fa2d9a53c 100644 --- a/docs/ru/README.md +++ b/docs/ru/README.md @@ -52,7 +52,7 @@ new Vue({ Чётко определяя и разделяя концепции, возникающие при управлении состоянием, и требуя соблюдения определённых правил, которые поддерживают независимость между представлениями и состояниями, мы лучше структурируем код и облегчаем его поддержку. -Это основная идея Vuex, вдохновлённого [Flux](https://facebook.github.io/flux/docs/overview.html), [Redux](http://redux.js.org/) и [Архитектурой Elm](https://guide.elm-lang.org/architecture/). В отличие от других паттернов, Vuex реализован в виде библиотеки, специально предназначенной для Vue.js, чтобы использовать его систему реактивности для эффективного обновления. +Это основная идея Vuex, вдохновлённого [Flux](https://facebook.github.io/flux/docs/overview), [Redux](http://redux.js.org/) и [Архитектурой Elm](https://guide.elm-lang.org/architecture/). В отличие от других паттернов, Vuex реализован в виде библиотеки, специально предназначенной для Vue.js, чтобы использовать его систему реактивности для эффективного обновления. Если хотите изучить Vuex в интерактивном режиме, попробуйте этот [курс по Vuex на Scrimba.](https://scrimba.com/g/gvuex) diff --git a/docs/zh/README.md b/docs/zh/README.md index a4e55325d..49fe9e911 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -50,7 +50,7 @@ new Vue({ 通过定义和隔离状态管理中的各种概念并通过强制规则维持视图和状态间的独立性,我们的代码将会变得更结构化且易维护。 -这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview.html)、[Redux](http://redux.js.org/) 和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 +这就是 Vuex 背后的基本思想,借鉴了 [Flux](https://facebook.github.io/flux/docs/overview)、[Redux](http://redux.js.org/) 和 [The Elm Architecture](https://guide.elm-lang.org/architecture/)。与其他模式不同的是,Vuex 是专门为 Vue.js 设计的状态管理库,以利用 Vue.js 的细粒度数据响应机制来进行高效的状态更新。 如果你想交互式地学习 Vuex,可以看这个 [Scrimba 上的 Vuex 课程](https://scrimba.com/g/gvuex),它将录屏和代码试验场混合在了一起,你可以随时暂停并尝试。 From 5898e58629bde608c5673759f13b3a6b0136200c Mon Sep 17 00:00:00 2001 From: Yordan Gospodinov Date: Tue, 1 Oct 2019 12:47:28 +0300 Subject: [PATCH 029/280] docs: Update README.md (#1623) --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index e6012ac77..54d17dc7a 100644 --- a/docs/README.md +++ b/docs/README.md @@ -35,7 +35,7 @@ It is a self-contained app with the following parts: - The **view**, a declarative mapping of the **state**; - The **actions**, the possible ways the state could change in reaction to user inputs from the **view**. -This is an simple representation of the concept of "one-way data flow": +This is a simple representation of the concept of "one-way data flow":

From 306005d2c3923fb799df411225b6aedcdb32a327 Mon Sep 17 00:00:00 2001 From: Rogerio Angeliski Date: Thu, 10 Oct 2019 22:49:34 -0300 Subject: [PATCH 030/280] docs: Add meat info (fixed #1615) (#1628) --- docs/.vuepress/config.js | 6 + .../public/icons/android-chrome-192x192.png | Bin 0 -> 9416 bytes .../public/icons/android-chrome-512x512.png | Bin 0 -> 29808 bytes .../public/icons/apple-touch-icon-120x120.png | Bin 0 -> 3369 bytes .../public/icons/apple-touch-icon-152x152.png | Bin 0 -> 4046 bytes .../public/icons/apple-touch-icon-180x180.png | Bin 0 -> 4678 bytes .../public/icons/apple-touch-icon-60x60.png | Bin 0 -> 1491 bytes .../public/icons/apple-touch-icon-76x76.png | Bin 0 -> 1823 bytes .../public/icons/apple-touch-icon.png | Bin 0 -> 4678 bytes docs/.vuepress/public/icons/favicon-16x16.png | Bin 0 -> 799 bytes docs/.vuepress/public/icons/favicon-32x32.png | Bin 0 -> 1271 bytes .../icons/msapplication-icon-144x144.png | Bin 0 -> 1169 bytes .../.vuepress/public/icons/mstile-150x150.png | Bin 0 -> 4282 bytes .../public/icons/safari-pinned-tab.svg | 149 ++++++++++++++++++ docs/.vuepress/public/logo.png | Bin 0 -> 3451 bytes 15 files changed, 155 insertions(+) create mode 100755 docs/.vuepress/public/icons/android-chrome-192x192.png create mode 100755 docs/.vuepress/public/icons/android-chrome-512x512.png create mode 100755 docs/.vuepress/public/icons/apple-touch-icon-120x120.png create mode 100755 docs/.vuepress/public/icons/apple-touch-icon-152x152.png create mode 100755 docs/.vuepress/public/icons/apple-touch-icon-180x180.png create mode 100755 docs/.vuepress/public/icons/apple-touch-icon-60x60.png create mode 100755 docs/.vuepress/public/icons/apple-touch-icon-76x76.png create mode 100755 docs/.vuepress/public/icons/apple-touch-icon.png create mode 100755 docs/.vuepress/public/icons/favicon-16x16.png create mode 100755 docs/.vuepress/public/icons/favicon-32x32.png create mode 100644 docs/.vuepress/public/icons/msapplication-icon-144x144.png create mode 100755 docs/.vuepress/public/icons/mstile-150x150.png create mode 100755 docs/.vuepress/public/icons/safari-pinned-tab.svg create mode 100644 docs/.vuepress/public/logo.png diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index c67d10273..9caa9d1eb 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -36,6 +36,12 @@ module.exports = { description: 'Gestion d\'état centralisé pour Vue.js' } }, + head: [ + ['link', { rel: 'icon', href: `/logo.png` }], + ['link', { rel: 'apple-touch-icon', href: `/icons/apple-touch-icon-152x152.png` }], + ['link', { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3eaf7c' }], + ['meta', { name: 'msapplication-TileImage', content: '/icons/msapplication-icon-144x144.png' }], + ], serviceWorker: true, theme: 'vue', themeConfig: { diff --git a/docs/.vuepress/public/icons/android-chrome-192x192.png b/docs/.vuepress/public/icons/android-chrome-192x192.png new file mode 100755 index 0000000000000000000000000000000000000000..b02aa64d97167ad649e496908b35f14c603d9249 GIT binary patch literal 9416 zcmaiaXIK+m6y}7Elz=p)MnHo|M?q?+0v{qpLa)*lLYEGqqjV4i=}jOYT}nWZqF?|) zgh-1tgLI@XT{CZOOrNn4PA94gdt+0swRr0GxtN=oJ9)6$5}Z8vu~a z0suCTT&%u4c!A=HwuTyT`R`r$p*$UIq4d$xQKwvhFj3OT{OH^VTlieG)RYbVr#JIl z(mDIH=Ppe(jQxytM}R(c{bw&opbQ^vZuTtH3D0=B_H|CF-g$>FWnM_E<8xJ;6x|$I z5G`a2B~ocHl=45jx%nT5vR43_%##6zzVX(HLh_o0w@uPo%~p-v-(oDb3R6|P%IEF4 z#wIQfyvY8F!v*IL!3%yDDE;^Uec_bR`)5#5OYHbjmxA;8`ENvd^-LYxm>)hTiEF%U zkN$D_^9{A1x73rnLs#ZZ%a11T;`K@VTo(k}RlVtj?cvL>fxM;LcX~c<-x(7x`pVDM zc{OYct-^Hikf}3ECxUyMMsv<| zf+5!5j#w_e_d*z9^^%|Ht-CMXFE${zR!096`Z0Aze9fEWr}|K9QwaZ1^~WBd|8Z8V z8EP!@Bwgvs--tSLM##X-93mjI^{%RgAmi(oeI>jCWazZd{W@fJ*K1Z>Fg%) z*4xn<5M$Q*0RH%LVB<3zd)|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Dq%i)cj%LB6UQw*Bco zn4*;MC@nDR0fZO${V{q`Tel}Ojw=aX#M*xw!RN(PJmITN@CAqD*?KGr5zjf=Ai?~i zR4lE2I`L8Wq?V+JV4>~NhrJ%Vp{*Xt+qw%C-%Vf9yj+TSPH+h8*8{Iefp6-_? zu5p8;GfK3Rx)Hx>pV0aD?b2N2kWJ=eK|^nX-<4NYI}Nd@mj+J%^0$#Qf~GH@3m{d_9(?C z6OSF?p&cwqYbSP=$`_KJYw&yz4t~*3l=}OLu!Z2Cghc62E?9=B%n|cdWib_MK1hCK zsCd;w3@jz@xwM%%`+U~6IlFyIBsirXFu&;TV46nEmbn-h_kd!bg=Lq^Es2QSTL6tx zN@ ROru=^AazZ3N)e9H{|11FNXq~K literal 0 HcmV?d00001 diff --git a/docs/.vuepress/public/icons/apple-touch-icon-152x152.png b/docs/.vuepress/public/icons/apple-touch-icon-152x152.png new file mode 100755 index 0000000000000000000000000000000000000000..f24d454a2ecb8851bb893192b64ee09386d30e24 GIT binary patch literal 4046 zcma)9c{o&W`#-jfA!Hjdm|-lDE&I+OBeG>DWJyAd#=eV2WGM#U>^s?tk}Xl9GWZ(% zHfSsv`<86=oBsU$@xIr4o$K89Irnot=RVK#`F!r@x}TVt7+eJNfB^uwXo%9Yp!l4> zH;9^Ivy0vZQ5>zO&P^Qvc%8<0c88Ag4s%0U+ysCy5desZ2Y?ewDCP$M1j+ya*#!Vp zDIb9N=e3!uQwA=$8X4#TfBs%Y?<+GX5qgZ_O?~=BDt3BCX`%Z%<^aI#XQ-!R88W?@ zZx_sNz}4p$Xyt9=Jzt&$3C-{bJ($gUo! zE(}d=3`1PirH-e8`%tmR?GpC?W#uN7x3Aw{KiD47B$LS}Mq^e-ziX1jlBl^-(#+Pu zwhJx{UTjz4H{*oM3}3~|Gi0TUbh8lMyQPcb?{$!nFrye=JZUSm-KSL1r=73huMvzt=UoH^X1z9Yf{nC=L<_uK7ZCH>5IW=eQO=4zwL$q zv@Q&p>2s%*;{*1Z4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?e7?u7pQ}Kqbu1jEd+=mcGea4aL6V4g(m*b7x}z|ijsjb3e|tf-3&^JK{=sWz z8sqIu9jy)#J}n}cXqtXmkb-NDVPcAKn=G9uX42zYvufu_OCr>xJ=oTNp8WA5wEqvM z{r~m8;7_C>U68iRr@|rd7UYhON#(-S_+Uf>s)hhPU{{exlxc&eD literal 0 HcmV?d00001 diff --git a/docs/.vuepress/public/icons/apple-touch-icon-60x60.png b/docs/.vuepress/public/icons/apple-touch-icon-60x60.png new file mode 100755 index 0000000000000000000000000000000000000000..cf10a5602e653bb126332934e2b7f34081c19a01 GIT binary patch literal 1491 zcmV;^1uXiBP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw0005h zP)t-s|NsB|{{8&@{rvp>{r&x%*}Q|#tcB36gvhFYm6?8tmVSzseTkKdl%VJ7>$v03 zRK1K%x`#-Hc0*KVnxn1${{Hv;`iRl5O}mFouY^TsY(rCKRAY43+TGUg<6OXzNtAm- zR%e5bn)vzpo!PxjwS`7 zhev*NL{(?2v%B*8_Ib;tOR0iHVQOA%eB$Nk$m-fvy^TnVc$A)~`}_O){rrv7vP`jr zMQUwRV{@dewcGLMU%`_~mwZE4XGmFU{{R1@+rdq?hDLR9>G$w##+*x{e?(kqxa7}J zyNO4Eb@luBe$A*%tb#;iYt8K5SH6x(j(I~>W|P&nOtXbWZEoN5>0-i_N}7E`SZAo+ z#ZJ11O}B=TZzUTJuYQ>tg;?45<_j=5x$?DryzKxI5vtYrLq};;l_wjDWox0@EQM`(P&Z*Aq z-ebd-HmV8X00001VoOIv0Eh)0NB{r;2XskIMF-&l69)?{x?>RQ0007+NklM;B#JYAnV|K?dhB~`2vAa8F&hF0rvr{-f1`~wK%gytOd(QLy{O;v> zE)c!fe^fRo+YelJdQ&?zZFTGPvAyJ@wj3OtKE0H)i>q$v>f)^FIXOD;Dv7;5c5|0< zdC0gtvdPbF{&}HTP)Zh7u%gbO(mBtTvMJ4v4 zs#=igmrz}WQDudR*Q2Hu(RKCuT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*DnWBaLqAHLJ47;r5nvkeq3u_?J{Xaf_}6I+xpLwKS7NC z|KYU%zup)8i85jc)^Yt*I0W8;+zHUI3V7@o;3DUYasdq>DFK%im4J)F?;|B-<=}8R z>HESGa5)KyCnGII|E+YX&h4Y+xCRvyX@oGhhG4 j58+{W$RJv~NLLKlV4)8v^7hU(R-4l(}$teLl` literal 0 HcmV?d00001 diff --git a/docs/.vuepress/public/icons/favicon-16x16.png b/docs/.vuepress/public/icons/favicon-16x16.png new file mode 100755 index 0000000000000000000000000000000000000000..42af00963d81b8e39a30435c60ac482d1f8756e0 GIT binary patch literal 799 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbKJOS+@4BLl<6e(pbstU$g(vPY0F z14ES>14Ba#1H&(%P{RubhEf9thF1v;3|2E37{m+a>WRE8{w#)hawXn|-Xp4{E;v!=;4B^%-x&;Cm1 zP>^*#n_J!T^1SBMI!C4h-R53dN8`?ylD}d{L%(vZvUKT)~-CgWFQy3lt zIqW5#zOL*K8HL%o&D;R|TePl5?VWhq^wrj^qed%lKKkpp-FogeyEi+p zE?K8rW7E1fuEJ{5jaaAp0~aIt+keS?T)@vXM=*X}V#VGMCm1~v-+0wr{w3CJ-R8wG zS@XVpzqP-5Mf0H?y-zh=XVL>S6E;rKnDmrMQlmoKbK9p$evXN`oe{6g>lvi)-+#c) zb+Al&$zRqtWk1@VTt6MPmq9d7^!kmXZn8k{sFt`!l%ynwlArU1(iRB6fMfqu& zIjIUIl?AB^nFS@u3=9=>9)IHDC=AokIOTu(jOWuJ24-b$y<~1-Wnu5hBFw@HE)6D! wQ<#-EhbWxBaplC3Ge=~Ou%B-5Sm33{@Jd{;RG<|Mp00i_>zopr0DGh}-~a#s literal 0 HcmV?d00001 diff --git a/docs/.vuepress/public/icons/favicon-32x32.png b/docs/.vuepress/public/icons/favicon-32x32.png new file mode 100755 index 0000000000000000000000000000000000000000..46ca04dee251a4fa85a2891a145fbe20cc619d96 GIT binary patch literal 1271 zcmeA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fR*0*t1&OuPDzn{COw;L1}f^~y> zVsRMo&xFi*`f;v@wihpcwV-qZi&hX;X + + + +Created by potrace 1.11, written by Peter Selinger 2001-2013 + + + + + diff --git a/docs/.vuepress/public/logo.png b/docs/.vuepress/public/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..60e17006ad07cd313788585e2f5e528fbb7cf821 GIT binary patch literal 3451 zcmai0dpOj27oUg~BfU14)f(-t-WBEYW{4Ss7DZ)^+{4Vcgc&pLGr}m;*wj!$A+bA4 zlFL|`ap|367Oi5-Ws)(rQYx2GtESCtdVk-U;c44vpV#wqp3gbo&-tA5J?Hz!obdA8 zt*LIH4uioo-S@b7!(eMpgMT$;D8eQ5F2i6-=3e`JT=&H!IJf0MA3813@nVJ?%iUEg z4?=_wBdEhGiK`$LM9?x9of;3Y+|mFB?g{{yx)NLgsFamRa-4!M1L##ZNfAdSQse|w z0syE4MO=mzM*zo>kjdz%h7Xbpu{dlB%DAFSoxi=KK z4+pt6-{Nhs1e*h4w!Yy|?#_dekg^><3MvORV1I~cA4Rl}CPHmPH-c`5il?BH;!xCh zRBAl5EObVqLuL{>E6E`z*@2PbaDs|CNyD6?VG2?)XAWbE(j3pFIhLkl%G05}J66#h zS#+nGOy}B6r@AA~^+%i=k2*IU-PL^5xh2b)lf8?Z4K*n}PmP8i(6MB1&jYYEN=nLW zKT%WD&|JSkTU$q0&%glj#g|)5OwG1gSnaU3-D!_;baHWZ+p~AS*8xBOppek8utQNX zd%^yor>7Vc3Eid1C`tPq{F!fY-7iXW;@wu)ns5uzFN_xO3 zViZ96-%Weuo2pP!hYGfhLl(-ugFC2$9CCW7D5mpl^_f?1u5+y})};)ZTJH(6C@u|+ zQQi8dxHg4Izl&`eh9?F@PP3hdLQykeq?nQxihg8X|ILl8iFm;__t)#~X1*zL9u)YL z)*cpY4mA2arS_sRGg+X_s`n}lAQVXl4K7#u+@Gn9JFMD1;`XSuJ>vAWxcu=TSI60h z^-taIfANy4|D?So?V11Hir0=TxGsf_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-ao1P+IB(1mm_!)Dg(gKiRZKQ=#mIm4O@u{T70{Z?B zc>^+D`3esRV}S6mOqe4RmM4tMh2;rlvIH9=(8-N5;W(KN`jE)z^K$(spbzBDK7PO) z>ADbc3Uq>5q6|Ve|0kswS?RyuNnRS+FYEQRtn_ACX=e;VH5}&zLrmj=RV93k8R0nE zfaV-W`~UFd`TwNy_xRr<^4c}wxSR}h?42pweERVh>>cbTZ3IH?w_dhX$^KA!g~ zl?bRh{8cJU>l=1c=k%mV0LCRx|EP{q>iLuMHq05TZRjE-?}tAWUUEnsOJ6Vj{Uuvp z0xc6ccdL&dHg>Kcca&{mq;-;j!yx?l(531b^tY)2a6p8bR6|G}h2z$sw;hF|=NWVn z@{O2-K}Z((3hl@jY#7jMk_i(3Dk$iN1n2Je^8Q>FE9zRU);0W&uJVHYwUN~0qbtL; z_{|pAk@E3Cb0mV{^nf{erxFNbQ+-CYAQFe}yi_;<1l`1q1kgd%K-g>rWwfnqoBl@){jyn{jS;s=eLvmuV@q3e&+ zpMR?_{b_ofto+|R0?xjXfP2B#l~h+7NK}B%l5Q_=V!)26@oKF^homRb>4herRYSlL z!1SLf&zT8S=FCoknKg9ry1``c#EtpuYvs^Y($-1yQq-jCQ_zi_G(i8VQuS9Vl2IJA ztIt4w^d^PiGGCF48uPE;G3Kua9^ m1dnUL@Oj4Wg@5@pTTmBFG|pCC&p82pXS%z3x-{;>Xa5hJTdMB> literal 0 HcmV?d00001 From 14ae802f1266d78cb2e706bb990c785ce9667031 Mon Sep 17 00:00:00 2001 From: LeeJuneHyun <38388581+dlwnsgus777@users.noreply.github.com> Date: Wed, 30 Oct 2019 13:46:20 +0900 Subject: [PATCH 031/280] =?UTF-8?q?Typo=20correction=20=20"=EB=B3=80?= =?UTF-8?q?=EC=9D=B4=EC=9D=84"=20->=20"=EB=B3=80=EC=9D=B4=EB=A5=BC"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/kr/guide/plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kr/guide/plugins.md b/docs/kr/guide/plugins.md index a90cd64a4..9d9fca9a9 100644 --- a/docs/kr/guide/plugins.md +++ b/docs/kr/guide/plugins.md @@ -27,7 +27,7 @@ const store = new Vuex.Store({ 플러그인은 상태를 직접 변이할 수 없습니다. 컴포넌트와 마찬가지로 변이를 커밋하여 변경을 트리거 할 수 있습니다. -변이을 커밋함으로써 플러그인을 사용하여 데이터 소스를 저장소에 동기화 할 수 있습니다. 예를 들어, websocket 데이터 소스를 저장소에 동기화하려면 (이는 사실 인위적인 예제입니다. 실제로 `createPlugin` 함수는 더 복잡한 작업을 위해 몇 가지 추가 옵션을 필요로 할 수 있습니다) +변이를 커밋함으로써 플러그인을 사용하여 데이터 소스를 저장소에 동기화 할 수 있습니다. 예를 들어, websocket 데이터 소스를 저장소에 동기화하려면 (이는 사실 인위적인 예제입니다. 실제로 `createPlugin` 함수는 더 복잡한 작업을 위해 몇 가지 추가 옵션을 필요로 할 수 있습니다) ``` js export default function createWebSocketPlugin (socket) { From 9981d0b9a32b9dc68f2f9bfc302504a3e571e14c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2019 11:38:47 +0800 Subject: [PATCH 032/280] build(deps): bump eslint-utils from 1.3.1 to 1.4.3 (#1633) Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.3. - [Release notes](https://github.com/mysticatea/eslint-utils/releases) - [Commits](https://github.com/mysticatea/eslint-utils/compare/v1.3.1...v1.4.3) Signed-off-by: dependabot[bot] --- yarn.lock | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0871218f6..85e4b4262 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3703,14 +3703,16 @@ eslint-scope@^4.0.0: estraverse "^4.1.1" eslint-utils@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" - integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" -eslint-visitor-keys@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" - integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== +eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2" + integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A== eslint@^5.12.0: version "5.12.0" From 8358596281d03f8fa02da2fa9c0430c12db6d2a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2019 23:21:29 +0800 Subject: [PATCH 033/280] build(deps): bump lodash from 4.17.11 to 4.17.15 (#1636) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.11 to 4.17.15. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.11...4.17.15) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 85e4b4262..52bb22bfe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5910,9 +5910,9 @@ lodash.uniq@^4.5.0: integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" - integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== log-symbols@^2.1.0: version "2.2.0" From 633659e999e5d51be56322966e2b15495a6b955f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2019 23:21:59 +0800 Subject: [PATCH 034/280] build(deps): bump mixin-deep from 1.3.1 to 1.3.2 (#1635) Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/jonschlinkert/mixin-deep/releases) - [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 52bb22bfe..29c48800d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6320,9 +6320,9 @@ mississippi@^3.0.0: through2 "^2.0.0" mixin-deep@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.1.tgz#a49e7268dce1a0d9698e45326c5626df3543d0fe" - integrity sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ== + version "1.3.2" + resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" + integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== dependencies: for-in "^1.0.2" is-extendable "^1.0.1" From beac98db0706ab162e736d9d61fc91b5d8bf73f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2019 23:22:09 +0800 Subject: [PATCH 035/280] build(deps): bump lodash.template from 4.4.0 to 4.5.0 (#1637) Bumps [lodash.template](https://github.com/lodash/lodash) from 4.4.0 to 4.5.0. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.4.0...4.5.0) Signed-off-by: dependabot[bot] --- yarn.lock | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 29c48800d..617592534 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5785,7 +5785,7 @@ lodash._isiterateecall@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" integrity sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw= -lodash._reinterpolate@~3.0.0: +lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= @@ -5885,19 +5885,19 @@ lodash.rest@^4.0.0: integrity sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo= lodash.template@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" - integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" lodash.templatesettings "^4.0.0" lodash.templatesettings@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" lodash.throttle@^4.1.1: version "4.1.1" From 7ca8e62841f525b2419e5622b1b5f67c4acffa31 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2019 23:22:17 +0800 Subject: [PATCH 036/280] build(deps): bump lodash.mergewith from 4.6.1 to 4.6.2 (#1634) Bumps [lodash.mergewith](https://github.com/lodash/lodash) from 4.6.1 to 4.6.2. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/commits) Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 617592534..423a69868 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5875,9 +5875,9 @@ lodash.memoize@^4.1.2: integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= lodash.mergewith@^4.0.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== lodash.rest@^4.0.0: version "4.0.5" From b39c97c8ef643190f879165e99ea69f109802c65 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Sat, 9 Nov 2019 15:16:35 +0800 Subject: [PATCH 037/280] docs(zh): updated (#1614) --- docs/zh/guide/state.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/zh/guide/state.md b/docs/zh/guide/state.md index 1d543ae54..bd6295d8d 100644 --- a/docs/zh/guide/state.md +++ b/docs/zh/guide/state.md @@ -8,6 +8,8 @@ Vuex 使用**单一状态树**——是的,用一个对象就包含了全部 单状态树和模块化并不冲突——在后面的章节里我们会讨论如何将状态和状态变更事件分布到各个子模块中。 +存储在 Vuex 中的数据和 Vue 实例中的 `data` 遵循相同的规则,例如状态对象必须是纯粹 (plain) 的。**参考:**[Vue#data](https://cn.vuejs.org/v2/api/#data)。 + ### 在 Vue 组件中获得 Vuex 状态 那么我们如何在 Vue 组件中展示状态呢?由于 Vuex 的状态存储是响应式的,从 store 实例中读取状态最简单的方法就是在[计算属性](https://cn.vuejs.org/guide/computed.html)中返回某个状态: From 2ffedd6b272b2b0979de081494587b564d895ccc Mon Sep 17 00:00:00 2001 From: Owan Hunte Date: Sat, 9 Nov 2019 03:25:54 -0400 Subject: [PATCH 038/280] docs: Minor typo fix for Actions docs page. (#1606) --- docs/guide/actions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/actions.md b/docs/guide/actions.md index 081141ab8..2ccc999f5 100644 --- a/docs/guide/actions.md +++ b/docs/guide/actions.md @@ -47,7 +47,7 @@ Actions are triggered with the `store.dispatch` method: store.dispatch('increment') ``` -This may look silly at first sight: if we want to increment the count, why don't we just call `store.commit('increment')` directly? Remember that **mutations have to be synchronous**? Actions don't. We can perform **asynchronous** operations inside an action: +This may look silly at first sight: if we want to increment the count, why don't we just call `store.commit('increment')` directly? Remember that **mutations have to be synchronous**. Actions don't. We can perform **asynchronous** operations inside an action: ``` js actions: { From e0e0b7b81e276c3baba0915646ee3e5e8d4bc405 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Date: Sat, 9 Nov 2019 02:43:05 -0500 Subject: [PATCH 039/280] docs: minor typo (#1565) From 540b81f81e81ac55087a9e02ef7e4337342386e0 Mon Sep 17 00:00:00 2001 From: Sai Date: Sat, 9 Nov 2019 16:45:34 +0900 Subject: [PATCH 040/280] docs: fix typo in comments (#1550) --- src/store.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store.js b/src/store.js index b32d7b0ad..032480751 100644 --- a/src/store.js +++ b/src/store.js @@ -257,7 +257,7 @@ function resetStoreVM (store, state, hot) { forEachValue(wrappedGetters, (fn, key) => { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldVm. - // using partial to return function with only arguments preserved in closure enviroment. + // using partial to return function with only arguments preserved in closure environment. computed[key] = partial(fn, store) Object.defineProperty(store.getters, key, { get: () => store._vm[key], From 40033825b7259c2e9b702bdf94e0b24ed4511d7c Mon Sep 17 00:00:00 2001 From: Frank Emilio Perez Rivero Date: Sat, 9 Nov 2019 18:53:24 +0100 Subject: [PATCH 041/280] perf: Implementing a cache for the gettersProxy object creation (#1546) * Implementing a cache for the gettersProxy object creation. Kill ssr performance wth large number of modules/getters * Revert "Implementing a cache for the gettersProxy object creation. Kill ssr performance wth large number of modules/getters" This reverts commit 2df536b3c13b85bb1d67756cec4c747aaf6d8661. * Resetting the make local getters cache when the store gets updated * Changing cache to makeLocalGetters to instance internal state --- src/store.js | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/store.js b/src/store.js index 032480751..039e18165 100644 --- a/src/store.js +++ b/src/store.js @@ -35,6 +35,7 @@ export class Store { this._modulesNamespaceMap = Object.create(null) this._subscribers = [] this._watcherVM = new Vue() + this._makeLocalGettersCache = Object.create(null) // bind commit and dispatch to self const store = this @@ -252,6 +253,8 @@ function resetStoreVM (store, state, hot) { // bind store public getters store.getters = {} + // reset local getters cache + store._makeLocalGettersCache = Object.create(null) const wrappedGetters = store._wrappedGetters const computed = {} forEachValue(wrappedGetters, (fn, key) => { @@ -397,26 +400,28 @@ function makeLocalContext (store, namespace, path) { } function makeLocalGetters (store, namespace) { - const gettersProxy = {} - - const splitPos = namespace.length - Object.keys(store.getters).forEach(type => { - // skip if the target getter is not match this namespace - if (type.slice(0, splitPos) !== namespace) return - - // extract local getter type - const localType = type.slice(splitPos) - - // Add a port to the getters proxy. - // Define as getter property because - // we do not want to evaluate the getters in this time. - Object.defineProperty(gettersProxy, localType, { - get: () => store.getters[type], - enumerable: true + if (!store._makeLocalGettersCache[namespace]) { + const gettersProxy = {} + const splitPos = namespace.length + Object.keys(store.getters).forEach(type => { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) return + + // extract local getter type + const localType = type.slice(splitPos) + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: () => store.getters[type], + enumerable: true + }) }) - }) + store._makeLocalGettersCache[namespace] = gettersProxy + } - return gettersProxy + return store._makeLocalGettersCache[namespace] } function registerMutation (store, type, handler, local) { From e5ca2d52e89a126bd48bd8a6003be77379960ea9 Mon Sep 17 00:00:00 2001 From: EdyHartono Date: Sun, 10 Nov 2019 21:02:26 +0700 Subject: [PATCH 042/280] fix: Should vuex mapState print error message #1093 (#1297) --- src/helpers.js | 26 +++++++++++++ test/unit/helpers.spec.js | 82 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) diff --git a/src/helpers.js b/src/helpers.js index 5922eb8b5..8f97840ff 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -1,3 +1,5 @@ +import { isObject } from './util' + /** * Reduce the code which written in Vue.js for getting the state. * @param {String} [namespace] - Module's namespace @@ -6,6 +8,9 @@ */ export const mapState = normalizeNamespace((namespace, states) => { const res = {} + if (process.env.NODE_ENV !== 'production' && !isValidMap(states)) { + console.error('[vuex] states parameter must be either an Array/Object') + } normalizeMap(states).forEach(({ key, val }) => { res[key] = function mappedState () { let state = this.$store.state @@ -36,6 +41,9 @@ export const mapState = normalizeNamespace((namespace, states) => { */ export const mapMutations = normalizeNamespace((namespace, mutations) => { const res = {} + if (process.env.NODE_ENV !== 'production' && !isValidMap(mutations)) { + console.error('[vuex] mutations parameter must be either an Array/Object') + } normalizeMap(mutations).forEach(({ key, val }) => { res[key] = function mappedMutation (...args) { // Get the commit method from store @@ -63,6 +71,9 @@ export const mapMutations = normalizeNamespace((namespace, mutations) => { */ export const mapGetters = normalizeNamespace((namespace, getters) => { const res = {} + if (process.env.NODE_ENV !== 'production' && !isValidMap(getters)) { + console.error('[vuex] getters parameter must be either an Array/Object') + } normalizeMap(getters).forEach(({ key, val }) => { // The namespace has been mutated by normalizeNamespace val = namespace + val @@ -90,6 +101,9 @@ export const mapGetters = normalizeNamespace((namespace, getters) => { */ export const mapActions = normalizeNamespace((namespace, actions) => { const res = {} + if (process.env.NODE_ENV !== 'production' && !isValidMap(actions)) { + console.error('[vuex] actions parameter must be either an Array/Object') + } normalizeMap(actions).forEach(({ key, val }) => { res[key] = function mappedAction (...args) { // get dispatch function from store @@ -129,11 +143,23 @@ export const createNamespacedHelpers = (namespace) => ({ * @return {Object} */ function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } return Array.isArray(map) ? map.map(key => ({ key, val: key })) : Object.keys(map).map(key => ({ key, val: map[key] })) } +/** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ +function isValidMap (map) { + return Array.isArray(map) || isObject(map) +} + /** * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {Function} fn diff --git a/test/unit/helpers.spec.js b/test/unit/helpers.spec.js index 1bc0fc409..f1689f622 100644 --- a/test/unit/helpers.spec.js +++ b/test/unit/helpers.spec.js @@ -94,6 +94,22 @@ describe('Helpers', () => { expect(vm.value.b).toBeUndefined() }) + it('mapState (with undefined states)', () => { + const store = new Vuex.Store({ + modules: { + foo: { + namespaced: true, + state: { a: 1 } + } + } + }) + const vm = new Vue({ + store, + computed: mapState('foo') + }) + expect(vm.a).toBeUndefined() + }) + it('mapMutations (array)', () => { const store = new Vuex.Store({ state: { count: 0 }, @@ -206,6 +222,27 @@ describe('Helpers', () => { expect(store.state.foo.count).toBe(43) }) + it('mapMutations (with undefined mutations)', () => { + const store = new Vuex.Store({ + modules: { + foo: { + namespaced: true, + state: { count: 0 }, + mutations: { + inc: state => state.count++, + dec: state => state.count-- + } + } + } + }) + const vm = new Vue({ + store, + methods: mapMutations('foo') + }) + expect(vm.inc).toBeUndefined() + expect(vm.dec).toBeUndefined() + }) + it('mapGetters (array)', () => { const store = new Vuex.Store({ state: { count: 0 }, @@ -351,6 +388,31 @@ describe('Helpers', () => { expect(vm.count).toBe(9) }) + it('mapGetters (with undefined getters)', () => { + const store = new Vuex.Store({ + modules: { + foo: { + namespaced: true, + state: { count: 0 }, + mutations: { + inc: state => state.count++, + dec: state => state.count-- + }, + getters: { + hasAny: ({ count }) => count > 0, + negative: ({ count }) => count < 0 + } + } + } + }) + const vm = new Vue({ + store, + computed: mapGetters('foo') + }) + expect(vm.a).toBeUndefined() + expect(vm.b).toBeUndefined() + }) + it('mapActions (array)', () => { const a = jasmine.createSpy() const b = jasmine.createSpy() @@ -461,6 +523,26 @@ describe('Helpers', () => { expect(a.calls.argsFor(0)[1]).toBe('foobar') }) + it('mapActions (with undefined actions)', () => { + const a = jasmine.createSpy() + const store = new Vuex.Store({ + modules: { + foo: { + namespaced: true, + actions: { + a + } + } + } + }) + const vm = new Vue({ + store, + methods: mapActions('foo/') + }) + expect(vm.a).toBeUndefined() + expect(a).not.toHaveBeenCalled() + }) + it('createNamespacedHelpers', () => { const actionA = jasmine.createSpy() const actionB = jasmine.createSpy() From 538ee5803bbca2fc8077208fb30c8d56d8be5cae Mon Sep 17 00:00:00 2001 From: Denis Karabaza Date: Sun, 10 Nov 2019 17:24:28 +0300 Subject: [PATCH 043/280] fix: Warn about conflicts between state and module (#1365) * feat: warn about conflicts between state and module * fix: show module path when it overwrite a state field --- src/store.js | 7 +++++++ test/unit/modules.spec.js | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/store.js b/src/store.js index 039e18165..00caafabc 100644 --- a/src/store.js +++ b/src/store.js @@ -315,6 +315,13 @@ function installModule (store, rootState, path, module, hot) { const parentState = getNestedState(rootState, path.slice(0, -1)) const moduleName = path[path.length - 1] store._withCommit(() => { + if (process.env.NODE_ENV !== 'production') { + if (moduleName in parentState) { + console.warn( + `[vuex] state field "${moduleName}" was overridden by a module with the same name at "${path.join('.')}"` + ) + } + } Vue.set(parentState, moduleName, module.state) }) } diff --git a/test/unit/modules.spec.js b/test/unit/modules.spec.js index a776fb582..8d4b78904 100644 --- a/test/unit/modules.spec.js +++ b/test/unit/modules.spec.js @@ -547,6 +547,28 @@ describe('Modules', () => { store.dispatch('parent/test') }) + it('module: warn when module overrides state', () => { + spyOn(console, 'warn') + const store = new Vuex.Store({ + modules: { + foo: { + state () { + return { value: 1 } + }, + modules: { + value: { + state: () => 2 + } + } + } + } + }) + expect(store.state.foo.value).toBe(2) + expect(console.warn).toHaveBeenCalledWith( + `[vuex] state field "value" was overridden by a module with the same name at "foo.value"` + ) + }) + it('dispatching multiple actions in different modules', done => { const store = new Vuex.Store({ modules: { From adab4aaf1898fc0b3c6542eae41ce6a1a97b7bcb Mon Sep 17 00:00:00 2001 From: katashin Date: Sun, 10 Nov 2019 22:40:21 +0800 Subject: [PATCH 044/280] refactor: remove useless parameter on action handlers (#1640) --- src/store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store.js b/src/store.js index 00caafabc..5dd65a0b9 100644 --- a/src/store.js +++ b/src/store.js @@ -440,7 +440,7 @@ function registerMutation (store, type, handler, local) { function registerAction (store, type, handler, local) { const entry = store._actions[type] || (store._actions[type] = []) - entry.push(function wrappedActionHandler (payload, cb) { + entry.push(function wrappedActionHandler (payload) { let res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, @@ -448,7 +448,7 @@ function registerAction (store, type, handler, local) { state: local.state, rootGetters: store.getters, rootState: store.state - }, payload, cb) + }, payload) if (!isPromise(res)) { res = Promise.resolve(res) } From 9a9672050bcfee198c379069ec0e1b03ca6cb965 Mon Sep 17 00:00:00 2001 From: katashin Date: Sun, 10 Nov 2019 22:53:49 +0800 Subject: [PATCH 045/280] fix(types): avoid broadening vue instance type when using map helpers (#1639) * fix(types): avoid broading vue instance type when using map helpers * refactor: add type restriction to helper types --- package.json | 2 +- types/helpers.d.ts | 69 +++++++++------ types/test/helpers.ts | 196 +++++++++++++++++++++++++----------------- yarn.lock | 8 +- 4 files changed, 165 insertions(+), 110 deletions(-) diff --git a/package.json b/package.json index 23f421901..753b2e29d 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "selenium-server": "^2.53.1", "terser": "^3.17.0", "todomvc-app-css": "^2.1.0", - "typescript": "^3.2.2", + "typescript": "^3.7.2", "vue": "^2.5.22", "vue-loader": "^15.2.1", "vue-template-compiler": "^2.5.22", diff --git a/types/helpers.d.ts b/types/helpers.d.ts index 36f1c7418..2de5cf9e5 100644 --- a/types/helpers.d.ts +++ b/types/helpers.d.ts @@ -1,51 +1,68 @@ import Vue from 'vue'; import { Dispatch, Commit } from './index'; -type Dictionary = { [key: string]: T }; type Computed = () => any; +type InlineComputed = T extends (...args: any[]) => infer R ? () => R : never type MutationMethod = (...args: any[]) => void; type ActionMethod = (...args: any[]) => Promise; -type CustomVue = Vue & Dictionary; +type InlineMethod any> = T extends (fn: any, ...args: infer Args) => infer R ? (...args: Args) => R : never +type CustomVue = Vue & Record; interface Mapper { - (map: string[]): Dictionary; - (map: Dictionary): Dictionary; + (map: Key[]): { [K in Key]: R }; + >(map: Map): { [K in keyof Map]: R }; } interface MapperWithNamespace { - (namespace: string, map: string[]): Dictionary; - (namespace: string, map: Dictionary): Dictionary; + (namespace: string, map: Key[]): { [K in Key]: R }; + >(namespace: string, map: Map): { [K in keyof Map]: R }; } -interface FunctionMapper { - (map: Dictionary<(this: CustomVue, fn: F, ...args: any[]) => any>): Dictionary; +interface MapperForState { + any> = {}>( + map: Map + ): { [K in keyof Map]: InlineComputed }; } -interface FunctionMapperWithNamespace { - ( +interface MapperForStateWithNamespace { + any> = {}>( namespace: string, - map: Dictionary<(this: CustomVue, fn: F, ...args: any[]) => any> - ): Dictionary; + map: Map + ): { [K in keyof Map]: InlineComputed }; } -interface MapperForState { - ( - map: Dictionary<(this: CustomVue, state: S, getters: any) => any> - ): Dictionary; +interface MapperForAction { + any>>( + map: Map + ): { [K in keyof Map]: InlineMethod }; } -interface MapperForStateWithNamespace { - ( +interface MapperForActionWithNamespace { + any>>( + namespace: string, + map: Map + ): { [K in keyof Map]: InlineMethod }; +} + +interface MapperForMutation { + any>>( + map: Map + ): { [K in keyof Map]: InlineMethod }; +} + +interface MapperForMutationWithNamespace { + any>>( namespace: string, - map: Dictionary<(this: CustomVue, state: S, getters: any) => any> - ): Dictionary; + map: Map + ): { [K in keyof Map]: InlineMethod }; } + interface NamespacedMappers { mapState: Mapper & MapperForState; - mapMutations: Mapper & FunctionMapper; + mapMutations: Mapper & MapperForMutation; mapGetters: Mapper; - mapActions: Mapper & FunctionMapper; + mapActions: Mapper & MapperForAction; } export declare const mapState: Mapper @@ -55,15 +72,15 @@ export declare const mapState: Mapper export declare const mapMutations: Mapper & MapperWithNamespace - & FunctionMapper - & FunctionMapperWithNamespace; + & MapperForMutation + & MapperForMutationWithNamespace; export declare const mapGetters: Mapper & MapperWithNamespace; export declare const mapActions: Mapper & MapperWithNamespace - & FunctionMapper - & FunctionMapperWithNamespace; + & MapperForAction + & MapperForActionWithNamespace; export declare function createNamespacedHelpers(namespace: string): NamespacedMappers; diff --git a/types/test/helpers.ts b/types/test/helpers.ts index 569a9ecaf..d1b64e5cb 100644 --- a/types/test/helpers.ts +++ b/types/test/helpers.ts @@ -11,79 +11,78 @@ import { const helpers = createNamespacedHelpers('foo'); new Vue({ - computed: Object.assign({}, - mapState(["a"]), - mapState('foo', ["a"]), - mapState({ - b: "b" + computed: { + ...mapState(["a"]), + ...mapState('foo', ["b"]), + ...mapState({ + c: "c" }), - mapState('foo', { - b: "b" + ...mapState('foo', { + d: "d" }), - mapState({ - c: (state: any, getters: any) => state.c + getters.c + ...mapState({ + e: (state: any, getters: any) => state.a + getters.g }), - mapState('foo', { - c: (state: any, getters: any) => state.c + getters.c + ...mapState('foo', { + f: (state: any, getters: any) => state.a + getters.g }), - mapGetters(["d"]), - mapGetters('foo', ["d"]), - mapGetters({ - e: "e" + ...mapGetters(["g"]), + ...mapGetters('foo', ["h"]), + ...mapGetters({ + i: "i" }), - mapGetters('foo', { - e: "e" + ...mapGetters('foo', { + j: "j" }), - helpers.mapState(["k"]), - helpers.mapState({ - k: "k" - }), - helpers.mapState({ - k: (state: any, getters: any) => state.k + getters.k, - useThis(state: any, getters: any) { - return state.k + getters.k + this.whatever + ...helpers.mapState(["k"]), + ...helpers.mapState({ + l: "l" + }), + ...helpers.mapState({ + m: (state: any, getters: any) => state.a + getters.g, + useThis(state: any, getters: any): any { + return state.a + getters.g + this.whatever } }), - helpers.mapGetters(["l"]), - helpers.mapGetters({ - l: "l" + ...helpers.mapGetters(["n"]), + ...helpers.mapGetters({ + o: "o" }), - { - otherComputed () { - return "f"; - } + + otherComputed () { + return ""; } - ), + }, - methods: Object.assign({}, - mapActions(["g"]), - mapActions({ - h: "h" - }), - mapActions({ - g (dispatch, a: string, b: number, c: boolean): void { - dispatch('g', { a, b, c }) + methods: { + ...mapActions(["p"]), + ...mapActions({ + q: "q" + }), + ...mapActions({ + r (dispatch, a: string, b: number, c: boolean) { + dispatch('p', { a, b, c }) dispatch({ - type: 'g', + type: 'p', a, b, c }) } }), - mapActions('foo', ["g"]), - mapActions('foo', { - h: "h" + ...mapActions('foo', ["s"]), + ...mapActions('foo', { + t: "t" }), - mapActions('foo', { - g (dispatch, a: string, b: number, c: boolean): void { - dispatch('g', { a, b, c }) + ...mapActions('foo', { + u (dispatch, a: string, b: number, c: boolean) { + dispatch('p', { a, b, c }) dispatch({ - type: 'g', + type: 'p', a, b, c @@ -91,30 +90,30 @@ new Vue({ } }), - mapMutations(["i"]), - mapMutations({ - j: "j" + ...mapMutations(["v"]), + ...mapMutations({ + w: "w" }), - mapMutations({ - i (commit, a: string, b: number, c: boolean): void { - commit('i', { a, b, c }) + ...mapMutations({ + x (commit, a: string, b: number, c: boolean) { + commit('v', { a, b, c }) commit({ - type: 'i', + type: 'v', a, b, c }) } }), - mapMutations('foo', ["i"]), - mapMutations('foo', { - j: "j" + ...mapMutations('foo', ["y"]), + ...mapMutations('foo', { + z: "z" }), - mapMutations('foo', { - i (commit, a: string, b: number, c: boolean): void { - commit('i', { a, b, c }) + ...mapMutations('foo', { + aa (commit, a: string, b: number, c: boolean) { + commit('v', { a, b, c }) commit({ - type: 'i', + type: 'v', a, b, c @@ -122,28 +121,67 @@ new Vue({ } }), - helpers.mapActions(["m"]), - helpers.mapActions({ - m: "m" + ...helpers.mapActions(["ab"]), + ...helpers.mapActions({ + ac: "ac" }), - helpers.mapActions({ - m (dispatch, value: string) { - dispatch('m', value) + ...helpers.mapActions({ + ad (dispatch, value: string) { + dispatch('p', value) } }), - helpers.mapMutations(["n"]), - helpers.mapMutations({ - n: "n" + ...helpers.mapMutations(["ae"]), + ...helpers.mapMutations({ + af: "af" }), - helpers.mapMutations({ - n (commit, value: string) { - commit('m', value) + ...helpers.mapMutations({ + ag (commit, value: string) { + commit('v', value) } }), - { - otherMethod () {} - } - ) + otherMethod () {} + }, + + created() { + // Computed + this.a + this.b + this.c + this.d + this.e + this.f + this.g + this.h + this.i + this.j + this.k + this.l + this.m + this.n + this.o + this.otherComputed + + // Methods + this.p() + this.q() + this.r('', 0, true) + this.s() + this.t() + this.u('', 0, true) + this.v() + this.w() + this.x('', 0, true) + this.y() + this.z() + this.aa('', 0, true) + this.ab() + this.ac() + this.ad('') + this.ae() + this.af() + this.ag('') + this.otherMethod() + } }); diff --git a/yarn.lock b/yarn.lock index 423a69868..1e11a430e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9071,10 +9071,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5" - integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg== +typescript@^3.7.2: + version "3.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.2.tgz#27e489b95fa5909445e9fef5ee48d81697ad18fb" + integrity sha512-ml7V7JfiN2Xwvcer+XAf2csGO1bPBdRbFCkYBczNZggrBZ9c7G3riSUeJmqEU5uOtXNPMhE3n+R4FA/3YOAWOQ== uc.micro@^1.0.1, uc.micro@^1.0.5: version "1.0.5" From e60bc76154bb05c12b24342617b946d9a6e2f476 Mon Sep 17 00:00:00 2001 From: katashin Date: Sun, 10 Nov 2019 23:09:25 +0800 Subject: [PATCH 046/280] fix: tweak mapping helper warning message (#1641) --- src/helpers.js | 8 ++++---- test/unit/helpers.spec.js | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/helpers.js b/src/helpers.js index 8f97840ff..722a9ce63 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -9,7 +9,7 @@ import { isObject } from './util' export const mapState = normalizeNamespace((namespace, states) => { const res = {} if (process.env.NODE_ENV !== 'production' && !isValidMap(states)) { - console.error('[vuex] states parameter must be either an Array/Object') + console.error('[vuex] mapState: mapper parameter must be either an Array or an Object') } normalizeMap(states).forEach(({ key, val }) => { res[key] = function mappedState () { @@ -42,7 +42,7 @@ export const mapState = normalizeNamespace((namespace, states) => { export const mapMutations = normalizeNamespace((namespace, mutations) => { const res = {} if (process.env.NODE_ENV !== 'production' && !isValidMap(mutations)) { - console.error('[vuex] mutations parameter must be either an Array/Object') + console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object') } normalizeMap(mutations).forEach(({ key, val }) => { res[key] = function mappedMutation (...args) { @@ -72,7 +72,7 @@ export const mapMutations = normalizeNamespace((namespace, mutations) => { export const mapGetters = normalizeNamespace((namespace, getters) => { const res = {} if (process.env.NODE_ENV !== 'production' && !isValidMap(getters)) { - console.error('[vuex] getters parameter must be either an Array/Object') + console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object') } normalizeMap(getters).forEach(({ key, val }) => { // The namespace has been mutated by normalizeNamespace @@ -102,7 +102,7 @@ export const mapGetters = normalizeNamespace((namespace, getters) => { export const mapActions = normalizeNamespace((namespace, actions) => { const res = {} if (process.env.NODE_ENV !== 'production' && !isValidMap(actions)) { - console.error('[vuex] actions parameter must be either an Array/Object') + console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object') } normalizeMap(actions).forEach(({ key, val }) => { res[key] = function mappedAction (...args) { diff --git a/test/unit/helpers.spec.js b/test/unit/helpers.spec.js index f1689f622..e3d5ee44c 100644 --- a/test/unit/helpers.spec.js +++ b/test/unit/helpers.spec.js @@ -95,6 +95,7 @@ describe('Helpers', () => { }) it('mapState (with undefined states)', () => { + spyOn(console, 'error') const store = new Vuex.Store({ modules: { foo: { @@ -108,6 +109,7 @@ describe('Helpers', () => { computed: mapState('foo') }) expect(vm.a).toBeUndefined() + expect(console.error).toHaveBeenCalledWith('[vuex] mapState: mapper parameter must be either an Array or an Object') }) it('mapMutations (array)', () => { @@ -223,6 +225,7 @@ describe('Helpers', () => { }) it('mapMutations (with undefined mutations)', () => { + spyOn(console, 'error') const store = new Vuex.Store({ modules: { foo: { @@ -241,6 +244,7 @@ describe('Helpers', () => { }) expect(vm.inc).toBeUndefined() expect(vm.dec).toBeUndefined() + expect(console.error).toHaveBeenCalledWith('[vuex] mapMutations: mapper parameter must be either an Array or an Object') }) it('mapGetters (array)', () => { @@ -389,6 +393,7 @@ describe('Helpers', () => { }) it('mapGetters (with undefined getters)', () => { + spyOn(console, 'error') const store = new Vuex.Store({ modules: { foo: { @@ -411,6 +416,7 @@ describe('Helpers', () => { }) expect(vm.a).toBeUndefined() expect(vm.b).toBeUndefined() + expect(console.error).toHaveBeenCalledWith('[vuex] mapGetters: mapper parameter must be either an Array or an Object') }) it('mapActions (array)', () => { @@ -524,6 +530,7 @@ describe('Helpers', () => { }) it('mapActions (with undefined actions)', () => { + spyOn(console, 'error') const a = jasmine.createSpy() const store = new Vuex.Store({ modules: { @@ -541,6 +548,7 @@ describe('Helpers', () => { }) expect(vm.a).toBeUndefined() expect(a).not.toHaveBeenCalled() + expect(console.error).toHaveBeenCalledWith('[vuex] mapActions: mapper parameter must be either an Array or an Object') }) it('createNamespacedHelpers', () => { From d4d04305e0fb2df4a8926d57ff5fcd3ffc9a08f1 Mon Sep 17 00:00:00 2001 From: katashin Date: Sun, 10 Nov 2019 23:21:36 +0800 Subject: [PATCH 047/280] docs: update on object spread syntax (#1642) --- docs/fr/guide/mutations.md | 2 +- docs/fr/guide/state.md | 2 +- docs/guide/mutations.md | 2 +- docs/guide/state.md | 2 +- docs/ja/guide/mutations.md | 2 +- docs/ja/guide/state.md | 2 +- docs/kr/guide/mutations.md | 2 +- docs/kr/guide/state.md | 2 +- docs/ptbr/guide/mutations.md | 2 +- docs/ptbr/guide/state.md | 2 +- docs/ru/guide/mutations.md | 2 +- docs/ru/guide/state.md | 2 +- docs/zh/guide/mutations.md | 2 +- docs/zh/guide/state.md | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/fr/guide/mutations.md b/docs/fr/guide/mutations.md index edc1f8261..93d6fc382 100644 --- a/docs/fr/guide/mutations.md +++ b/docs/fr/guide/mutations.md @@ -88,7 +88,7 @@ Puisqu'un état de store de Vuex est rendu réactif par Vue, lorsque nous mutons - Utiliser `Vue.set(obj, 'newProp', 123)`, ou - - Remplacer cet objet par un nouvel objet. Par exemple, en utilisant [opérateur de décomposition](https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Op%C3%A9rateurs/Op%C3%A9rateur_de_d%C3%A9composition) (stage-2), il est possible d'écrire : + - Remplacer cet objet par un nouvel objet. Par exemple, en utilisant [opérateur de décomposition](https://github.com/tc39/proposal-object-rest-spread), il est possible d'écrire : ``` js state.obj = { ...state.obj, newProp: 123 } diff --git a/docs/fr/guide/state.md b/docs/fr/guide/state.md index 84ad0f44e..6fbca4e16 100644 --- a/docs/fr/guide/state.md +++ b/docs/fr/guide/state.md @@ -96,7 +96,7 @@ computed: mapState([ ### Opérateur de décomposition -Notez que `mapState` renvoie un objet. Comment l'utiliser en complément des autres propriétés calculées locales ? Normalement, il faudrait utiliser un outil pour fusionner les multiples objets en un seul afin de passer cet objet final à `computed`. Cependant avec l'[opérateur de décomposition](https://github.com/sebmarkbage/ecmascript-rest-spread) (qui est une proposition stage-4 ECMAScript), nous pouvons grandement simplifier la syntaxe : +Notez que `mapState` renvoie un objet. Comment l'utiliser en complément des autres propriétés calculées locales ? Normalement, il faudrait utiliser un outil pour fusionner les multiples objets en un seul afin de passer cet objet final à `computed`. Cependant avec l'[opérateur de décomposition](https://github.com/tc39/proposal-object-rest-spread), nous pouvons grandement simplifier la syntaxe : ``` js computed: { diff --git a/docs/guide/mutations.md b/docs/guide/mutations.md index 8c206529c..14b3048bc 100644 --- a/docs/guide/mutations.md +++ b/docs/guide/mutations.md @@ -88,7 +88,7 @@ Since a Vuex store's state is made reactive by Vue, when we mutate the state, Vu - Use `Vue.set(obj, 'newProp', 123)`, or - - Replace that Object with a fresh one. For example, using the [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) we can write it like this: + - Replace that Object with a fresh one. For example, using the [object spread syntax](https://github.com/tc39/proposal-object-rest-spread) we can write it like this: ``` js state.obj = { ...state.obj, newProp: 123 } diff --git a/docs/guide/state.md b/docs/guide/state.md index 584b9db3d..0880278e4 100644 --- a/docs/guide/state.md +++ b/docs/guide/state.md @@ -98,7 +98,7 @@ computed: mapState([ ### Object Spread Operator -Note that `mapState` returns an object. How do we use it in combination with other local computed properties? Normally, we'd have to use a utility to merge multiple objects into one so that we can pass the final object to `computed`. However with the [object spread operator](https://github.com/sebmarkbage/ecmascript-rest-spread) (which is a stage-4 ECMAScript proposal), we can greatly simplify the syntax: +Note that `mapState` returns an object. How do we use it in combination with other local computed properties? Normally, we'd have to use a utility to merge multiple objects into one so that we can pass the final object to `computed`. However with the [object spread operator](https://github.com/tc39/proposal-object-rest-spread), we can greatly simplify the syntax: ``` js computed: { diff --git a/docs/ja/guide/mutations.md b/docs/ja/guide/mutations.md index dfd4898e8..961a98fce 100644 --- a/docs/ja/guide/mutations.md +++ b/docs/ja/guide/mutations.md @@ -90,7 +90,7 @@ Vuex ストアの状態は Vue によってリアクティブになっている - `Vue.set(obj, 'newProp', 123)` を使用する。あるいは - - 全く新しいオブジェクトで既存のオブジェクトを置き換える。例えば、[スプレッドシンタックス(object spread syntax)](https://github.com/sebmarkbage/ecmascript-rest-spread) を使用して、次のように書くことができます: + - 全く新しいオブジェクトで既存のオブジェクトを置き換える。例えば、[スプレッドシンタックス(object spread syntax)](https://github.com/tc39/proposal-object-rest-spread) を使用して、次のように書くことができます: ``` js state.obj = { ...state.obj, newProp: 123 } diff --git a/docs/ja/guide/state.md b/docs/ja/guide/state.md index 7141db0de..5491ff6f4 100644 --- a/docs/ja/guide/state.md +++ b/docs/ja/guide/state.md @@ -93,7 +93,7 @@ computed: mapState([ ### オブジェクトスプレッド演算子 -`mapState` はオブジェクトを返すことに注意しましょう。どうやって、他のローカル算出プロパティと組み合わせるのでしょうか? 通常、最終的にひとつのオブジェクトを `computed` に渡せるように、複数のオブジェクトをひとつにマージするユーティリティを使わなければいけません。しかし、[オブジェクトスプレッド演算子](https://github.com/sebmarkbage/ecmascript-rest-spread) (ECMAScript プロポーサルの state-4 です) で、シンタックスをかなり単純にできます: +`mapState` はオブジェクトを返すことに注意しましょう。どうやって、他のローカル算出プロパティと組み合わせるのでしょうか? 通常、最終的にひとつのオブジェクトを `computed` に渡せるように、複数のオブジェクトをひとつにマージするユーティリティを使わなければいけません。しかし、[オブジェクトスプレッド演算子](https://github.com/tc39/proposal-object-rest-spread)で、シンタックスをかなり単純にできます: ```js computed: { diff --git a/docs/kr/guide/mutations.md b/docs/kr/guide/mutations.md index 1f7f0f156..d4fe820c5 100644 --- a/docs/kr/guide/mutations.md +++ b/docs/kr/guide/mutations.md @@ -87,7 +87,7 @@ Vuex 저장소의 상태는 Vue에 의해 반응하므로, 상태를 변경하 - `Vue.set(obj, 'newProp', 123)`을 사용하거나, - - 객체를 새로운 것으로 교체하십시오. 예를 들어, 3 단계 [객체 확산 문법](https://github.com/sebmarkbage/ecmascript-rest-spread)을 사용하면 다음과 같이 작성할 수 있습니다. + - 객체를 새로운 것으로 교체하십시오. 예를 들어, [객체 확산 문법](https://github.com/tc39/proposal-object-rest-spread)을 사용하면 다음과 같이 작성할 수 있습니다. ``` js state.obj = { ...state.obj, newProp: 123 } diff --git a/docs/kr/guide/state.md b/docs/kr/guide/state.md index 5dc74f04e..c44dba9d8 100644 --- a/docs/kr/guide/state.md +++ b/docs/kr/guide/state.md @@ -96,7 +96,7 @@ computed: mapState([ ### 객체 전개 연산자 (Object Spread Operator) -`mapState`는 객체를 반환합니다. 다른 로컬 영역의 계산된 속성과 함께 사용하려면 어떻게 해야 하나요? 일반적으로, 최종 객체를 `computed`에 전달할 수 있도록 여러 객체를 하나로 병합하는 유틸리티를 사용해야합니다. 그러나 (3 단계 ECMAScript 스펙) [객체 전개 연산자 (Object Spread Operator)](https://github.com/sebmarkbage/ecmascript-rest-spread)을 사용하면 문법을 매우 단순화 할 수 있습니다. +`mapState`는 객체를 반환합니다. 다른 로컬 영역의 계산된 속성과 함께 사용하려면 어떻게 해야 하나요? 일반적으로, 최종 객체를 `computed`에 전달할 수 있도록 여러 객체를 하나로 병합하는 유틸리티를 사용해야합니다. 그러나 [객체 전개 연산자 (Object Spread Operator)](https://github.com/tc39/proposal-object-rest-spread)을 사용하면 문법을 매우 단순화 할 수 있습니다. ``` js computed: { diff --git a/docs/ptbr/guide/mutations.md b/docs/ptbr/guide/mutations.md index 773f659ec..924ca4a38 100644 --- a/docs/ptbr/guide/mutations.md +++ b/docs/ptbr/guide/mutations.md @@ -88,7 +88,7 @@ Como o estado de um _store_ Vuex é reativado pelo Vue, quando alteramos o estad - Usar `Vue.set(obj, 'newProp', 123)`, ou - - Substitua esse objeto por um novo. Por exemplo, usando o _stage-3_ [object spread syntax](https://github.com/sebmarkbage/ecmascript-rest-spread) nós podemos escrevê-lo assim: + - Substitua esse objeto por um novo. Por exemplo, usando o [object spread syntax](https://github.com/tc39/proposal-object-rest-spread) nós podemos escrevê-lo assim: ``` js state.obj = { ...state.obj, newProp: 123 } diff --git a/docs/ptbr/guide/state.md b/docs/ptbr/guide/state.md index 676c2905f..70a7f4d6a 100644 --- a/docs/ptbr/guide/state.md +++ b/docs/ptbr/guide/state.md @@ -98,7 +98,7 @@ computed: mapState([ ### Objeto Spread Operator -Observe que _mapState_ retorna um objeto. Como usá-lo em combinação com outros dados computados locais? Normalmente, teríamos que usar um utilitário para fundir vários objetos em um para que possamos passar o objeto final para `computado`. No entanto, com o [Spread Operator](https://github.com/sebmarkbage/ecmascript-rest-spread) (que é uma proposta de ECMAScript em estágio 4), podemos simplificar muito a sintaxe: +Observe que _mapState_ retorna um objeto. Como usá-lo em combinação com outros dados computados locais? Normalmente, teríamos que usar um utilitário para fundir vários objetos em um para que possamos passar o objeto final para `computado`. No entanto, com o [Spread Operator](https://github.com/tc39/proposal-object-rest-spread), podemos simplificar muito a sintaxe: ``` js computed: { diff --git a/docs/ru/guide/mutations.md b/docs/ru/guide/mutations.md index cfca0198e..b6e4df042 100644 --- a/docs/ru/guide/mutations.md +++ b/docs/ru/guide/mutations.md @@ -89,7 +89,7 @@ mutations: { * Использовать `Vue.set(obj, 'newProp', 123)`, или - * Целиком заменить старый объект новым. Например, используя [синтаксис расширения объектов](https://github.com/sebmarkbage/ecmascript-rest-spread) можно написать так: + * Целиком заменить старый объект новым. Например, используя [синтаксис расширения объектов](https://github.com/tc39/proposal-object-rest-spread) можно написать так: ```js state.obj = { ...state.obj, newProp: 123 }; diff --git a/docs/ru/guide/state.md b/docs/ru/guide/state.md index 25c064ab2..2abd3f26c 100644 --- a/docs/ru/guide/state.md +++ b/docs/ru/guide/state.md @@ -99,7 +99,7 @@ computed: mapState([ ### Оператор распространения объектов -Обратите внимание, `mapState` возвращает объект. Как же его использовать в сочетании с другими локальными вычисляемыми свойствами? Для этого обычно приходилось использовать вспомогательные утилиты для объединения нескольких объектов в один, который передавать в `computed`. Однако, с помощью [оператора распространения объектов](https://github.com/sebmarkbage/ecmascript-rest-spread) (предложение находится в статусе stage-4 ECMAScript) можно значительно упростить синтаксис: +Обратите внимание, `mapState` возвращает объект. Как же его использовать в сочетании с другими локальными вычисляемыми свойствами? Для этого обычно приходилось использовать вспомогательные утилиты для объединения нескольких объектов в один, который передавать в `computed`. Однако, с помощью [оператора распространения объектов](https://github.com/tc39/proposal-object-rest-spread) можно значительно упростить синтаксис: ```js computed: { diff --git a/docs/zh/guide/mutations.md b/docs/zh/guide/mutations.md index 25dccb5ac..f03e49dae 100644 --- a/docs/zh/guide/mutations.md +++ b/docs/zh/guide/mutations.md @@ -88,7 +88,7 @@ mutations: { - 使用 `Vue.set(obj, 'newProp', 123)`, 或者 - - 以新对象替换老对象。例如,利用 stage-3 的[对象展开运算符](https://github.com/sebmarkbage/ecmascript-rest-spread)我们可以这样写: + - 以新对象替换老对象。例如,利用[对象展开运算符](https://github.com/tc39/proposal-object-rest-spread)我们可以这样写: ``` js state.obj = { ...state.obj, newProp: 123 } diff --git a/docs/zh/guide/state.md b/docs/zh/guide/state.md index bd6295d8d..4a8bd56c6 100644 --- a/docs/zh/guide/state.md +++ b/docs/zh/guide/state.md @@ -97,7 +97,7 @@ computed: mapState([ ### 对象展开运算符 -`mapState` 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 `computed` 属性。但是自从有了[对象展开运算符](https://github.com/sebmarkbage/ecmascript-rest-spread)(现处于 ECMAScript 提案 stage-4 阶段),我们可以极大地简化写法: +`mapState` 函数返回的是一个对象。我们如何将它与局部计算属性混合使用呢?通常,我们需要使用一个工具函数将多个对象合并为一个,以使我们可以将最终对象传给 `computed` 属性。但是自从有了[对象展开运算符](https://github.com/tc39/proposal-object-rest-spread),我们可以极大地简化写法: ``` js computed: { From 1ed9a03b5dd1d4b8fbd8ac860d69c78d84289661 Mon Sep 17 00:00:00 2001 From: ktsn Date: Sun, 10 Nov 2019 23:32:16 +0800 Subject: [PATCH 048/280] [build] 3.1.2 --- dist/vuex.common.js | 85 ++++++++++++++++++++++++++---------- dist/vuex.esm.browser.js | 85 ++++++++++++++++++++++++++---------- dist/vuex.esm.browser.min.js | 4 +- dist/vuex.esm.js | 85 ++++++++++++++++++++++++++---------- dist/vuex.js | 85 ++++++++++++++++++++++++++---------- dist/vuex.min.js | 4 +- 6 files changed, 252 insertions(+), 96 deletions(-) diff --git a/dist/vuex.common.js b/dist/vuex.common.js index 28e5f9450..d30eab0ec 100644 --- a/dist/vuex.common.js +++ b/dist/vuex.common.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.1 + * vuex v3.1.2 * (c) 2019 Evan You * @license MIT */ @@ -323,6 +323,7 @@ var Store = function Store (options) { this._modulesNamespaceMap = Object.create(null); this._subscribers = []; this._watcherVM = new Vue(); + this._makeLocalGettersCache = Object.create(null); // bind commit and dispatch to self var store = this; @@ -555,12 +556,14 @@ function resetStoreVM (store, state, hot) { // bind store public getters store.getters = {}; + // reset local getters cache + store._makeLocalGettersCache = Object.create(null); var wrappedGetters = store._wrappedGetters; var computed = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldVm. - // using partial to return function with only arguments preserved in closure enviroment. + // using partial to return function with only arguments preserved in closure environment. computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: function () { return store._vm[key]; }, @@ -604,6 +607,9 @@ function installModule (store, rootState, path, module, hot) { // register in namespace map if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && process.env.NODE_ENV !== 'production') { + console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); + } store._modulesNamespaceMap[namespace] = module; } @@ -612,6 +618,13 @@ function installModule (store, rootState, path, module, hot) { var parentState = getNestedState(rootState, path.slice(0, -1)); var moduleName = path[path.length - 1]; store._withCommit(function () { + if (process.env.NODE_ENV !== 'production') { + if (moduleName in parentState) { + console.warn( + ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"") + ); + } + } Vue.set(parentState, moduleName, module.state); }); } @@ -699,26 +712,28 @@ function makeLocalContext (store, namespace, path) { } function makeLocalGetters (store, namespace) { - var gettersProxy = {}; - - var splitPos = namespace.length; - Object.keys(store.getters).forEach(function (type) { - // skip if the target getter is not match this namespace - if (type.slice(0, splitPos) !== namespace) { return } - - // extract local getter type - var localType = type.slice(splitPos); - - // Add a port to the getters proxy. - // Define as getter property because - // we do not want to evaluate the getters in this time. - Object.defineProperty(gettersProxy, localType, { - get: function () { return store.getters[type]; }, - enumerable: true + if (!store._makeLocalGettersCache[namespace]) { + var gettersProxy = {}; + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); }); - }); + store._makeLocalGettersCache[namespace] = gettersProxy; + } - return gettersProxy + return store._makeLocalGettersCache[namespace] } function registerMutation (store, type, handler, local) { @@ -730,7 +745,7 @@ function registerMutation (store, type, handler, local) { function registerAction (store, type, handler, local) { var entry = store._actions[type] || (store._actions[type] = []); - entry.push(function wrappedActionHandler (payload, cb) { + entry.push(function wrappedActionHandler (payload) { var res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, @@ -738,7 +753,7 @@ function registerAction (store, type, handler, local) { state: local.state, rootGetters: store.getters, rootState: store.state - }, payload, cb); + }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } @@ -819,6 +834,9 @@ function install (_Vue) { */ var mapState = normalizeNamespace(function (namespace, states) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(states)) { + console.error('[vuex] mapState: mapper parameter must be either an Array or an Object'); + } normalizeMap(states).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -852,6 +870,9 @@ var mapState = normalizeNamespace(function (namespace, states) { */ var mapMutations = normalizeNamespace(function (namespace, mutations) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(mutations)) { + console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object'); + } normalizeMap(mutations).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -885,6 +906,9 @@ var mapMutations = normalizeNamespace(function (namespace, mutations) { */ var mapGetters = normalizeNamespace(function (namespace, getters) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(getters)) { + console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object'); + } normalizeMap(getters).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -915,6 +939,9 @@ var mapGetters = normalizeNamespace(function (namespace, getters) { */ var mapActions = normalizeNamespace(function (namespace, actions) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(actions)) { + console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object'); + } normalizeMap(actions).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -960,11 +987,23 @@ var createNamespacedHelpers = function (namespace) { return ({ * @return {Object} */ function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } return Array.isArray(map) ? map.map(function (key) { return ({ key: key, val: key }); }) : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) } +/** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ +function isValidMap (map) { + return Array.isArray(map) || isObject(map) +} + /** * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {Function} fn @@ -1000,7 +1039,7 @@ function getModuleByNamespace (store, helper, namespace) { var index = { Store: Store, install: install, - version: '3.1.1', + version: '3.1.2', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.esm.browser.js b/dist/vuex.esm.browser.js index 679a5d842..5f8749be6 100644 --- a/dist/vuex.esm.browser.js +++ b/dist/vuex.esm.browser.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.1 + * vuex v3.1.2 * (c) 2019 Evan You * @license MIT */ @@ -316,6 +316,7 @@ class Store { this._modulesNamespaceMap = Object.create(null); this._subscribers = []; this._watcherVM = new Vue(); + this._makeLocalGettersCache = Object.create(null); // bind commit and dispatch to self const store = this; @@ -532,12 +533,14 @@ function resetStoreVM (store, state, hot) { // bind store public getters store.getters = {}; + // reset local getters cache + store._makeLocalGettersCache = Object.create(null); const wrappedGetters = store._wrappedGetters; const computed = {}; forEachValue(wrappedGetters, (fn, key) => { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldVm. - // using partial to return function with only arguments preserved in closure enviroment. + // using partial to return function with only arguments preserved in closure environment. computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: () => store._vm[key], @@ -581,6 +584,9 @@ function installModule (store, rootState, path, module, hot) { // register in namespace map if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && "development" !== 'production') { + console.error(`[vuex] duplicate namespace ${namespace} for the namespaced module ${path.join('/')}`); + } store._modulesNamespaceMap[namespace] = module; } @@ -589,6 +595,13 @@ function installModule (store, rootState, path, module, hot) { const parentState = getNestedState(rootState, path.slice(0, -1)); const moduleName = path[path.length - 1]; store._withCommit(() => { + { + if (moduleName in parentState) { + console.warn( + `[vuex] state field "${moduleName}" was overridden by a module with the same name at "${path.join('.')}"` + ); + } + } Vue.set(parentState, moduleName, module.state); }); } @@ -674,26 +687,28 @@ function makeLocalContext (store, namespace, path) { } function makeLocalGetters (store, namespace) { - const gettersProxy = {}; - - const splitPos = namespace.length; - Object.keys(store.getters).forEach(type => { - // skip if the target getter is not match this namespace - if (type.slice(0, splitPos) !== namespace) return - - // extract local getter type - const localType = type.slice(splitPos); - - // Add a port to the getters proxy. - // Define as getter property because - // we do not want to evaluate the getters in this time. - Object.defineProperty(gettersProxy, localType, { - get: () => store.getters[type], - enumerable: true + if (!store._makeLocalGettersCache[namespace]) { + const gettersProxy = {}; + const splitPos = namespace.length; + Object.keys(store.getters).forEach(type => { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) return + + // extract local getter type + const localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: () => store.getters[type], + enumerable: true + }); }); - }); + store._makeLocalGettersCache[namespace] = gettersProxy; + } - return gettersProxy + return store._makeLocalGettersCache[namespace] } function registerMutation (store, type, handler, local) { @@ -705,7 +720,7 @@ function registerMutation (store, type, handler, local) { function registerAction (store, type, handler, local) { const entry = store._actions[type] || (store._actions[type] = []); - entry.push(function wrappedActionHandler (payload, cb) { + entry.push(function wrappedActionHandler (payload) { let res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, @@ -713,7 +728,7 @@ function registerAction (store, type, handler, local) { state: local.state, rootGetters: store.getters, rootState: store.state - }, payload, cb); + }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } @@ -794,6 +809,9 @@ function install (_Vue) { */ const mapState = normalizeNamespace((namespace, states) => { const res = {}; + if (!isValidMap(states)) { + console.error('[vuex] mapState: mapper parameter must be either an Array or an Object'); + } normalizeMap(states).forEach(({ key, val }) => { res[key] = function mappedState () { let state = this.$store.state; @@ -824,6 +842,9 @@ const mapState = normalizeNamespace((namespace, states) => { */ const mapMutations = normalizeNamespace((namespace, mutations) => { const res = {}; + if (!isValidMap(mutations)) { + console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object'); + } normalizeMap(mutations).forEach(({ key, val }) => { res[key] = function mappedMutation (...args) { // Get the commit method from store @@ -851,6 +872,9 @@ const mapMutations = normalizeNamespace((namespace, mutations) => { */ const mapGetters = normalizeNamespace((namespace, getters) => { const res = {}; + if (!isValidMap(getters)) { + console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object'); + } normalizeMap(getters).forEach(({ key, val }) => { // The namespace has been mutated by normalizeNamespace val = namespace + val; @@ -878,6 +902,9 @@ const mapGetters = normalizeNamespace((namespace, getters) => { */ const mapActions = normalizeNamespace((namespace, actions) => { const res = {}; + if (!isValidMap(actions)) { + console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object'); + } normalizeMap(actions).forEach(({ key, val }) => { res[key] = function mappedAction (...args) { // get dispatch function from store @@ -917,11 +944,23 @@ const createNamespacedHelpers = (namespace) => ({ * @return {Object} */ function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } return Array.isArray(map) ? map.map(key => ({ key, val: key })) : Object.keys(map).map(key => ({ key, val: map[key] })) } +/** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ +function isValidMap (map) { + return Array.isArray(map) || isObject(map) +} + /** * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {Function} fn @@ -957,7 +996,7 @@ function getModuleByNamespace (store, helper, namespace) { var index_esm = { Store, install, - version: '3.1.1', + version: '3.1.2', mapState, mapMutations, mapGetters, diff --git a/dist/vuex.esm.browser.min.js b/dist/vuex.esm.browser.min.js index 1261afbd1..ab6f953da 100644 --- a/dist/vuex.esm.browser.min.js +++ b/dist/vuex.esm.browser.min.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.1 + * vuex v3.1.2 * (c) 2019 Evan You * @license MIT */ -const t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(s=>e(t[s],s))}class s{constructor(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;const s=t.state;this.state=("function"==typeof s?s():s)||{}}get namespaced(){return!!this._rawModule.namespaced}addChild(t,e){this._children[t]=e}removeChild(t){delete this._children[t]}getChild(t){return this._children[t]}update(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)}forEachChild(t){e(this._children,t)}forEachGetter(t){this._rawModule.getters&&e(this._rawModule.getters,t)}forEachAction(t){this._rawModule.actions&&e(this._rawModule.actions,t)}forEachMutation(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)}}class i{constructor(t){this.register([],t,!1)}get(t){return t.reduce((t,e)=>t.getChild(e),this.root)}getNamespace(t){let e=this.root;return t.reduce((t,s)=>t+((e=e.getChild(s)).namespaced?s+"/":""),"")}update(t){!function t(e,s,i){s.update(i);if(i.modules)for(const o in i.modules){if(!s.getChild(o))return;t(e.concat(o),s.getChild(o),i.modules[o])}}([],this.root,t)}register(t,i,o=!0){const n=new s(i,o);if(0===t.length)this.root=n;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],n)}i.modules&&e(i.modules,(e,s)=>{this.register(t.concat(s),e,o)})}unregister(t){const e=this.get(t.slice(0,-1)),s=t[t.length-1];e.getChild(s).runtime&&e.removeChild(s)}}let o;class n{constructor(e={}){!o&&"undefined"!=typeof window&&window.Vue&&d(window.Vue);const{plugins:s=[],strict:n=!1}=e;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new i(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new o;const r=this,{dispatch:c,commit:h}=this;this.dispatch=function(t,e){return c.call(r,t,e)},this.commit=function(t,e,s){return h.call(r,t,e,s)},this.strict=n;const l=this._modules.root.state;u(this,l,[],this._modules.root),a(this,l),s.forEach(t=>t(this)),(void 0!==e.devtools?e.devtools:o.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",t=>{e.replaceState(t)}),e.subscribe((e,s)=>{t.emit("vuex:mutation",e,s)}))}(this)}get state(){return this._vm._data.$$state}set state(t){}commit(t,e,s){const{type:i,payload:o,options:n}=l(t,e,s),r={type:i,payload:o},c=this._mutations[i];c&&(this._withCommit(()=>{c.forEach(function(t){t(o)})}),this._subscribers.forEach(t=>t(r,this.state)))}dispatch(t,e){const{type:s,payload:i}=l(t,e),o={type:s,payload:i},n=this._actions[s];if(n){try{this._actionSubscribers.filter(t=>t.before).forEach(t=>t.before(o,this.state))}catch(t){}return(n.length>1?Promise.all(n.map(t=>t(i))):n[0](i)).then(t=>{try{this._actionSubscribers.filter(t=>t.after).forEach(t=>t.after(o,this.state))}catch(t){}return t})}}subscribe(t){return r(t,this._subscribers)}subscribeAction(t){return r("function"==typeof t?{before:t}:t,this._actionSubscribers)}watch(t,e,s){return this._watcherVM.$watch(()=>t(this.state,this.getters),e,s)}replaceState(t){this._withCommit(()=>{this._vm._data.$$state=t})}registerModule(t,e,s={}){"string"==typeof t&&(t=[t]),this._modules.register(t,e),u(this,this.state,t,this._modules.get(t),s.preserveState),a(this,this.state)}unregisterModule(t){"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(()=>{const e=h(this.state,t.slice(0,-1));o.delete(e,t[t.length-1])}),c(this)}hotUpdate(t){this._modules.update(t),c(this,!0)}_withCommit(t){const e=this._committing;this._committing=!0,t(),this._committing=e}}function r(t,e){return e.indexOf(t)<0&&e.push(t),()=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)}}function c(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);const s=t.state;u(t,s,[],t._modules.root,!0),a(t,s,e)}function a(t,s,i){const n=t._vm;t.getters={};const r=t._wrappedGetters,c={};e(r,(e,s)=>{c[s]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,s,{get:()=>t._vm[s],enumerable:!0})});const a=o.config.silent;o.config.silent=!0,t._vm=new o({data:{$$state:s},computed:c}),o.config.silent=a,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},()=>{},{deep:!0,sync:!0})}(t),n&&(i&&t._withCommit(()=>{n._data.$$state=null}),o.nextTick(()=>n.$destroy()))}function u(t,e,s,i,n){const r=!s.length,c=t._modules.getNamespace(s);if(i.namespaced&&(t._modulesNamespaceMap[c]=i),!r&&!n){const n=h(e,s.slice(0,-1)),r=s[s.length-1];t._withCommit(()=>{o.set(n,r,i.state)})}const a=i.context=function(t,e,s){const i=""===e,o={dispatch:i?t.dispatch:(s,i,o)=>{const n=l(s,i,o),{payload:r,options:c}=n;let{type:a}=n;return c&&c.root||(a=e+a),t.dispatch(a,r)},commit:i?t.commit:(s,i,o)=>{const n=l(s,i,o),{payload:r,options:c}=n;let{type:a}=n;c&&c.root||(a=e+a),t.commit(a,r,c)}};return Object.defineProperties(o,{getters:{get:i?()=>t.getters:()=>(function(t,e){const s={},i=e.length;return Object.keys(t.getters).forEach(o=>{if(o.slice(0,i)!==e)return;const n=o.slice(i);Object.defineProperty(s,n,{get:()=>t.getters[o],enumerable:!0})}),s})(t,e)},state:{get:()=>h(t.state,s)}}),o}(t,c,s);i.forEachMutation((e,s)=>{!function(t,e,s,i){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){s.call(t,i.state,e)})}(t,c+s,e,a)}),i.forEachAction((e,s)=>{const i=e.root?s:c+s,o=e.handler||e;!function(t,e,s,i){(t._actions[e]||(t._actions[e]=[])).push(function(e,o){let n=s.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e,o);var r;return(r=n)&&"function"==typeof r.then||(n=Promise.resolve(n)),t._devtoolHook?n.catch(e=>{throw t._devtoolHook.emit("vuex:error",e),e}):n})}(t,i,o,a)}),i.forEachGetter((e,s)=>{!function(t,e,s,i){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return s(i.state,i.getters,t.state,t.getters)}}(t,c+s,e,a)}),i.forEachChild((i,o)=>{u(t,e,s.concat(o),i,n)})}function h(t,e){return e.length?e.reduce((t,e)=>t[e],t):t}function l(t,e,s){var i;return null!==(i=t)&&"object"==typeof i&&t.type&&(s=e,e=t,t=t.type),{type:t,payload:e,options:s}}function d(t){o&&t===o||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{const s=t.prototype._init;t.prototype._init=function(t={}){t.init=t.init?[e].concat(t.init):e,s.call(this,t)}}function e(){const t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(o=t)}const p=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{s[e]=function(){let e=this.$store.state,s=this.$store.getters;if(t){const i=w(this.$store,"mapState",t);if(!i)return;e=i.context.state,s=i.context.getters}return"function"==typeof i?i.call(this,e,s):e[i]},s[e].vuex=!0}),s}),m=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.commit;if(t){const e=w(this.$store,"mapMutations",t);if(!e)return;s=e.context.commit}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),f=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{i=t+i,s[e]=function(){if(!t||w(this.$store,"mapGetters",t))return this.$store.getters[i]},s[e].vuex=!0}),s}),_=b((t,e)=>{const s={};return y(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.dispatch;if(t){const e=w(this.$store,"mapActions",t);if(!e)return;s=e.context.dispatch}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),g=t=>({mapState:p.bind(null,t),mapGetters:f.bind(null,t),mapMutations:m.bind(null,t),mapActions:_.bind(null,t)});function y(t){return Array.isArray(t)?t.map(t=>({key:t,val:t})):Object.keys(t).map(e=>({key:e,val:t[e]}))}function b(t){return(e,s)=>("string"!=typeof e?(s=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,s))}function w(t,e,s){return t._modulesNamespaceMap[s]}export default{Store:n,install:d,version:"3.1.1",mapState:p,mapMutations:m,mapGetters:f,mapActions:_,createNamespacedHelpers:g};export{n as Store,d as install,p as mapState,m as mapMutations,f as mapGetters,_ as mapActions,g as createNamespacedHelpers}; \ No newline at end of file +const t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(s=>e(t[s],s))}function s(t){return null!==t&&"object"==typeof t}class i{constructor(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;const s=t.state;this.state=("function"==typeof s?s():s)||{}}get namespaced(){return!!this._rawModule.namespaced}addChild(t,e){this._children[t]=e}removeChild(t){delete this._children[t]}getChild(t){return this._children[t]}update(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)}forEachChild(t){e(this._children,t)}forEachGetter(t){this._rawModule.getters&&e(this._rawModule.getters,t)}forEachAction(t){this._rawModule.actions&&e(this._rawModule.actions,t)}forEachMutation(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)}}class o{constructor(t){this.register([],t,!1)}get(t){return t.reduce((t,e)=>t.getChild(e),this.root)}getNamespace(t){let e=this.root;return t.reduce((t,s)=>t+((e=e.getChild(s)).namespaced?s+"/":""),"")}update(t){!function t(e,s,i){s.update(i);if(i.modules)for(const o in i.modules){if(!s.getChild(o))return;t(e.concat(o),s.getChild(o),i.modules[o])}}([],this.root,t)}register(t,s,o=!0){const n=new i(s,o);if(0===t.length)this.root=n;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],n)}s.modules&&e(s.modules,(e,s)=>{this.register(t.concat(s),e,o)})}unregister(t){const e=this.get(t.slice(0,-1)),s=t[t.length-1];e.getChild(s).runtime&&e.removeChild(s)}}let n;class r{constructor(e={}){!n&&"undefined"!=typeof window&&window.Vue&&p(window.Vue);const{plugins:s=[],strict:i=!1}=e;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new o(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new n,this._makeLocalGettersCache=Object.create(null);const r=this,{dispatch:c,commit:a}=this;this.dispatch=function(t,e){return c.call(r,t,e)},this.commit=function(t,e,s){return a.call(r,t,e,s)},this.strict=i;const l=this._modules.root.state;h(this,l,[],this._modules.root),u(this,l),s.forEach(t=>t(this)),(void 0!==e.devtools?e.devtools:n.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",t=>{e.replaceState(t)}),e.subscribe((e,s)=>{t.emit("vuex:mutation",e,s)}))}(this)}get state(){return this._vm._data.$$state}set state(t){}commit(t,e,s){const{type:i,payload:o,options:n}=d(t,e,s),r={type:i,payload:o},c=this._mutations[i];c&&(this._withCommit(()=>{c.forEach(function(t){t(o)})}),this._subscribers.forEach(t=>t(r,this.state)))}dispatch(t,e){const{type:s,payload:i}=d(t,e),o={type:s,payload:i},n=this._actions[s];if(n){try{this._actionSubscribers.filter(t=>t.before).forEach(t=>t.before(o,this.state))}catch(t){}return(n.length>1?Promise.all(n.map(t=>t(i))):n[0](i)).then(t=>{try{this._actionSubscribers.filter(t=>t.after).forEach(t=>t.after(o,this.state))}catch(t){}return t})}}subscribe(t){return c(t,this._subscribers)}subscribeAction(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)}watch(t,e,s){return this._watcherVM.$watch(()=>t(this.state,this.getters),e,s)}replaceState(t){this._withCommit(()=>{this._vm._data.$$state=t})}registerModule(t,e,s={}){"string"==typeof t&&(t=[t]),this._modules.register(t,e),h(this,this.state,t,this._modules.get(t),s.preserveState),u(this,this.state)}unregisterModule(t){"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(()=>{const e=l(this.state,t.slice(0,-1));n.delete(e,t[t.length-1])}),a(this)}hotUpdate(t){this._modules.update(t),a(this,!0)}_withCommit(t){const e=this._committing;this._committing=!0,t(),this._committing=e}}function c(t,e){return e.indexOf(t)<0&&e.push(t),()=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)}}function a(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);const s=t.state;h(t,s,[],t._modules.root,!0),u(t,s,e)}function u(t,s,i){const o=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);const r=t._wrappedGetters,c={};e(r,(e,s)=>{c[s]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,s,{get:()=>t._vm[s],enumerable:!0})});const a=n.config.silent;n.config.silent=!0,t._vm=new n({data:{$$state:s},computed:c}),n.config.silent=a,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},()=>{},{deep:!0,sync:!0})}(t),o&&(i&&t._withCommit(()=>{o._data.$$state=null}),n.nextTick(()=>o.$destroy()))}function h(t,e,s,i,o){const r=!s.length,c=t._modules.getNamespace(s);if(i.namespaced&&(t._modulesNamespaceMap[c],t._modulesNamespaceMap[c]=i),!r&&!o){const o=l(e,s.slice(0,-1)),r=s[s.length-1];t._withCommit(()=>{n.set(o,r,i.state)})}const a=i.context=function(t,e,s){const i=""===e,o={dispatch:i?t.dispatch:(s,i,o)=>{const n=d(s,i,o),{payload:r,options:c}=n;let{type:a}=n;return c&&c.root||(a=e+a),t.dispatch(a,r)},commit:i?t.commit:(s,i,o)=>{const n=d(s,i,o),{payload:r,options:c}=n;let{type:a}=n;c&&c.root||(a=e+a),t.commit(a,r,c)}};return Object.defineProperties(o,{getters:{get:i?()=>t.getters:()=>(function(t,e){if(!t._makeLocalGettersCache[e]){const s={},i=e.length;Object.keys(t.getters).forEach(o=>{if(o.slice(0,i)!==e)return;const n=o.slice(i);Object.defineProperty(s,n,{get:()=>t.getters[o],enumerable:!0})}),t._makeLocalGettersCache[e]=s}return t._makeLocalGettersCache[e]})(t,e)},state:{get:()=>l(t.state,s)}}),o}(t,c,s);i.forEachMutation((e,s)=>{!function(t,e,s,i){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){s.call(t,i.state,e)})}(t,c+s,e,a)}),i.forEachAction((e,s)=>{const i=e.root?s:c+s,o=e.handler||e;!function(t,e,s,i){(t._actions[e]||(t._actions[e]=[])).push(function(e){let o=s.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e);var n;return(n=o)&&"function"==typeof n.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch(e=>{throw t._devtoolHook.emit("vuex:error",e),e}):o})}(t,i,o,a)}),i.forEachGetter((e,s)=>{!function(t,e,s,i){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return s(i.state,i.getters,t.state,t.getters)}}(t,c+s,e,a)}),i.forEachChild((i,n)=>{h(t,e,s.concat(n),i,o)})}function l(t,e){return e.length?e.reduce((t,e)=>t[e],t):t}function d(t,e,i){return s(t)&&t.type&&(i=e,e=t,t=t.type),{type:t,payload:e,options:i}}function p(t){n&&t===n||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{const s=t.prototype._init;t.prototype._init=function(t={}){t.init=t.init?[e].concat(t.init):e,s.call(this,t)}}function e(){const t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(n=t)}const m=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(){let e=this.$store.state,s=this.$store.getters;if(t){const i=v(this.$store,"mapState",t);if(!i)return;e=i.context.state,s=i.context.getters}return"function"==typeof i?i.call(this,e,s):e[i]},s[e].vuex=!0}),s}),f=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.commit;if(t){const e=v(this.$store,"mapMutations",t);if(!e)return;s=e.context.commit}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),_=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{i=t+i,s[e]=function(){if(!t||v(this.$store,"mapGetters",t))return this.$store.getters[i]},s[e].vuex=!0}),s}),g=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.dispatch;if(t){const e=v(this.$store,"mapActions",t);if(!e)return;s=e.context.dispatch}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),y=t=>({mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:f.bind(null,t),mapActions:g.bind(null,t)});function b(t){return function(t){return Array.isArray(t)||s(t)}(t)?Array.isArray(t)?t.map(t=>({key:t,val:t})):Object.keys(t).map(e=>({key:e,val:t[e]})):[]}function w(t){return(e,s)=>("string"!=typeof e?(s=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,s))}function v(t,e,s){return t._modulesNamespaceMap[s]}export default{Store:r,install:p,version:"3.1.2",mapState:m,mapMutations:f,mapGetters:_,mapActions:g,createNamespacedHelpers:y};export{r as Store,p as install,m as mapState,f as mapMutations,_ as mapGetters,g as mapActions,y as createNamespacedHelpers}; \ No newline at end of file diff --git a/dist/vuex.esm.js b/dist/vuex.esm.js index 982977b7a..5c704237e 100644 --- a/dist/vuex.esm.js +++ b/dist/vuex.esm.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.1 + * vuex v3.1.2 * (c) 2019 Evan You * @license MIT */ @@ -321,6 +321,7 @@ var Store = function Store (options) { this._modulesNamespaceMap = Object.create(null); this._subscribers = []; this._watcherVM = new Vue(); + this._makeLocalGettersCache = Object.create(null); // bind commit and dispatch to self var store = this; @@ -553,12 +554,14 @@ function resetStoreVM (store, state, hot) { // bind store public getters store.getters = {}; + // reset local getters cache + store._makeLocalGettersCache = Object.create(null); var wrappedGetters = store._wrappedGetters; var computed = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldVm. - // using partial to return function with only arguments preserved in closure enviroment. + // using partial to return function with only arguments preserved in closure environment. computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: function () { return store._vm[key]; }, @@ -602,6 +605,9 @@ function installModule (store, rootState, path, module, hot) { // register in namespace map if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && process.env.NODE_ENV !== 'production') { + console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); + } store._modulesNamespaceMap[namespace] = module; } @@ -610,6 +616,13 @@ function installModule (store, rootState, path, module, hot) { var parentState = getNestedState(rootState, path.slice(0, -1)); var moduleName = path[path.length - 1]; store._withCommit(function () { + if (process.env.NODE_ENV !== 'production') { + if (moduleName in parentState) { + console.warn( + ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"") + ); + } + } Vue.set(parentState, moduleName, module.state); }); } @@ -697,26 +710,28 @@ function makeLocalContext (store, namespace, path) { } function makeLocalGetters (store, namespace) { - var gettersProxy = {}; - - var splitPos = namespace.length; - Object.keys(store.getters).forEach(function (type) { - // skip if the target getter is not match this namespace - if (type.slice(0, splitPos) !== namespace) { return } - - // extract local getter type - var localType = type.slice(splitPos); - - // Add a port to the getters proxy. - // Define as getter property because - // we do not want to evaluate the getters in this time. - Object.defineProperty(gettersProxy, localType, { - get: function () { return store.getters[type]; }, - enumerable: true + if (!store._makeLocalGettersCache[namespace]) { + var gettersProxy = {}; + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); }); - }); + store._makeLocalGettersCache[namespace] = gettersProxy; + } - return gettersProxy + return store._makeLocalGettersCache[namespace] } function registerMutation (store, type, handler, local) { @@ -728,7 +743,7 @@ function registerMutation (store, type, handler, local) { function registerAction (store, type, handler, local) { var entry = store._actions[type] || (store._actions[type] = []); - entry.push(function wrappedActionHandler (payload, cb) { + entry.push(function wrappedActionHandler (payload) { var res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, @@ -736,7 +751,7 @@ function registerAction (store, type, handler, local) { state: local.state, rootGetters: store.getters, rootState: store.state - }, payload, cb); + }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } @@ -817,6 +832,9 @@ function install (_Vue) { */ var mapState = normalizeNamespace(function (namespace, states) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(states)) { + console.error('[vuex] mapState: mapper parameter must be either an Array or an Object'); + } normalizeMap(states).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -850,6 +868,9 @@ var mapState = normalizeNamespace(function (namespace, states) { */ var mapMutations = normalizeNamespace(function (namespace, mutations) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(mutations)) { + console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object'); + } normalizeMap(mutations).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -883,6 +904,9 @@ var mapMutations = normalizeNamespace(function (namespace, mutations) { */ var mapGetters = normalizeNamespace(function (namespace, getters) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(getters)) { + console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object'); + } normalizeMap(getters).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -913,6 +937,9 @@ var mapGetters = normalizeNamespace(function (namespace, getters) { */ var mapActions = normalizeNamespace(function (namespace, actions) { var res = {}; + if (process.env.NODE_ENV !== 'production' && !isValidMap(actions)) { + console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object'); + } normalizeMap(actions).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -958,11 +985,23 @@ var createNamespacedHelpers = function (namespace) { return ({ * @return {Object} */ function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } return Array.isArray(map) ? map.map(function (key) { return ({ key: key, val: key }); }) : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) } +/** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ +function isValidMap (map) { + return Array.isArray(map) || isObject(map) +} + /** * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {Function} fn @@ -998,7 +1037,7 @@ function getModuleByNamespace (store, helper, namespace) { var index_esm = { Store: Store, install: install, - version: '3.1.1', + version: '3.1.2', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.js b/dist/vuex.js index 8ac0fe0dc..ad9a9fb55 100644 --- a/dist/vuex.js +++ b/dist/vuex.js @@ -1,5 +1,5 @@ /** - * vuex v3.1.1 + * vuex v3.1.2 * (c) 2019 Evan You * @license MIT */ @@ -327,6 +327,7 @@ this._modulesNamespaceMap = Object.create(null); this._subscribers = []; this._watcherVM = new Vue(); + this._makeLocalGettersCache = Object.create(null); // bind commit and dispatch to self var store = this; @@ -558,12 +559,14 @@ // bind store public getters store.getters = {}; + // reset local getters cache + store._makeLocalGettersCache = Object.create(null); var wrappedGetters = store._wrappedGetters; var computed = {}; forEachValue(wrappedGetters, function (fn, key) { // use computed to leverage its lazy-caching mechanism // direct inline function use will lead to closure preserving oldVm. - // using partial to return function with only arguments preserved in closure enviroment. + // using partial to return function with only arguments preserved in closure environment. computed[key] = partial(fn, store); Object.defineProperty(store.getters, key, { get: function () { return store._vm[key]; }, @@ -607,6 +610,9 @@ // register in namespace map if (module.namespaced) { + if (store._modulesNamespaceMap[namespace] && "development" !== 'production') { + console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/')))); + } store._modulesNamespaceMap[namespace] = module; } @@ -615,6 +621,13 @@ var parentState = getNestedState(rootState, path.slice(0, -1)); var moduleName = path[path.length - 1]; store._withCommit(function () { + { + if (moduleName in parentState) { + console.warn( + ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"") + ); + } + } Vue.set(parentState, moduleName, module.state); }); } @@ -702,26 +715,28 @@ } function makeLocalGetters (store, namespace) { - var gettersProxy = {}; - - var splitPos = namespace.length; - Object.keys(store.getters).forEach(function (type) { - // skip if the target getter is not match this namespace - if (type.slice(0, splitPos) !== namespace) { return } - - // extract local getter type - var localType = type.slice(splitPos); - - // Add a port to the getters proxy. - // Define as getter property because - // we do not want to evaluate the getters in this time. - Object.defineProperty(gettersProxy, localType, { - get: function () { return store.getters[type]; }, - enumerable: true + if (!store._makeLocalGettersCache[namespace]) { + var gettersProxy = {}; + var splitPos = namespace.length; + Object.keys(store.getters).forEach(function (type) { + // skip if the target getter is not match this namespace + if (type.slice(0, splitPos) !== namespace) { return } + + // extract local getter type + var localType = type.slice(splitPos); + + // Add a port to the getters proxy. + // Define as getter property because + // we do not want to evaluate the getters in this time. + Object.defineProperty(gettersProxy, localType, { + get: function () { return store.getters[type]; }, + enumerable: true + }); }); - }); + store._makeLocalGettersCache[namespace] = gettersProxy; + } - return gettersProxy + return store._makeLocalGettersCache[namespace] } function registerMutation (store, type, handler, local) { @@ -733,7 +748,7 @@ function registerAction (store, type, handler, local) { var entry = store._actions[type] || (store._actions[type] = []); - entry.push(function wrappedActionHandler (payload, cb) { + entry.push(function wrappedActionHandler (payload) { var res = handler.call(store, { dispatch: local.dispatch, commit: local.commit, @@ -741,7 +756,7 @@ state: local.state, rootGetters: store.getters, rootState: store.state - }, payload, cb); + }, payload); if (!isPromise(res)) { res = Promise.resolve(res); } @@ -822,6 +837,9 @@ */ var mapState = normalizeNamespace(function (namespace, states) { var res = {}; + if (!isValidMap(states)) { + console.error('[vuex] mapState: mapper parameter must be either an Array or an Object'); + } normalizeMap(states).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -855,6 +873,9 @@ */ var mapMutations = normalizeNamespace(function (namespace, mutations) { var res = {}; + if (!isValidMap(mutations)) { + console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object'); + } normalizeMap(mutations).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -888,6 +909,9 @@ */ var mapGetters = normalizeNamespace(function (namespace, getters) { var res = {}; + if (!isValidMap(getters)) { + console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object'); + } normalizeMap(getters).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -918,6 +942,9 @@ */ var mapActions = normalizeNamespace(function (namespace, actions) { var res = {}; + if (!isValidMap(actions)) { + console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object'); + } normalizeMap(actions).forEach(function (ref) { var key = ref.key; var val = ref.val; @@ -963,11 +990,23 @@ * @return {Object} */ function normalizeMap (map) { + if (!isValidMap(map)) { + return [] + } return Array.isArray(map) ? map.map(function (key) { return ({ key: key, val: key }); }) : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) } + /** + * Validate whether given map is valid or not + * @param {*} map + * @return {Boolean} + */ + function isValidMap (map) { + return Array.isArray(map) || isObject(map) + } + /** * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map. * @param {Function} fn @@ -1003,7 +1042,7 @@ var index = { Store: Store, install: install, - version: '3.1.1', + version: '3.1.2', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.min.js b/dist/vuex.min.js index 787aee830..41b878bbc 100644 --- a/dist/vuex.min.js +++ b/dist/vuex.min.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.1 + * vuex v3.1.2 * (c) 2019 Evan You * @license MIT */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}var n=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},o={namespaced:{configurable:!0}};o.namespaced.get=function(){return!!this._rawModule.namespaced},n.prototype.addChild=function(t,e){this._children[t]=e},n.prototype.removeChild=function(t){delete this._children[t]},n.prototype.getChild=function(t){return this._children[t]},n.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},n.prototype.forEachChild=function(t){e(this._children,t)},n.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},n.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},n.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(n.prototype,o);var i,r=function(t){this.register([],t,!1)};r.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},r.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},r.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},r.prototype.register=function(t,o,i){var r=this;void 0===i&&(i=!0);var s=new n(o,i);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);o.modules&&e(o.modules,function(e,n){r.register(t.concat(n),e,i)})},r.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var s=function(e){var n=this;void 0===e&&(e={}),!i&&"undefined"!=typeof window&&window.Vue&&d(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var s=e.strict;void 0===s&&(s=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new r(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new i;var a=this,c=this.dispatch,u=this.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=s;var h=this._modules.root.state;p(this,h,[],this._modules.root),f(this,h),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:i.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,n){t.emit("vuex:mutation",e,n)}))}(this)},a={state:{configurable:!0}};function c(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function u(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),f(t,n,e)}function f(t,n,o){var r=t._vm;t.getters={};var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=i.config.silent;i.config.silent=!0,t._vm=new i({data:{$$state:n},computed:a}),i.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),r&&(o&&t._withCommit(function(){r._data.$$state=null}),i.nextTick(function(){return r.$destroy()}))}function p(t,e,n,o,r){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a]=o),!s&&!r){var c=h(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){i.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=l(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){var n={},o=e.length;return Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),n}(t,e)}},state:{get:function(){return h(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e,i){var r,s=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e,i);return(r=s)&&"function"==typeof r.then||(s=Promise.resolve(s)),t._devtoolHook?s.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):s})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,i){p(t,e,n.concat(i),o,r)})}function h(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function l(t,e,n){var o;return null!==(o=t)&&"object"==typeof o&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}function d(t){i&&t===i||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(i=t)}a.state.get=function(){return this._vm._data.$$state},a.state.set=function(t){},s.prototype.commit=function(t,e,n){var o=this,i=l(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},s.prototype.dispatch=function(t,e){var n=this,o=l(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},s.prototype.subscribe=function(t){return c(t,this._subscribers)},s.prototype.subscribeAction=function(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)},s.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},s.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},s.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),f(this,this.state)},s.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=h(e.state,t.slice(0,-1));i.delete(n,t[t.length-1])}),u(this)},s.prototype.hotUpdate=function(t){this._modules.update(t),u(this,!0)},s.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(s.prototype,a);var m=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=w(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),v=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=w(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),_=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||w(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),y=b(function(t,e){var n={};return g(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=w(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function g(t){return Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}})}function b(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function w(t,e,n){return t._modulesNamespaceMap[n]}return{Store:s,install:d,version:"3.1.1",mapState:m,mapMutations:v,mapGetters:_,mapActions:y,createNamespacedHelpers:function(t){return{mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:v.bind(null,t),mapActions:y.bind(null,t)}}}}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function n(t){return null!==t&&"object"==typeof t}var o=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},i={namespaced:{configurable:!0}};i.namespaced.get=function(){return!!this._rawModule.namespaced},o.prototype.addChild=function(t,e){this._children[t]=e},o.prototype.removeChild=function(t){delete this._children[t]},o.prototype.getChild=function(t){return this._children[t]},o.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},o.prototype.forEachChild=function(t){e(this._children,t)},o.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},o.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},o.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(o.prototype,i);var r,s=function(t){this.register([],t,!1)};s.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},s.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},s.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},s.prototype.register=function(t,n,i){var r=this;void 0===i&&(i=!0);var s=new o(n,i);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);n.modules&&e(n.modules,function(e,n){r.register(t.concat(n),e,i)})},s.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var a=function(e){var n=this;void 0===e&&(e={}),!r&&"undefined"!=typeof window&&window.Vue&&m(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var i=e.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new s(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new r,this._makeLocalGettersCache=Object.create(null);var a=this,c=this.dispatch,u=this.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=i;var f=this._modules.root.state;p(this,f,[],this._modules.root),h(this,f),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:r.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,n){t.emit("vuex:mutation",e,n)}))}(this)},c={state:{configurable:!0}};function u(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function f(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,n,o){var i=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=r.config.silent;r.config.silent=!0,t._vm=new r({data:{$$state:n},computed:a}),r.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),i&&(o&&t._withCommit(function(){i._data.$$state=null}),r.nextTick(function(){return i.$destroy()}))}function p(t,e,n,o,i){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=o),!s&&!i){var c=l(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){r.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=d(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=d(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},o=e.length;Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return l(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e){var i,r=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),t._devtoolHook?r.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):r})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,r){p(t,e,n.concat(r),o,i)})}function l(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function d(t,e,o){return n(t)&&t.type&&(o=e,e=t,t=t.type),{type:t,payload:e,options:o}}function m(t){r&&t===r||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(r=t)}c.state.get=function(){return this._vm._data.$$state},c.state.set=function(t){},a.prototype.commit=function(t,e,n){var o=this,i=d(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},a.prototype.dispatch=function(t,e){var n=this,o=d(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},a.prototype.subscribe=function(t){return u(t,this._subscribers)},a.prototype.subscribeAction=function(t){return u("function"==typeof t?{before:t}:t,this._actionSubscribers)},a.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},a.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},a.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},a.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=l(e.state,t.slice(0,-1));r.delete(n,t[t.length-1])}),f(this)},a.prototype.hotUpdate=function(t){this._modules.update(t),f(this,!0)},a.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(a.prototype,c);var v=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=$(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),_=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=$(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),y=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||$(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),g=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=$(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function b(t){return function(t){return Array.isArray(t)||n(t)}(t)?Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}}):[]}function w(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function $(t,e,n){return t._modulesNamespaceMap[n]}return{Store:a,install:m,version:"3.1.2",mapState:v,mapMutations:_,mapGetters:y,mapActions:g,createNamespacedHelpers:function(t){return{mapState:v.bind(null,t),mapGetters:y.bind(null,t),mapMutations:_.bind(null,t),mapActions:g.bind(null,t)}}}}); \ No newline at end of file From d2703385b3e0ee64544efd9e7d8ffc28f8c05bcd Mon Sep 17 00:00:00 2001 From: ktsn Date: Sun, 10 Nov 2019 23:32:17 +0800 Subject: [PATCH 049/280] [release] 3.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 753b2e29d..549cad220 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuex", - "version": "3.1.1", + "version": "3.1.2", "description": "state management for Vue.js", "main": "dist/vuex.common.js", "module": "dist/vuex.esm.js", From ba2ff3a3de394a4c5c9a72ed7314ad3bb52f6a53 Mon Sep 17 00:00:00 2001 From: Ben Hutton Date: Mon, 11 Nov 2019 11:51:29 +0000 Subject: [PATCH 050/280] docs: Add missing word. (#1643) Makes the flow of reading nicer. --- docs/guide/modules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/modules.md b/docs/guide/modules.md index 8715ce748..5630c8f6e 100644 --- a/docs/guide/modules.md +++ b/docs/guide/modules.md @@ -301,7 +301,7 @@ You can also remove a dynamically registered module with `store.unregisterModule It may be likely that you want to preserve the previous state when registering a new module, such as preserving state from a Server Side Rendered app. You can achieve this with `preserveState` option: `store.registerModule('a', module, { preserveState: true })` -When you set `preserveState: true`, the module is registered, actions, mutations and getters are added to the store, but the state not. It's assumed that your store state already contains state for that module and you don't want to overwrite it. +When you set `preserveState: true`, the module is registered, actions, mutations and getters are added to the store, but the state is not. It's assumed that your store state already contains state for that module and you don't want to overwrite it. ### Module Reuse From d3979fddd589df7d8d74f9bf0772752675f50abb Mon Sep 17 00:00:00 2001 From: ZuoChenxue <276657773@qq.com> Date: Wed, 27 Nov 2019 10:19:38 +0800 Subject: [PATCH 051/280] refactor: simplify getNestedState (#1651) --- src/store.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/store.js b/src/store.js index 5dd65a0b9..c4cb3f1a5 100644 --- a/src/store.js +++ b/src/store.js @@ -489,9 +489,7 @@ function enableStrictMode (store) { } function getNestedState (state, path) { - return path.length - ? path.reduce((state, key) => state[key], state) - : state + return path.reduce((state, key) => state[key], state) } function unifyObjectStyle (type, payload, options) { From a1af9b1db190853f3ba42a6d037c7486279c6eb7 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Wed, 25 Dec 2019 17:27:05 +0900 Subject: [PATCH 052/280] #1647 Remove PhantomJS from E2E test, and use Chrom Headless Webdriver (#1648) * Remove PhantonJS from E2E test, and use Chrom Headless Webdriver * Update Nightwatch * Optimise Nighteatch config --- package.json | 6 +- test/e2e/nightwatch.config.js | 24 +- test/e2e/runner.js | 5 +- test/e2e/specs/cart.js | 2 +- test/e2e/specs/todomvc.js | 10 +- yarn.lock | 1082 ++++++++++++++++++++------------- 6 files changed, 675 insertions(+), 454 deletions(-) diff --git a/package.json b/package.json index 549cad220..8ed4f433f 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-polyfill": "^6.22.0", "babel-preset-env": "^1.5.1", - "chromedriver": "^2.45.0", + "chromedriver": "^78.0.1", "cross-env": "^5.2.0", "cross-spawn": "^6.0.5", "css-loader": "^2.1.0", @@ -54,13 +54,11 @@ "express": "^4.14.1", "jasmine": "2.8.0", "jasmine-core": "2.8.0", - "nightwatch": "^0.9.12", + "nightwatch": "^1.3.1", "nightwatch-helpers": "^1.2.0", - "phantomjs-prebuilt": "^2.1.14", "rollup": "^1.1.0", "rollup-plugin-buble": "^0.19.6", "rollup-plugin-replace": "^2.1.0", - "selenium-server": "^2.53.1", "terser": "^3.17.0", "todomvc-app-css": "^2.1.0", "typescript": "^3.7.2", diff --git a/test/e2e/nightwatch.config.js b/test/e2e/nightwatch.config.js index 1962197cf..1e2b67961 100644 --- a/test/e2e/nightwatch.config.js +++ b/test/e2e/nightwatch.config.js @@ -5,20 +5,14 @@ module.exports = { 'custom_commands_path': ['node_modules/nightwatch-helpers/commands'], 'custom_assertions_path': ['node_modules/nightwatch-helpers/assertions'], - 'selenium': { + 'webdriver': { 'start_process': true, - 'server_path': require('selenium-server').path, - 'host': '127.0.0.1', - 'port': 4444, - 'cli_args': { - 'webdriver.chrome.driver': require('chromedriver').path - } + 'port': 9515, + 'server_path': require('chromedriver').path }, 'test_settings': { 'default': { - 'selenium_port': 4444, - 'selenium_host': 'localhost', 'silent': true, 'screenshots': { 'enabled': true, @@ -32,16 +26,10 @@ module.exports = { 'desiredCapabilities': { 'browserName': 'chrome', 'javascriptEnabled': true, - 'acceptSslCerts': true - } - }, - - 'phantomjs': { - 'desiredCapabilities': { - 'browserName': 'phantomjs', - 'javascriptEnabled': true, 'acceptSslCerts': true, - 'phantomjs.binary.path': require('phantomjs-prebuilt').path + 'chromeOptions': { + 'args': ['--headless'] + } } } } diff --git a/test/e2e/runner.js b/test/e2e/runner.js index 1619f92ff..7516c6610 100644 --- a/test/e2e/runner.js +++ b/test/e2e/runner.js @@ -9,15 +9,12 @@ if (args.indexOf('--config') === -1) { args = args.concat(['--config', 'test/e2e/nightwatch.config.js']) } if (args.indexOf('--env') === -1) { - args = args.concat(['--env', 'phantomjs']) + args = args.concat(['--env', 'chrome']) } var i = args.indexOf('--test') if (i > -1) { args[i + 1] = 'test/e2e/specs/' + args[i + 1] } -if (args.indexOf('phantomjs') > -1) { - process.env.PHANTOMJS = true -} var runner = spawn('./node_modules/.bin/nightwatch', args, { stdio: 'inherit' diff --git a/test/e2e/specs/cart.js b/test/e2e/specs/cart.js index 25c387b2b..0b8c8ed34 100644 --- a/test/e2e/specs/cart.js +++ b/test/e2e/specs/cart.js @@ -20,7 +20,7 @@ module.exports = { .assert.containsText('.cart', 'H&M T-Shirt White - $10.99 x 1') .assert.containsText('.cart', 'Total: $1,011.01') .click('.cart button') - .waitFor(120) + .waitFor(200) .assert.containsText('.cart', 'Please add some products to cart') .assert.containsText('.cart', 'Total: $0.00') .assert.containsText('.cart', 'Checkout successful') diff --git a/test/e2e/specs/todomvc.js b/test/e2e/specs/todomvc.js index e41cb7ab2..f6691c820 100644 --- a/test/e2e/specs/todomvc.js +++ b/test/e2e/specs/todomvc.js @@ -105,7 +105,7 @@ module.exports = { .dblClick('.todo:nth-child(1) label') .assert.count('.todo.editing', 1) .assert.focused('.todo:nth-child(1) .edit') - .clearValue('.todo:nth-child(1) .edit') + deleteValue('.todo:nth-child(1) .edit', 'test2') .setValue('.todo:nth-child(1) .edit', 'edited!') .click('footer') // blur .assert.count('.todo.editing', 0) @@ -114,6 +114,7 @@ module.exports = { // editing triggered by enter browser .dblClick('.todo label') + deleteValue('.todo:nth-child(1) .edit', 'edited!') .enterValue('.todo:nth-child(1) .edit', 'edited again!') .assert.count('.todo.editing', 0) .assert.containsText('.todo:nth-child(1) label', 'edited again!') @@ -121,7 +122,7 @@ module.exports = { // cancel browser .dblClick('.todo label') - .clearValue('.todo:nth-child(1) .edit') + deleteValue('.todo:nth-child(1) .edit', 'edited again!') .setValue('.todo:nth-child(1) .edit', 'edited!') .trigger('.todo:nth-child(1) .edit', 'keyup', 27) .assert.count('.todo.editing', 0) @@ -130,6 +131,7 @@ module.exports = { // empty value should remove browser .dblClick('.todo label') + deleteValue('.todo:nth-child(1) .edit', 'edited again!') .enterValue('.todo:nth-child(1) .edit', ' ') .assert.count('.todo', 3) @@ -150,5 +152,9 @@ module.exports = { .moveToElement('.todo:nth-child(' + n + ')', 10, 10) .click('.todo:nth-child(' + n + ') .destroy') } + + function deleteValue (el, text) { + return browser.setValue(el, text.split('').map(() => '\u0008')) + } } } diff --git a/yarn.lock b/yarn.lock index 1e11a430e..b06afc7fc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -855,21 +855,40 @@ "@shellscape/koa-send" "^4.1.0" debug "^2.6.8" +"@types/color-name@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" + integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== + "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== +"@types/events@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/events/-/events-3.0.0.tgz#2862f3f58a9a7f7c3e78d79f130dd4d71c25c2a7" + integrity sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g== + +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + "@types/node@*": version "10.12.18" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.12.18.tgz#1d3ca764718915584fcd9f6344621b7672665c67" integrity sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ== -"@types/node@^8.0.7": - version "8.10.39" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.39.tgz#e7e87ad00364dd7bc485c940926345b8ec1a26ca" - integrity sha512-rE7fktr02J8ybFf6eysife+WF+L4sAHWzw09DgdCebEu+qDwMvv4zl6Bc+825ttGZP73kCKxa3dhJOoGJ8+5mA== - "@vue/babel-preset-app@3.0.0-beta.11": version "3.0.0-beta.11" resolved "https://registry.yarnpkg.com/@vue/babel-preset-app/-/babel-preset-app-3.0.0-beta.11.tgz#c8b889aa73464050f9cd3f9dc621951d85c24508" @@ -1126,13 +1145,19 @@ acorn@^6.0.2, acorn@^6.0.5: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg== -agent-base@2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-2.1.1.tgz#d6de10d5af6132d5bd692427d46fc538539094c7" - integrity sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc= +agent-base@4, agent-base@^4.2.0, agent-base@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" + integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== + dependencies: + es6-promisify "^5.0.0" + +agent-base@~4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== dependencies: - extend "~3.0.0" - semver "~5.0.1" + es6-promisify "^5.0.0" agentkeepalive@^2.2.0: version "2.2.0" @@ -1197,7 +1222,7 @@ ansi-align@^2.0.0: dependencies: string-width "^2.0.0" -ansi-colors@^3.0.0: +ansi-colors@3.2.3, ansi-colors@^3.0.0: version "3.2.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== @@ -1227,6 +1252,16 @@ ansi-regex@^4.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9" integrity sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w== +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -1239,6 +1274,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" +ansi-styles@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.0.tgz#5681f0dcf7ae5880a7841d8831c4724ed9cc0172" + integrity sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg== + dependencies: + "@types/color-name" "^1.1.1" + color-convert "^2.0.1" + any-promise@^1.0.0, any-promise@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f" @@ -1374,6 +1417,11 @@ assertion-error@1.0.0: resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.0.tgz#c7f85438fdd466bc7ca16ab90c81513797a5d23b" integrity sha1-x/hUOP3UZrx8oWq5DIFRN5el0js= +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + assign-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" @@ -2115,6 +2163,11 @@ bluebird@^3.1.1, bluebird@^3.5.1, bluebird@^3.5.3: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7" integrity sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw== +bluebird@^3.5.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.1.tgz#df70e302b471d7473489acf26a93d63b53f874de" + integrity sha512-DdmyoGCleJnkbp3nkbxTLJ18rjDsE4yCggEwKNXkeV123sPNfOCYeDoeuOY+F2FrSjO1YXcTU+dsy96KMy+gcg== + bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -2154,7 +2207,7 @@ boxen@^1.2.1: term-size "^1.2.0" widest-line "^2.0.0" -brace-expansion@^1.0.0, brace-expansion@^1.1.7: +brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== @@ -2192,10 +2245,10 @@ brorand@^1.0.1: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= -browser-stdout@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" - integrity sha1-81HTKWnTL6XXpVZxVCY9korjvR8= +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" @@ -2318,6 +2371,11 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + cacache@^10.0.4: version "10.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" @@ -2441,6 +2499,11 @@ camelcase@^4.0.0, camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + caniuse-api@^1.5.2: version "1.6.1" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c" @@ -2471,10 +2534,10 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -chai-nightwatch@~0.1.x: - version "0.1.1" - resolved "https://registry.yarnpkg.com/chai-nightwatch/-/chai-nightwatch-0.1.1.tgz#1ca56de768d3c0868fe7fc2f4d32c2fe894e6be9" - integrity sha1-HKVt52jTwIaP5/wvTTLC/olOa+k= +chai-nightwatch@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/chai-nightwatch/-/chai-nightwatch-0.4.0.tgz#028dc2bf234d9ef1e895cb134027795b1c7c9467" + integrity sha512-1xw74vR02XiHzo4wQfHqme2nqYPIzYnK5s3DMST7UW8FIHDWD7qplg+DTJ5FIPcmWiGYX/Re0CzvOcZQKJm1Uw== dependencies: assertion-error "1.0.0" deep-eql "0.1.3" @@ -2499,6 +2562,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.2, chalk@^2.4 escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chalk@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chardet@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" @@ -2536,12 +2607,12 @@ chrome-trace-event@^1.0.0: dependencies: tslib "^1.9.0" -chromedriver@^2.45.0: - version "2.45.0" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-2.45.0.tgz#8c1b158adbbd3e0ca3f7af19d459082245554378" - integrity sha512-Qwmcr+2mU3INeR6mVsQ8gO00vZpL8ZeTJLclX44C0dcs88jrSDgckPqbG+qkVX+m2L/aOPnF0lYgPdOiOiLt5w== +chromedriver@^78.0.1: + version "78.0.1" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-78.0.1.tgz#2db3425a2cba6fcaf1a41d9538b16c3d06fa74a8" + integrity sha512-eOsyFk4xb9EECs1VMrDbxO713qN+Bu1XUE8K9AuePc3839TPdAegg72kpXSzkeNqRNZiHbnJUItIVCLFkDqceA== dependencies: - del "^3.0.0" + del "^4.1.1" extract-zip "^1.6.7" mkdirp "^0.5.1" request "^2.88.0" @@ -2552,6 +2623,11 @@ ci-info@^1.5.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497" integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" @@ -2601,6 +2677,18 @@ cli-cursor@^2.0.0, cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.2.0.tgz#e8b988d9206c692302d8ee834e7a85c0144d8f77" + integrity sha512-tgU3fKwzYjiLEQgPMD9Jt+JjHVL9kW93FiIMX/l7rivvOD4/LL0Mf7gda3+4U2KJBloybwgj5KEoQgGRioMiKQ== + cli-width@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" @@ -2623,6 +2711,15 @@ clipboardy@^1.2.2: arch "^2.1.0" execa "^0.8.0" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" @@ -2633,11 +2730,6 @@ co@^4.6.0: resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" integrity sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ= -co@~3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/co/-/co-3.0.6.tgz#1445f226c5eb956138e68c9ac30167ea7d2e6bda" - integrity sha1-FEXyJsXrlWE45oyawwFn6n0ua9o= - coa@~1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd" @@ -2665,12 +2757,19 @@ color-convert@^1.3.0, color-convert@^1.9.0: dependencies: color-name "1.1.3" +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + color-name@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== @@ -2717,13 +2816,6 @@ commander@2.17.x, commander@~2.17.1: resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.9.0.tgz#9c99094176e12240cb22d6c5146098400fe0f7d4" - integrity sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q= - dependencies: - graceful-readlink ">= 1.0.0" - commander@^2.15.1: version "2.19.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" @@ -3158,12 +3250,10 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" -data-uri-to-buffer@2: - version "2.0.0" - resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-2.0.0.tgz#0ba23671727349828c32cfafddea411908d13d23" - integrity sha512-YbKCNLPPP4inc0E5If4OaalBc7gpaM2MRv77Pv2VThVComLKfbGYtJcdDCViDyp1Wd4SebhHLz94vp91zbK6bw== - dependencies: - "@types/node" "^8.0.7" +data-uri-to-buffer@1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz#77163ea9c20d8641b4707e8f18abdf9a78f34835" + integrity sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ== date-now@^0.1.4: version "0.1.4" @@ -3175,7 +3265,7 @@ de-indent@^1.0.2: resolved "https://registry.yarnpkg.com/de-indent/-/de-indent-1.0.2.tgz#b2038e846dc33baa5796128d0804b455b8c1e21d" integrity sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0= -debug@*, debug@4, debug@^4.0.1: +debug@*, debug@4, debug@^4.0.1, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -3189,33 +3279,26 @@ debug@2, debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.1, de dependencies: ms "2.0.0" -debug@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - integrity sha1-+HBX6ZWxofauaklgZkE3vFbwOdo= - dependencies: - ms "0.7.1" - -debug@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" - integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== +debug@3.1.0, debug@~3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: - ms "^2.1.1" + ms "2.0.0" -debug@^3.1.0: +debug@3.2.6, debug@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== dependencies: ms "^2.1.1" -debug@~3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== +debug@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.0.tgz#373687bffa678b38b1cd91f861b63850035ddc87" + integrity sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg== dependencies: - ms "2.0.0" + ms "^2.1.1" decamelize-keys@^1.0.0: version "1.1.0" @@ -3225,7 +3308,7 @@ decamelize-keys@^1.0.0: decamelize "^1.1.0" map-obj "^1.0.0" -decamelize@^1.1.0, decamelize@^1.1.2: +decamelize@^1.1.0, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= @@ -3262,6 +3345,13 @@ deepmerge@^1.5.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-1.5.2.tgz#10499d868844cdad4fee0842df8c7f6f0c95a753" integrity sha512-95k0GDqvBjZavkuvzx/YqVLv/6YYa17fz6ILMSf7neqQITCPbnfEnQvEgMPNjH4kgobe7+WIL0yJEHku+H3qtQ== +defaults@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" + integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= + dependencies: + clone "^1.0.2" + define-properties@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -3296,7 +3386,7 @@ defined@^1.0.0: resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= -degenerator@~1.0.2: +degenerator@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/degenerator/-/degenerator-1.0.4.tgz#fcf490a37ece266464d9cc431ab98c5819ced095" integrity sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU= @@ -3305,17 +3395,18 @@ degenerator@~1.0.2: escodegen "1.x.x" esprima "3.x.x" -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - integrity sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= +del@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" + integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== dependencies: + "@types/glob" "^7.1.1" globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.3" delayed-stream@~1.0.0: version "1.0.0" @@ -3367,10 +3458,10 @@ diacritics@^1.3.0: resolved "https://registry.yarnpkg.com/diacritics/-/diacritics-1.3.0.tgz#3efa87323ebb863e6696cebb0082d48ff3d6f7a1" integrity sha1-PvqHMj67hj5mls67AILUj/PW96E= -diff@1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" - integrity sha1-fyjS657nsVqX79ic5j3P2qPMur8= +diff@3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== diffie-hellman@^5.0.0: version "5.0.3" @@ -3480,6 +3571,11 @@ dot-prop@^4.1.0: dependencies: is-obj "^1.0.0" +dotenv@7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" + integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== + duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" @@ -3508,10 +3604,10 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= -ejs@2.5.7: - version "2.5.7" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.5.7.tgz#cc872c168880ae3c7189762fd5ffc00896c9518a" - integrity sha1-zIcsFoiArjxxiXYv1f/ACJbJUYo= +ejs@^2.5.9: + version "2.7.3" + resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.7.3.tgz#4f437b3992ea0e0757f0ab8d7f29e42593498927" + integrity sha512-NtMNsdpaCF23gvHItgT37gzrpzckzs7KB7mg+YH1GMSG/5iZRq1BeWzAhEAJVagfM7nCQDnh/C51j/L2qjZmnA== electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.47: version "1.3.103" @@ -3531,6 +3627,11 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -3633,6 +3734,13 @@ es6-promise@^4.0.3, es6-promise@^4.1.0: resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054" integrity sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg== +es6-promisify@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" + integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= + dependencies: + es6-promise "^4.0.3" + es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" @@ -3950,7 +4058,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@3, extend@~3.0.0, extend@~3.0.2: +extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -3985,7 +4093,7 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^1.6.5, extract-zip@^1.6.7: +extract-zip@^1.6.7: version "1.6.7" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9" integrity sha1-qEC0uK9kAyZMjbV/Txp0Mz74H+k= @@ -4134,6 +4242,13 @@ find-cache-dir@^2.0.0: make-dir "^1.0.0" pkg-dir "^3.0.0" +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" @@ -4141,13 +4256,6 @@ find-up@^2.0.0, find-up@^2.1.0: dependencies: locate-path "^2.0.0" -find-up@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" - integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== - dependencies: - locate-path "^3.0.0" - flat-cache@^1.2.1: version "1.3.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.4.tgz#2c2ef77525cc2929007dfffa1dd314aa9c9dee6f" @@ -4158,6 +4266,13 @@ flat-cache@^1.2.1: rimraf "~2.6.2" write "^0.2.1" +flat@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.0.tgz#090bec8b05e39cba309747f1d588f04dbaf98db2" + integrity sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw== + dependencies: + is-buffer "~2.0.3" + flatten@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" @@ -4227,15 +4342,6 @@ from2@^2.1.0: inherits "^2.0.1" readable-stream "^2.0.0" -fs-extra@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-1.0.0.tgz#cd3ce5f7e7cb6145883fcae3191e9877f8587950" - integrity sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - fs-extra@^4.0.2: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" @@ -4316,6 +4422,11 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-own-enumerable-property-symbols@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.0.tgz#b877b49a5c16aefac3655f2ed2ea5b684df8d203" @@ -4331,17 +4442,17 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= -get-uri@2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.3.tgz#fa13352269781d75162c6fc813c9e905323fbab5" - integrity sha512-x5j6Ks7FOgLD/GlvjKwgu7wdmMR55iuRHhn8hj/+gA+eSbxQvZ+AEomq+3MgVEZj1vpi738QahGbCCSIDtXtkw== +get-uri@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/get-uri/-/get-uri-2.0.4.tgz#d4937ab819e218d4cb5ae18e4f5962bef169cc6a" + integrity sha512-v7LT/s8kVjs+Tx0ykk1I+H/rbpzkHvuIq87LmeXptcf5sNWm9uQiwjNAt94SJPA1zOlCntmnOlJvVWKmzsxG8Q== dependencies: - data-uri-to-buffer "2" - debug "4" + data-uri-to-buffer "1" + debug "2" extend "~3.0.2" file-uri-to-path "1" ftp "~0.3.10" - readable-stream "3" + readable-stream "2" get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" @@ -4383,18 +4494,6 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.5.tgz#b4202a69099bbb4d292a7c1b95b6682b67ebdc95" - integrity sha1-tCAqaQmbu00pKnwblbZoK2fr3JU= - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.2" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@7.0.x: version "7.0.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.0.6.tgz#211bafaf49e525b8cd93260d14ab136152b3f57a" @@ -4407,7 +4506,7 @@ glob@7.0.x: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.6, glob@^7.1.2, glob@^7.1.3: +glob@7.1.3, glob@^7.0.3, glob@^7.0.6, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -4504,16 +4603,11 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== -"graceful-readlink@>= 1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" - integrity sha1-TK+tdrxi8C+gObL5Tpo906ORpyU= - gray-matter@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.2.tgz#9aa379e3acaf421193fce7d2a28cebd4518ac454" @@ -4524,10 +4618,10 @@ gray-matter@^4.0.1: section-matter "^1.0.0" strip-bom-string "^1.0.0" -growl@1.9.2: - version "1.9.2" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" - integrity sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8= +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== har-schema@^2.0.0: version "2.0.0" @@ -4559,6 +4653,11 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + has-symbols@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" @@ -4628,15 +4727,7 @@ hash.js@^1.0.0, hash.js@^1.0.3: inherits "^2.0.3" minimalistic-assert "^1.0.1" -hasha@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/hasha/-/hasha-2.2.0.tgz#78d7cbfc1e6d66303fe79837365984517b2f6ee1" - integrity sha1-eNfL/B5tZjA/55g3NlmEUXsvbuE= - dependencies: - is-stream "^1.0.1" - pinkie-promise "^2.0.0" - -he@1.2.x, he@^1.1.0: +he@1.2.0, he@1.2.x, he@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== @@ -4727,6 +4818,17 @@ http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" +http-errors@1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + http-errors@^1.6.1, http-errors@^1.6.3, http-errors@~1.7.1: version "1.7.1" resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.1.tgz#6a4ffe5d35188e1c39f872534690585852e1f027" @@ -4738,14 +4840,13 @@ http-errors@^1.6.1, http-errors@^1.6.3, http-errors@~1.7.1: statuses ">= 1.5.0 < 2" toidentifier "1.0.0" -http-proxy-agent@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz#cc1ce38e453bf984a0f7702d2dd59c73d081284a" - integrity sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo= +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: - agent-base "2" - debug "2" - extend "3" + agent-base "4" + debug "3.1.0" http-signature@~1.2.0: version "1.2.0" @@ -4761,14 +4862,13 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz#35f7da6c48ce4ddbfa264891ac593ee5ff8671e6" - integrity sha1-NffabEjOTdv6JkiRrFk+5f+GceY= +https-proxy-agent@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.1.tgz#b8c286433e87602311b01c8ea34413d856a4af81" + integrity sha512-+ML2Rbh6DAuee7d07tYGEKOEi2voWPUGan+ExdPbPW6Z3svq+JCqr0v8WmKPOkz1vOVykPCBSuobe7G8GJUtVg== dependencies: - agent-base "2" - debug "2" - extend "3" + agent-base "^4.3.0" + debug "^3.1.0" iconv-lite@0.4.23: version "0.4.23" @@ -4777,7 +4877,7 @@ iconv-lite@0.4.23: dependencies: safer-buffer ">= 2.1.2 < 3" -iconv-lite@^0.4.24, iconv-lite@^0.4.4: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -4916,6 +5016,11 @@ inherits@2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= +inherits@2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + ini@^1.3.4, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" @@ -4952,12 +5057,7 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/ip/-/ip-1.0.1.tgz#c7e356cdea225ae71b36d70f2e71a92ba4e42590" - integrity sha1-x+NWzeoiWucbNtcPLnGpK6TkJZA= - -ip@^1.1.4: +ip@1.1.5, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -5003,6 +5103,11 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== +is-buffer@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== + is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" @@ -5022,6 +5127,13 @@ is-ci@^1.0.10, is-ci@^1.1.0: dependencies: ci-info "^1.5.0" +is-ci@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" + integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== + dependencies: + ci-info "^2.0.0" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -5151,6 +5263,11 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-npm@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4" @@ -5180,17 +5297,17 @@ is-obj@^1.0.0, is-obj@^1.0.1: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= -is-path-cwd@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" - integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= +is-path-cwd@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-in-cwd@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" - integrity sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ== +is-path-in-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" + integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== dependencies: - is-path-inside "^1.0.0" + is-path-inside "^2.1.0" is-path-inside@^1.0.0: version "1.0.1" @@ -5199,6 +5316,13 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" +is-path-inside@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" + integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== + dependencies: + path-is-inside "^1.0.2" + is-plain-obj@^1.0.0, is-plain-obj@^1.1, is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -5248,7 +5372,7 @@ is-retry-allowed@^1.0.0: resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" integrity sha1-EaBgVotnM5REAz0BJaYaINVk+zQ= -is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: +is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= @@ -5383,6 +5507,14 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + js-yaml@^3.11.0, js-yaml@^3.12.0, js-yaml@^3.9.0: version "3.12.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600" @@ -5444,11 +5576,6 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json3@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1" - integrity sha1-PAQ0dD35Pi9cQq7nsZvLSDV19OE= - json5@^0.5.0, json5@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" @@ -5461,13 +5588,6 @@ json5@^1.0.1: dependencies: minimist "^1.2.0" -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= - optionalDependencies: - graceful-fs "^4.1.6" - jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" @@ -5485,11 +5605,6 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -kew@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" - integrity sha1-edk9LTM2PW/dKXCzNdkUGtWR15s= - keygrip@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/keygrip/-/keygrip-1.0.3.tgz#399d709f0aed2bab0a059e0cdd3a5023a053e1dc" @@ -5524,13 +5639,6 @@ kind-of@^6.0.0, kind-of@^6.0.2: resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051" integrity sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA== -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= - optionalDependencies: - graceful-fs "^4.1.9" - koa-compose@^3.0.0, koa-compose@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/koa-compose/-/koa-compose-3.2.1.tgz#a85ccb40b7d986d8e5a345b3a1ace8eabcf54de7" @@ -5750,21 +5858,11 @@ lodash._baseclone@^3.0.0: lodash.isarray "^3.0.0" lodash.keys "^3.0.0" -lodash._baseclone@^4.0.0: - version "4.5.7" - resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-4.5.7.tgz#ce42ade08384ef5d62fa77c30f61a46e686f8434" - integrity sha1-zkKt4IOE711i+nfDD2GkbmhvhDQ= - lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" integrity sha1-jaDmqHbPNEwK2KVIghEd08XHyjY= -lodash._basecreate@^3.0.0: - version "3.0.3" - resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" - integrity sha1-G8ZhYU2qf8MRt9A78WgGoCE8+CE= - lodash._basefor@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" @@ -5790,11 +5888,6 @@ lodash._reinterpolate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= -lodash._stack@^4.0.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/lodash._stack/-/lodash._stack-4.1.3.tgz#751aa76c1b964b047e76d14fc72a093fcb5e2dd0" - integrity sha1-dRqnbBuWSwR+dtFPxyoJP8teLdA= - lodash.camelcase@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" @@ -5814,31 +5907,15 @@ lodash.clonedeep@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= -lodash.create@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" - integrity sha1-1/KEnw29p+BGgruM1yqwIkYd6+c= - dependencies: - lodash._baseassign "^3.0.0" - lodash._basecreate "^3.0.0" - lodash._isiterateecall "^3.0.0" - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.defaultsdeep@4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.3.2.tgz#6c1a586e6c5647b0e64e2d798141b8836158be8a" - integrity sha1-bBpYbmxWR7DmTi15gUG4g2FYvoo= - dependencies: - lodash._baseclone "^4.0.0" - lodash._stack "^4.0.0" - lodash.isplainobject "^4.0.0" - lodash.keysin "^4.0.0" - lodash.mergewith "^4.0.0" - lodash.rest "^4.0.0" +lodash.defaultsdeep@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz#512e9bd721d272d94e3d3a63653fa17516741ca6" + integrity sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA== lodash.isarguments@^3.0.0: version "3.1.0" @@ -5850,11 +5927,6 @@ lodash.isarray@^3.0.0: resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" integrity sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U= -lodash.isplainobject@^4.0.0: - version "4.0.6" - resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" - integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= - lodash.keys@^3.0.0: version "3.1.2" resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" @@ -5864,25 +5936,15 @@ lodash.keys@^3.0.0: lodash.isarguments "^3.0.0" lodash.isarray "^3.0.0" -lodash.keysin@^4.0.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.keysin/-/lodash.keysin-4.2.0.tgz#8cc3fb35c2d94acc443a1863e02fa40799ea6f28" - integrity sha1-jMP7NcLZSsxEOhhj4C+kB5nqbyg= - lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= -lodash.mergewith@^4.0.0: +lodash.merge@^4.6.2: version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" - integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== - -lodash.rest@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/lodash.rest/-/lodash.rest-4.0.5.tgz#954ef75049262038c96d1fc98b28fdaf9f0772aa" - integrity sha1-lU73UEkmIDjJbR/Jiyj9r58Hcqo= + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== lodash.template@^4.4.0: version "4.5.0" @@ -5909,18 +5971,25 @@ lodash.uniq@^4.5.0: resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0: +lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== -log-symbols@^2.1.0: +log-symbols@2.2.0, log-symbols@^2.1.0: version "2.2.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== dependencies: chalk "^2.0.1" +log-symbols@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + log-update@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/log-update/-/log-update-2.3.0.tgz#88328fd7d1ce7938b29283746f0b1bc126b24708" @@ -5978,11 +6047,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@~2.6.5: - version "2.6.5" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.6.5.tgz#e56d6354148ede8d7707b58d143220fd08df0fd5" - integrity sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U= - magic-string@^0.25.1: version "0.25.1" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e" @@ -6209,6 +6273,11 @@ mimic-fn@^1.0.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== +mimic-fn@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -6235,14 +6304,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -minimatch@3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" - integrity sha1-Kk5AkLlrLbBqnX3wEFWmKnfJt3Q= - dependencies: - brace-expansion "^1.0.0" - -minimatch@^3.0.2, minimatch@^3.0.4: +minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -6344,22 +6406,34 @@ mkpath@1.0.0: resolved "https://registry.yarnpkg.com/mkpath/-/mkpath-1.0.0.tgz#ebb3a977e7af1c683ae6fda12b545a6ba6c5853d" integrity sha1-67Opd+evHGg65v2hK1Raa6bFhT0= -mocha-nightwatch@3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/mocha-nightwatch/-/mocha-nightwatch-3.2.2.tgz#91bcb9b3bde057dd7677c78125e491e58d66647c" - integrity sha1-kby5s73gV912d8eBJeSR5Y1mZHw= +mocha@^6.2.2: + version "6.2.2" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-6.2.2.tgz#5d8987e28940caf8957a7d7664b910dc5b2fea20" + integrity sha512-FgDS9Re79yU1xz5d+C4rv1G7QagNGHZ+iXF81hO8zY35YZZcLEsJVfFolfsqKFWunATEvNzMK0r/CwWd/szO9A== dependencies: - browser-stdout "1.3.0" - commander "2.9.0" - debug "2.2.0" - diff "1.4.0" + ansi-colors "3.2.3" + browser-stdout "1.3.1" + debug "3.2.6" + diff "3.5.0" escape-string-regexp "1.0.5" - glob "7.0.5" - growl "1.9.2" - json3 "3.3.2" - lodash.create "3.1.1" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "2.2.0" + minimatch "3.0.4" mkdirp "0.5.1" - supports-color "3.1.2" + ms "2.1.1" + node-environment-flags "1.0.5" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.0" + yargs-parser "13.1.1" + yargs-unparser "1.6.0" move-concurrently@^1.0.1: version "1.0.1" @@ -6373,17 +6447,12 @@ move-concurrently@^1.0.1: rimraf "^2.5.4" run-queue "^1.0.3" -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - integrity sha1-nNE8A62/8ltl7/3nzoZO6VIBcJg= - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= -ms@^2.1.1: +ms@2.1.1, ms@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== @@ -6393,6 +6462,11 @@ mute-stream@0.0.7: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= +mute-stream@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" + integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== + mz@^2.6.0: version "2.7.0" resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32" @@ -6477,7 +6551,7 @@ neo-async@^2.5.0: resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== -netmask@~1.0.4: +netmask@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/netmask/-/netmask-1.0.6.tgz#20297e89d86f6f6400f250d9f4f6b4c1945fcd35" integrity sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU= @@ -6497,21 +6571,29 @@ nightwatch-helpers@^1.2.0: resolved "https://registry.yarnpkg.com/nightwatch-helpers/-/nightwatch-helpers-1.2.0.tgz#cdefeb7635074a141825a7b6d1b955b6d7810a0f" integrity sha1-ze/rdjUHShQYJae20blVtteBCg8= -nightwatch@^0.9.12: - version "0.9.21" - resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-0.9.21.tgz#9e794a7514b4fd5f46602d368e50515232ab9e90" - integrity sha1-nnlKdRS0/V9GYC02jlBRUjKrnpA= - dependencies: - chai-nightwatch "~0.1.x" - ejs "2.5.7" +nightwatch@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/nightwatch/-/nightwatch-1.3.1.tgz#d09067d8999a10a9e39297eca988e6fe3a970ec6" + integrity sha512-rnzbcSGOvyaMwXrZ/ME+1NHn7dLmLigB9cYtP7QvWgoAL6P/ZwCXKWjkxJeyp34CD0sJfhQ/wvvBOELaeQwF1w== + dependencies: + assertion-error "^1.1.0" + chai-nightwatch "^0.4.0" + dotenv "7.0.0" + ejs "^2.5.9" + is-ci "^2.0.0" lodash.clone "3.0.3" - lodash.defaultsdeep "4.3.2" - minimatch "3.0.3" + lodash.defaultsdeep "^4.6.1" + lodash.merge "^4.6.2" + minimatch "3.0.4" mkpath "1.0.0" - mocha-nightwatch "3.2.2" - optimist "0.6.1" - proxy-agent "2.0.0" - q "1.4.1" + optimist "^0.6.1" + ora "^4.0.2" + proxy-agent "^3.1.1" + request "^2.88.0" + request-promise "^4.2.4" + semver "^6.3.0" + optionalDependencies: + mocha "^6.2.2" no-case@^2.2.0: version "2.3.2" @@ -6520,6 +6602,14 @@ no-case@^2.2.0: dependencies: lower-case "^1.1.1" +node-environment-flags@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.5.tgz#fa930275f5bf5dae188d6192b24b4c8bbac3d76a" + integrity sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + node-libs-browser@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.2.0.tgz#c72f60d9d46de08a940dedbb25f3ffa2f9bbaa77" @@ -6695,7 +6785,7 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" -object.assign@^4.1.0: +object.assign@4.1.0, object.assign@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== @@ -6749,6 +6839,13 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +onetime@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5" + integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q== + dependencies: + mimic-fn "^2.1.0" + only@~0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/only/-/only-0.0.2.tgz#2afde84d03e50b9a8edc444e30610a70295edfb4" @@ -6761,7 +6858,7 @@ opn@^5.1.0: dependencies: is-wsl "^1.1.0" -optimist@0.6.1: +optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= @@ -6789,6 +6886,20 @@ optionator@^0.8.1, optionator@^0.8.2: type-check "~0.3.2" wordwrap "~1.0.0" +ora@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/ora/-/ora-4.0.3.tgz#752a1b7b4be4825546a7a3d59256fa523b6b6d05" + integrity sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg== + dependencies: + chalk "^3.0.0" + cli-cursor "^3.1.0" + cli-spinners "^2.2.0" + is-interactive "^1.0.0" + log-symbols "^3.0.0" + mute-stream "0.0.8" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + os-browserify@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" @@ -6845,10 +6956,10 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== p-try@^1.0.0: version "1.0.0" @@ -6860,31 +6971,30 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.0.0.tgz#85080bb87c64688fa47996fe8f7dfbe8211760b1" integrity sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ== -pac-proxy-agent@1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-1.1.0.tgz#34a385dfdf61d2f0ecace08858c745d3e791fd4d" - integrity sha512-QBELCWyLYPgE2Gj+4wUEiMscHrQ8nRPBzYItQNOHWavwBt25ohZHQC4qnd5IszdVVrFbLsQ+dPkm6eqdjJAmwQ== - dependencies: - agent-base "2" - debug "2" - extend "3" - get-uri "2" - http-proxy-agent "1" - https-proxy-agent "1" - pac-resolver "~2.0.0" - raw-body "2" - socks-proxy-agent "2" - -pac-resolver@~2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-2.0.0.tgz#99b88d2f193fbdeefc1c9a529c1f3260ab5277cd" - integrity sha1-mbiNLxk/ve78HJpSnB8yYKtSd80= +pac-proxy-agent@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-3.0.1.tgz#115b1e58f92576cac2eba718593ca7b0e37de2ad" + integrity sha512-44DUg21G/liUZ48dJpUSjZnFfZro/0K5JTyFYLBcmh9+T6Ooi4/i4efwUiEy0+4oQusCBqWdhv16XohIj1GqnQ== + dependencies: + agent-base "^4.2.0" + debug "^4.1.1" + get-uri "^2.0.0" + http-proxy-agent "^2.1.0" + https-proxy-agent "^3.0.0" + pac-resolver "^3.0.0" + raw-body "^2.2.0" + socks-proxy-agent "^4.0.1" + +pac-resolver@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pac-resolver/-/pac-resolver-3.0.0.tgz#6aea30787db0a891704deb7800a722a7615a6f26" + integrity sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA== dependencies: - co "~3.0.6" - degenerator "~1.0.2" - ip "1.0.1" - netmask "~1.0.4" - thunkify "~2.1.1" + co "^4.6.0" + degenerator "^1.0.4" + ip "^1.1.5" + netmask "^1.0.6" + thunkify "^2.1.2" package-json@^4.0.0: version "4.0.1" @@ -7032,21 +7142,6 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -phantomjs-prebuilt@^2.1.14: - version "2.1.16" - resolved "https://registry.yarnpkg.com/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz#efd212a4a3966d3647684ea8ba788549be2aefef" - integrity sha1-79ISpKOWbTZHaE6ouniFSb4q7+8= - dependencies: - es6-promise "^4.0.3" - extract-zip "^1.6.5" - fs-extra "^1.0.0" - hasha "^2.2.0" - kew "^0.7.0" - progress "^1.1.8" - request "^2.81.0" - request-progress "^2.0.1" - which "^1.2.10" - pify@^2.0.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -7057,6 +7152,11 @@ pify@^3.0.0: resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -7514,11 +7614,6 @@ process@~0.5.1: resolved "https://registry.yarnpkg.com/process/-/process-0.5.2.tgz#1638d8a8e34c2f440a91db95ab9aeb677fc185cf" integrity sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8= -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" - integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74= - progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -7537,19 +7632,24 @@ proxy-addr@~2.0.4: forwarded "~0.1.2" ipaddr.js "1.8.0" -proxy-agent@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-2.0.0.tgz#57eb5347aa805d74ec681cb25649dba39c933499" - integrity sha1-V+tTR6qAXXTsaByyVknbo5yTNJk= +proxy-agent@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/proxy-agent/-/proxy-agent-3.1.1.tgz#7e04e06bf36afa624a1540be247b47c970bd3014" + integrity sha512-WudaR0eTsDx33O3EJE16PjBRZWcX8GqCEeERw1W3hZJgH/F2a46g7jty6UGty6NeJ4CKQy8ds2CJPMiyeqaTvw== dependencies: - agent-base "2" - debug "2" - extend "3" - http-proxy-agent "1" - https-proxy-agent "1" - lru-cache "~2.6.5" - pac-proxy-agent "1" - socks-proxy-agent "2" + agent-base "^4.2.0" + debug "4" + http-proxy-agent "^2.1.0" + https-proxy-agent "^3.0.0" + lru-cache "^5.1.1" + pac-proxy-agent "^3.0.1" + proxy-from-env "^1.0.0" + socks-proxy-agent "^4.0.1" + +proxy-from-env@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= prr@~1.0.1: version "1.0.1" @@ -7566,6 +7666,11 @@ psl@^1.1.24: resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.31.tgz#e9aa86d0101b5b105cbe93ac6b784cd547276184" integrity sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw== +psl@^1.1.28: + version "1.4.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.4.0.tgz#5dd26156cdb69fa1fdb8ab1991667d3f80ced7c2" + integrity sha512-HZzqCGPecFLyoRj5HLfuDSKYTJkAfB5thKBIkRHtGjWwY7p1dAyveIbXIq4tO0KYfDF2tHqPUgY9SDnGm00uFw== + public-encrypt@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" @@ -7608,7 +7713,7 @@ punycode@1.3.2: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= -punycode@2.x.x, punycode@^2.1.0: +punycode@2.x.x, punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== @@ -7618,11 +7723,6 @@ punycode@^1.2.4, punycode@^1.4.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= -q@1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" - integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= - q@^1.1.2: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" @@ -7685,7 +7785,7 @@ range-parser@^1.0.3, range-parser@~1.2.0: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= -raw-body@2, raw-body@2.3.3: +raw-body@2.3.3: version "2.3.3" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== @@ -7695,6 +7795,16 @@ raw-body@2, raw-body@2.3.3: iconv-lite "0.4.23" unpipe "1.0.0" +raw-body@^2.2.0: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + dependencies: + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" + rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -7722,7 +7832,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@2, readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -7755,15 +7865,6 @@ readable-stream@1.1.x: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.1.1.tgz#ed6bbc6c5ba58b090039ff18ce670515795aeb06" - integrity sha512-DkN66hPyqDhnIQ6Jcsvx9bFjhw214O4poMBcIMgPVpQvNy9a0e0Uhg5SqySyDKAmUlwt8LonTBz1ezOnM8pUdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - readdirp@^2.0.0: version "2.2.1" resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" @@ -7979,14 +8080,24 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request-progress@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-2.0.1.tgz#5d36bb57961c673aa5b788dbc8141fdf23b44e08" - integrity sha1-XTa7V5YcZzqlt4jbyBQf3yO0Tgg= +request-promise-core@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9" + integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ== + dependencies: + lodash "^4.17.15" + +request-promise@^4.2.4: + version "4.2.5" + resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.5.tgz#186222c59ae512f3497dfe4d75a9c8461bd0053c" + integrity sha512-ZgnepCykFdmpq86fKGwqntyTiUrHycALuGggpyCZwMvGaZWgxW6yagT0FHkgo5LzYvOaCNvxYwWYIjevSH1EDg== dependencies: - throttleit "^1.0.0" + bluebird "^3.5.0" + request-promise-core "1.1.3" + stealthy-require "^1.1.1" + tough-cookie "^2.3.3" -request@^2.81.0, request@^2.87.0, request@^2.88.0: +request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -8012,11 +8123,21 @@ request@^2.81.0, request@^2.87.0, request@^2.88.0: tunnel-agent "^0.6.0" uuid "^3.3.2" +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + require-from-string@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -8062,18 +8183,33 @@ restore-cursor@^2.0.0: onetime "^2.0.0" signal-exit "^3.0.2" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: glob "^7.1.3" +rimraf@^2.6.3: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -8194,11 +8330,6 @@ select@^1.1.2: resolved "https://registry.yarnpkg.com/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d" integrity sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0= -selenium-server@^2.53.1: - version "2.53.1" - resolved "https://registry.yarnpkg.com/selenium-server/-/selenium-server-2.53.1.tgz#d681528812f3c2e0531a6b7e613e23bb02cce8a6" - integrity sha1-1oFSiBLzwuBTGmt+YT4juwLM6KY= - semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36" @@ -8211,10 +8342,15 @@ semver-diff@^2.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -semver@~5.0.1: - version "5.0.3" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.0.3.tgz#77466de589cd5d3c95f138aa78bc569a3cb5d27a" - integrity sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no= +semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== send@0.16.2: version "0.16.2" @@ -8250,7 +8386,7 @@ serve-static@1.13.2: parseurl "~1.3.2" send "0.16.2" -set-blocking@~2.0.0: +set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= @@ -8285,6 +8421,11 @@ setprototypeof@1.1.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + sha.js@^2.4.0, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" @@ -8331,10 +8472,10 @@ slice-ansi@2.0.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -smart-buffer@^1.0.13: - version "1.1.15" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-1.1.15.tgz#7f114b5b65fab3e2a35aa775bb12f0d1c649bf16" - integrity sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY= +smart-buffer@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" + integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== snapdragon-node@^2.0.1: version "2.1.1" @@ -8366,22 +8507,21 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -socks-proxy-agent@2: - version "2.1.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz#86ebb07193258637870e13b7bd99f26c663df3d3" - integrity sha512-sFtmYqdUK5dAMh85H0LEVFUCO7OhJJe1/z2x/Z6mxp3s7/QPf1RkZmpZy+BpuU0bEjcV9npqKjq9Y3kwFUjnxw== +socks-proxy-agent@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" + integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== dependencies: - agent-base "2" - extend "3" - socks "~1.1.5" + agent-base "~4.2.1" + socks "~2.3.2" -socks@~1.1.5: - version "1.1.10" - resolved "https://registry.yarnpkg.com/socks/-/socks-1.1.10.tgz#5b8b7fc7c8f341c53ed056e929b7bf4de8ba7b5a" - integrity sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o= +socks@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" + integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== dependencies: - ip "^1.1.4" - smart-buffer "^1.0.13" + ip "1.1.5" + smart-buffer "^4.1.0" sort-keys@^1.0.0: version "1.1.2" @@ -8563,6 +8703,11 @@ std-env@^1.1.0, std-env@^1.3.1: dependencies: is-ci "^1.1.0" +stealthy-require@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b" + integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= + stream-browserify@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" @@ -8622,7 +8767,16 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" -string_decoder@^1.0.0, string_decoder@^1.1.1: +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string_decoder@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== @@ -8671,6 +8825,20 @@ strip-ansi@^5.0.0: dependencies: ansi-regex "^4.0.0" +strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + strip-bom-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-bom-string/-/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92" @@ -8699,7 +8867,7 @@ strip-indent@^2.0.0: resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" integrity sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g= -strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@2.0.1, strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -8725,12 +8893,12 @@ stylus@^0.54.5: sax "0.5.x" source-map "0.1.x" -supports-color@3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.1.2.tgz#72a262894d9d408b956ca05ff37b2ed8a6e2a2d5" - integrity sha1-cqJiiU2dQIuVbKBf83su2KbiotU= +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== dependencies: - has-flag "^1.0.0" + has-flag "^3.0.0" supports-color@^2.0.0: version "2.0.0" @@ -8758,6 +8926,13 @@ supports-color@^6.1.0: dependencies: has-flag "^3.0.0" +supports-color@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1" + integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g== + dependencies: + has-flag "^4.0.0" + svgo@^0.7.0: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" @@ -8877,11 +9052,6 @@ thenify-all@^1.0.0: dependencies: any-promise "^1.0.0" -throttleit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" - integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= - through2@^2.0.0: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" @@ -8895,7 +9065,7 @@ through@^2.3.6, through@~2.3.4: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= -thunkify@~2.1.1: +thunkify@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/thunkify/-/thunkify-2.1.2.tgz#faa0e9d230c51acc95ca13a361ac05ca7e04553d" integrity sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0= @@ -9006,6 +9176,14 @@ toposort@^1.0.0: resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029" integrity sha1-LmhELZ9k7HILjMieZEOsbKqVACk= +tough-cookie@^2.3.3: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" @@ -9248,7 +9426,7 @@ use@^3.1.0: resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== -util-deprecate@^1.0.1, util-deprecate@~1.0.1: +util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -9496,6 +9674,13 @@ watchpack@^1.5.0: graceful-fs "^4.1.2" neo-async "^2.5.0" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= + dependencies: + defaults "^1.0.3" + webpack-chain@^4.6.0: version "4.12.1" resolved "https://registry.yarnpkg.com/webpack-chain/-/webpack-chain-4.12.1.tgz#6c8439bbb2ab550952d60e1ea9319141906c02a6" @@ -9666,14 +9851,19 @@ whet.extend@~0.9.9: resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" integrity sha1-+HfVv2SMl+WqVC+twW1qJZucEaE= -which@^1.2.10, which@^1.2.9: +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which@1.3.1, which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" -wide-align@^1.1.0: +wide-align@1.1.3, wide-align@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== @@ -9830,6 +10020,15 @@ wrap-ansi@^3.0.1: string-width "^2.1.1" strip-ansi "^4.0.0" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -9889,6 +10088,14 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.3.tgz#b4b049e314be545e3ce802236d6cd22cd91c3de9" integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== +yargs-parser@13.1.1, yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" @@ -9896,6 +10103,31 @@ yargs-parser@^10.0.0: dependencies: camelcase "^4.1.0" +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs@13.3.0, yargs@^13.3.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.1" + yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" From 8fd61c9b06123321b497fbfdf067117db3aa90f9 Mon Sep 17 00:00:00 2001 From: Tyler Sayles Date: Wed, 25 Dec 2019 03:28:06 -0500 Subject: [PATCH 053/280] mutates -> mutate; add period to mirror other constructions (#1655) --- examples/counter/store.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/counter/store.js b/examples/counter/store.js index 426a7d76d..36a63eb54 100644 --- a/examples/counter/store.js +++ b/examples/counter/store.js @@ -9,7 +9,7 @@ const state = { count: 0 } -// mutations are operations that actually mutates the state. +// mutations are operations that actually mutate the state. // each mutation handler gets the entire state tree as the // first argument, followed by additional payload arguments. // mutations must be synchronous and can be recorded by plugins @@ -43,7 +43,7 @@ const actions = { } } -// getters are functions +// getters are functions. const getters = { evenOrOdd: state => state.count % 2 === 0 ? 'even' : 'odd' } From e0126533301febf66072f1865cf9a77778cf2176 Mon Sep 17 00:00:00 2001 From: cngu Date: Wed, 25 Dec 2019 01:35:55 -0700 Subject: [PATCH 054/280] fix: Prevent invalidating subscription iterator (#1438) * Prevent users from invalidating the subscription iterator by synchronously calling unsubscribe * Prevent users from invalidating the action subscription iterator by synchronously calling unsubscribe * Fix commit subscribers argument invocation --- src/store.js | 6 +++++- test/unit/store.spec.js | 42 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/src/store.js b/src/store.js index c4cb3f1a5..8b89d8187 100644 --- a/src/store.js +++ b/src/store.js @@ -101,7 +101,10 @@ export class Store { handler(payload) }) }) - this._subscribers.forEach(sub => sub(mutation, this.state)) + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(sub => sub(mutation, this.state)) if ( process.env.NODE_ENV !== 'production' && @@ -132,6 +135,7 @@ export class Store { try { this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(sub => sub.before) .forEach(sub => sub.before(action, this.state)) } catch (e) { diff --git a/test/unit/store.spec.js b/test/unit/store.spec.js index 001ee4249..561496e60 100644 --- a/test/unit/store.spec.js +++ b/test/unit/store.spec.js @@ -320,6 +320,48 @@ describe('Store', () => { expect(secondSubscribeSpy.calls.count()).toBe(2) }) + it('subscribe: should handle subscriptions with synchronous unsubscriptions', () => { + const subscribeSpy = jasmine.createSpy() + const testPayload = 2 + const store = new Vuex.Store({ + state: {}, + mutations: { + [TEST]: () => {} + } + }) + + const unsubscribe = store.subscribe(() => unsubscribe()) + store.subscribe(subscribeSpy) + store.commit(TEST, testPayload) + + expect(subscribeSpy).toHaveBeenCalledWith( + { type: TEST, payload: testPayload }, + store.state + ) + expect(subscribeSpy.calls.count()).toBe(1) + }) + + it('subscribeAction: should handle subscriptions with synchronous unsubscriptions', () => { + const subscribeSpy = jasmine.createSpy() + const testPayload = 2 + const store = new Vuex.Store({ + state: {}, + actions: { + [TEST]: () => {} + } + }) + + const unsubscribe = store.subscribeAction(() => unsubscribe()) + store.subscribeAction(subscribeSpy) + store.dispatch(TEST, testPayload) + + expect(subscribeSpy).toHaveBeenCalledWith( + { type: TEST, payload: testPayload }, + store.state + ) + expect(subscribeSpy.calls.count()).toBe(1) + }) + // store.watch should only be asserted in non-SSR environment if (!isSSR) { it('strict mode: warn mutations outside of handlers', () => { From bafa8817da7753f36e4375db49ff56a9a3517808 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Tue, 28 Jan 2020 01:09:46 +0900 Subject: [PATCH 055/280] refactor: do not mutate mutation payload in the todo app example (#1670) * refactor: do not mutate mutation payload in the todo app example * refactor: make things a bit easier to read --- examples/todomvc/store/mutations.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/todomvc/store/mutations.js b/examples/todomvc/store/mutations.js index d0be5bca2..f68537b8d 100644 --- a/examples/todomvc/store/mutations.js +++ b/examples/todomvc/store/mutations.js @@ -15,7 +15,12 @@ export const mutations = { }, editTodo (state, { todo, text = todo.text, done = todo.done }) { - todo.text = text - todo.done = done + const index = state.todos.indexOf(todo) + + state.todos.splice(index, 1, { + ...todo, + text, + done + }) } } From d1dbc4872d5d5f20e03d8f8033497108c7f92b6c Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Tue, 28 Jan 2020 01:19:45 +0900 Subject: [PATCH 056/280] style: remove unnecessary blank line from webpack config --- examples/webpack.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/webpack.config.js b/examples/webpack.config.js index 294d6e66c..0ca94fb22 100644 --- a/examples/webpack.config.js +++ b/examples/webpack.config.js @@ -54,5 +54,4 @@ module.exports = { new webpack.HotModuleReplacementPlugin(), new webpack.NoEmitOnErrorsPlugin() ] - } From d601129082fc30e5591e1341eb7abfc97f002991 Mon Sep 17 00:00:00 2001 From: Kia Ishii Date: Tue, 4 Feb 2020 18:22:01 +0900 Subject: [PATCH 057/280] ci: fix failing e2e test --- examples/shopping-cart/api/shop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/shopping-cart/api/shop.js b/examples/shopping-cart/api/shop.js index 5f3a53058..09d422d8c 100644 --- a/examples/shopping-cart/api/shop.js +++ b/examples/shopping-cart/api/shop.js @@ -15,7 +15,7 @@ export default { buyProducts (products, cb, errorCb) { setTimeout(() => { // simulate random checkout failure. - (Math.random() > 0.5 || navigator.userAgent.indexOf('PhantomJS') > -1) + (Math.random() > 0.5 || navigator.webdriver) ? cb() : errorCb() }, 100) From 28284a5e3fd6cd0fbdf111a896e0457c2eae4450 Mon Sep 17 00:00:00 2001 From: Peter Chen <13093023233@163.com> Date: Mon, 10 Feb 2020 15:44:19 +0800 Subject: [PATCH 058/280] fix docs description I think this 'action' maybe is not the action in Vuex? Maybe using 'mutation' in docs is more specific I check the englinsh docs, and it's the same word 'action'... Maybe I misunderstand the mean docs: fix docs desc in forms part --- docs/guide/forms.md | 2 +- docs/zh/guide/forms.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guide/forms.md b/docs/guide/forms.md index d9d4d586f..eacf6e0b7 100644 --- a/docs/guide/forms.md +++ b/docs/guide/forms.md @@ -10,7 +10,7 @@ When using Vuex in strict mode, it could be a bit tricky to use `v-model` on a p Assuming `obj` is a computed property that returns an Object from the store, the `v-model` here will attempt to directly mutate `obj.message` when the user types in the input. In strict mode, this will result in an error because the mutation is not performed inside an explicit Vuex mutation handler. -The "Vuex way" to deal with it is binding the ``'s value and call an action on the `input` or `change` event: +The "Vuex way" to deal with it is binding the ``'s value and call a method on the `input` or `change` event: ``` html diff --git a/docs/zh/guide/forms.md b/docs/zh/guide/forms.md index 2d2dca19e..0aa449c58 100644 --- a/docs/zh/guide/forms.md +++ b/docs/zh/guide/forms.md @@ -10,7 +10,7 @@ 假设这里的 `obj` 是在计算属性中返回的一个属于 Vuex store 的对象,在用户输入时,`v-model` 会试图直接修改 `obj.message`。在严格模式中,由于这个修改不是在 mutation 函数中执行的, 这里会抛出一个错误。 -用“Vuex 的思维”去解决这个问题的方法是:给 `` 中绑定 value,然后侦听 `input` 或者 `change` 事件,在事件回调中调用 action: +用“Vuex 的思维”去解决这个问题的方法是:给 `` 中绑定 value,然后侦听 `input` 或者 `change` 事件,在事件回调中调用一个方法: ``` html From 75833c567748f3d46e1a84902bf43d8e96a63af0 Mon Sep 17 00:00:00 2001 From: logicaltrojan Date: Wed, 4 Mar 2020 00:17:35 +0900 Subject: [PATCH 059/280] Typo Fix --- docs/kr/guide/mutations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/kr/guide/mutations.md b/docs/kr/guide/mutations.md index d4fe820c5..f4ec04882 100644 --- a/docs/kr/guide/mutations.md +++ b/docs/kr/guide/mutations.md @@ -135,7 +135,7 @@ mutations: { } ``` -이제 우리가 앱을 디버깅하고 devtool의 돌연변이 로그를 보고 있다고 상상해보십시오. 기록 된 모든 변이에 대해 devtool은 상태의 "이전" 및 "이후" 스냅 샷을 캡처 해야 합니다. 그러나 위의 예제 변이 내의 비동기 콜백은 불가능합니다. 변이가 커밋 되었을 때 콜백은 아직 호출되지 않으며, 콜백이 실제로 호출 될 시기를 devtool이 알 수 있는 방법이 없습니다. 콜백에서 수행 된 모든 상태 변이는 본질적으로 추적 할 수 없습니다! +이제 우리가 앱을 디버깅하고 devtool의 변이 로그를 보고 있다고 상상해보십시오. 기록 된 모든 변이에 대해 devtool은 상태의 "이전" 및 "이후" 스냅 샷을 캡처 해야 합니다. 그러나 위의 예제 변이 내의 비동기 콜백은 불가능합니다. 변이가 커밋 되었을 때 콜백은 아직 호출되지 않으며, 콜백이 실제로 호출 될 시기를 devtool이 알 수 있는 방법이 없습니다. 콜백에서 수행 된 모든 상태 변이는 본질적으로 추적 할 수 없습니다! ### 컴포넌트 안에서 변이 커밋하기 From 1bafb137bfd174a90048a9607f49d4efb8ba255f Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Mon, 9 Mar 2020 21:18:08 +0900 Subject: [PATCH 060/280] build: add vue as a peer dependency (#1692) --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index 8ed4f433f..1d8931556 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,9 @@ "url": "https://github.com/vuejs/vuex/issues" }, "homepage": "https://github.com/vuejs/vuex#readme", + "peerDependencies": { + "vue": "^2.0.0" + }, "devDependencies": { "babel-core": "^6.22.1", "babel-loader": "^7.1.2", From 339771597b150ada292e4f8ac803fd8cbece4553 Mon Sep 17 00:00:00 2001 From: ktsn Date: Mon, 9 Mar 2020 20:58:07 +0800 Subject: [PATCH 061/280] chore: bump chromedriver --- package.json | 2 +- yarn.lock | 304 ++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 232 insertions(+), 74 deletions(-) diff --git a/package.json b/package.json index 1d8931556..d990afe16 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "babel-plugin-transform-object-rest-spread": "^6.23.0", "babel-polyfill": "^6.22.0", "babel-preset-env": "^1.5.1", - "chromedriver": "^78.0.1", + "chromedriver": "^80.0.1", "cross-env": "^5.2.0", "cross-spawn": "^6.0.5", "css-loader": "^2.1.0", diff --git a/yarn.lock b/yarn.lock index b06afc7fc..78a463e67 100644 --- a/yarn.lock +++ b/yarn.lock @@ -832,11 +832,32 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@nodelib/fs.scandir@2.1.3": + version "2.1.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" + integrity sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw== + dependencies: + "@nodelib/fs.stat" "2.0.3" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.3", "@nodelib/fs.stat@^2.0.2": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz#34dc5f4cabbc720f4e60f75a747e7ecd6c175bd3" + integrity sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA== + "@nodelib/fs.stat@^1.1.2": version "1.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== +"@nodelib/fs.walk@^1.2.3": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz#011b9202a70a6366e436ca5c065844528ab04976" + integrity sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ== + dependencies: + "@nodelib/fs.scandir" "2.1.3" + fastq "^1.6.0" + "@shellscape/koa-send@^4.1.0": version "4.1.3" resolved "https://registry.yarnpkg.com/@shellscape/koa-send/-/koa-send-4.1.3.tgz#1a7c8df21f63487e060b7bfd8ed82e1d3c4ae0b0" @@ -855,6 +876,11 @@ "@shellscape/koa-send" "^4.1.0" debug "^2.6.8" +"@testim/chrome-version@^1.0.7": + version "1.0.7" + resolved "https://registry.yarnpkg.com/@testim/chrome-version/-/chrome-version-1.0.7.tgz#0cd915785ec4190f08a3a6acc9b61fc38fb5f1a9" + integrity sha512-8UT/J+xqCYfn3fKtOznAibsHpiuDshCb0fwgWxRazTT19Igp9ovoXMPhXyLD6m3CKQGTMHgqoxaFfMWaL40Rnw== + "@types/color-name@^1.1.1": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" @@ -1164,6 +1190,14 @@ agentkeepalive@^2.2.0: resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef" integrity sha1-xdG9SxKQCPEWPyNvhuX66iAm4u8= +aggregate-error@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.0.1.tgz#db2fe7246e536f40d9b5442a39e117d7dd6a24e0" + integrity sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv-errors@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-1.0.1.tgz#f35986aceb91afadec4102fbd85014950cefa64d" @@ -1364,6 +1398,11 @@ array-union@^1.0.1: dependencies: array-uniq "^1.0.1" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -1503,6 +1542,13 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +axios@^0.19.2: + version "0.19.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" + integrity sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA== + dependencies: + follow-redirects "1.5.10" + babel-code-frame@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" @@ -2240,6 +2286,13 @@ braces@^2.3.0, braces@^2.3.1: split-string "^3.0.2" to-regex "^3.0.1" +braces@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -2607,15 +2660,16 @@ chrome-trace-event@^1.0.0: dependencies: tslib "^1.9.0" -chromedriver@^78.0.1: - version "78.0.1" - resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-78.0.1.tgz#2db3425a2cba6fcaf1a41d9538b16c3d06fa74a8" - integrity sha512-eOsyFk4xb9EECs1VMrDbxO713qN+Bu1XUE8K9AuePc3839TPdAegg72kpXSzkeNqRNZiHbnJUItIVCLFkDqceA== +chromedriver@^80.0.1: + version "80.0.1" + resolved "https://registry.yarnpkg.com/chromedriver/-/chromedriver-80.0.1.tgz#35c1642e2d864b9e8262f291003e455b0e422917" + integrity sha512-VfRtZUpBUIjeypS+xM40+VD9g4Drv7L2VibG/4+0zX3mMx4KayN6gfKETycPfO6JwQXTLSxEr58fRcrsa8r5xQ== dependencies: - del "^4.1.1" + "@testim/chrome-version" "^1.0.7" + axios "^0.19.2" + del "^5.1.0" extract-zip "^1.6.7" - mkdirp "^0.5.1" - request "^2.88.0" + mkdirp "^1.0.3" tcp-port-used "^1.0.1" ci-info@^1.5.0: @@ -2665,6 +2719,11 @@ clean-css@4.2.x: dependencies: source-map "~0.6.0" +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" @@ -3279,7 +3338,7 @@ debug@2, debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.1, de dependencies: ms "2.0.0" -debug@3.1.0, debug@~3.1.0: +debug@3.1.0, debug@=3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== @@ -3395,18 +3454,19 @@ degenerator@^1.0.4: escodegen "1.x.x" esprima "3.x.x" -del@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" - integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== - dependencies: - "@types/glob" "^7.1.1" - globby "^6.1.0" - is-path-cwd "^2.0.0" - is-path-in-cwd "^2.0.0" - p-map "^2.0.0" - pify "^4.0.1" - rimraf "^2.6.3" +del@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/del/-/del-5.1.0.tgz#d9487c94e367410e6eff2925ee58c0c84a75b3a7" + integrity sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA== + dependencies: + globby "^10.0.1" + graceful-fs "^4.2.2" + is-glob "^4.0.1" + is-path-cwd "^2.2.0" + is-path-inside "^3.0.1" + p-map "^3.0.0" + rimraf "^3.0.0" + slash "^3.0.0" delayed-stream@~1.0.0: version "1.0.0" @@ -3487,6 +3547,13 @@ dir-glob@^2.0.0: dependencies: path-type "^3.0.0" +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + docsearch.js@^2.5.2: version "2.6.2" resolved "https://registry.yarnpkg.com/docsearch.js/-/docsearch.js-2.6.2.tgz#cb36a97aeac8a8d31eed5915cdee808a2248b41c" @@ -4130,6 +4197,18 @@ fast-glob@^2.0.2: merge2 "^1.2.3" micromatch "^3.1.10" +fast-glob@^3.0.3: + version "3.2.2" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.2.tgz#ade1a9d91148965d4bf7c51f72e1ca662d32e63d" + integrity sha512-UDV82o4uQyljznxwMxyVRJgZZt3O5wENYojjzbaGEGZgeOxkLFf+V4cnUD+krzb2F72E18RhamkMZ7AdeggF7A== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.0" + merge2 "^1.3.0" + micromatch "^4.0.2" + picomatch "^2.2.1" + fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -4145,6 +4224,13 @@ fastparse@^1.1.1: resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.2.tgz#91728c5a5942eced8531283c79441ee4122c35a9" integrity sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== +fastq@^1.6.0: + version "1.6.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.6.1.tgz#4570c74f2ded173e71cf0beb08ac70bb85826791" + integrity sha512-mpIH5sKYueh3YyeJwqtVo8sORi0CgtmkVbK6kZStpQlZBYQuTzG2CZ7idSiJuA7bY0SFCWUc5WIs+oYumGCQNw== + dependencies: + reusify "^1.0.4" + fd-slicer@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" @@ -4211,6 +4297,13 @@ fill-range@^4.0.0: repeat-string "^1.6.1" to-regex-range "^2.1.0" +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + finalhandler@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" @@ -4286,6 +4379,13 @@ flush-write-stream@^1.0.0: inherits "^2.0.1" readable-stream "^2.0.4" +follow-redirects@1.5.10: + version "1.5.10" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.10.tgz#7b7a9f9aea2fdff36786a94ff643ed07f4ff5e2a" + integrity sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ== + dependencies: + debug "=3.1.0" + for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" @@ -4489,6 +4589,13 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-parent@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2" + integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" @@ -4506,7 +4613,7 @@ glob@7.0.x: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.1.3, glob@^7.0.3, glob@^7.0.6, glob@^7.1.2, glob@^7.1.3: +glob@7.1.3, glob@^7.0.6, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== @@ -4543,16 +4650,19 @@ globals@^9.18.0: resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== -globby@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" - integrity sha1-9abXDoOV4hyFj7BInWTfAkJNUGw= +globby@^10.0.1: + version "10.0.2" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.2.tgz#277593e745acaa4646c3ab411289ec47a0392543" + integrity sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg== dependencies: - array-union "^1.0.1" - glob "^7.0.3" - object-assign "^4.0.1" - pify "^2.0.0" - pinkie-promise "^2.0.0" + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" globby@^7.1.1: version "7.1.1" @@ -4608,6 +4718,11 @@ graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6 resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== +graceful-fs@^4.2.2: + version "4.2.3" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423" + integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ== + gray-matter@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.2.tgz#9aa379e3acaf421193fce7d2a28cebd4518ac454" @@ -4930,6 +5045,11 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +ignore@^5.1.1: + version "5.1.4" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.4.tgz#84b7b3dbe64552b6ef0eca99f6743dbec6d97adf" + integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== + immediate@^3.2.3: version "3.2.3" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" @@ -4988,6 +5108,11 @@ indent-string@^3.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" integrity sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok= +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" @@ -5255,6 +5380,13 @@ is-glob@^4.0.0: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80" @@ -5292,23 +5424,21 @@ is-number@^4.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" integrity sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ== +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= -is-path-cwd@^2.0.0: +is-path-cwd@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== -is-path-in-cwd@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" - integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== - dependencies: - is-path-inside "^2.1.0" - is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" @@ -5316,12 +5446,10 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" -is-path-inside@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" - integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== - dependencies: - path-is-inside "^1.0.2" +is-path-inside@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.2.tgz#f5220fc82a3e233757291dddc9c5877f2a1f3017" + integrity sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg== is-plain-obj@^1.0.0, is-plain-obj@^1.1, is-plain-obj@^1.1.0: version "1.1.0" @@ -6190,6 +6318,11 @@ merge2@^1.2.3: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.3.tgz#7ee99dbd69bb6481689253f018488a1b902b0ed5" integrity sha512-gdUU1Fwj5ep4kplwcmftruWofEFt6lfpkkr3h860CXbAB9c3hGb55EOL2ali0Td5oebvW0E1+3Sr+Ur7XfKpRA== +merge2@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.3.0.tgz#5b366ee83b2f1582c48f87e47cf1a9352103ca81" + integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -6233,6 +6366,14 @@ micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: snapdragon "^0.8.1" to-regex "^3.0.2" +micromatch@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" + integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + dependencies: + braces "^3.0.1" + picomatch "^2.0.5" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" @@ -6401,6 +6542,11 @@ mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@ dependencies: minimist "0.0.8" +mkdirp@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.3.tgz#4cf2e30ad45959dddea53ad97d518b6c8205e1ea" + integrity sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g== + mkpath@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mkpath/-/mkpath-1.0.0.tgz#ebb3a977e7af1c683ae6fda12b545a6ba6c5853d" @@ -6956,10 +7102,12 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" - integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== + dependencies: + aggregate-error "^3.0.0" p-try@^1.0.0: version "1.0.0" @@ -7121,6 +7269,11 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + pbkdf2@^3.0.3: version "3.0.17" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.0.17.tgz#976c206530617b14ebb32114239f7b09336e93a6" @@ -7142,33 +7295,16 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -pify@^2.0.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= +picomatch@^2.0.5, picomatch@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.1.tgz#21bac888b6ed8601f831ce7816e335bc779f0a4a" + integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" @@ -8196,6 +8332,11 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" @@ -8203,10 +8344,10 @@ rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@~2.6.2: dependencies: glob "^7.1.3" -rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" @@ -8259,6 +8400,11 @@ run-async@^2.2.0: dependencies: is-promise "^2.1.0" +run-parallel@^1.1.9: + version "1.1.9" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.9.tgz#c9dd3a7cf9f4b2c4b6244e173a6ed866e61dd679" + integrity sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q== + run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" @@ -8456,6 +8602,11 @@ slash@^1.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slice-ansi@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" @@ -9139,6 +9290,13 @@ to-regex-range@^2.1.0: is-number "^3.0.0" repeat-string "^1.6.1" +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + to-regex@^3.0.1, to-regex@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" From 810a360c409835f150b9721dd67ad172d6edca64 Mon Sep 17 00:00:00 2001 From: ktsn Date: Mon, 9 Mar 2020 21:00:35 +0800 Subject: [PATCH 062/280] ci: update node version to v12 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 15a57d685..cb7d199ff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2 defaults: &defaults working_directory: ~/vuex docker: - - image: circleci/node:8-browsers + - image: circleci/node:12-browsers jobs: install: From ac8a486b1bfc13e5e3e99af786a0c221042a7fa1 Mon Sep 17 00:00:00 2001 From: ktsn Date: Mon, 9 Mar 2020 21:04:58 +0800 Subject: [PATCH 063/280] [build] 3.1.3 --- dist/vuex.common.js | 16 +++++++++------- dist/vuex.esm.browser.js | 16 +++++++++------- dist/vuex.esm.browser.min.js | 6 +++--- dist/vuex.esm.js | 16 +++++++++------- dist/vuex.js | 16 +++++++++------- dist/vuex.min.js | 6 +++--- 6 files changed, 42 insertions(+), 34 deletions(-) diff --git a/dist/vuex.common.js b/dist/vuex.common.js index d30eab0ec..ab910e447 100644 --- a/dist/vuex.common.js +++ b/dist/vuex.common.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.2 - * (c) 2019 Evan You + * vuex v3.1.3 + * (c) 2020 Evan You * @license MIT */ 'use strict'; @@ -394,7 +394,10 @@ Store.prototype.commit = function commit (_type, _payload, _options) { handler(payload); }); }); - this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(function (sub) { return sub(mutation, this$1.state); }); if ( process.env.NODE_ENV !== 'production' && @@ -426,6 +429,7 @@ Store.prototype.dispatch = function dispatch (_type, _payload) { try { this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(function (sub) { return sub.before; }) .forEach(function (sub) { return sub.before(action, this$1.state); }); } catch (e) { @@ -794,9 +798,7 @@ function enableStrictMode (store) { } function getNestedState (state, path) { - return path.length - ? path.reduce(function (state, key) { return state[key]; }, state) - : state + return path.reduce(function (state, key) { return state[key]; }, state) } function unifyObjectStyle (type, payload, options) { @@ -1039,7 +1041,7 @@ function getModuleByNamespace (store, helper, namespace) { var index = { Store: Store, install: install, - version: '3.1.2', + version: '3.1.3', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.esm.browser.js b/dist/vuex.esm.browser.js index 5f8749be6..6b93a9b80 100644 --- a/dist/vuex.esm.browser.js +++ b/dist/vuex.esm.browser.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.2 - * (c) 2019 Evan You + * vuex v3.1.3 + * (c) 2020 Evan You * @license MIT */ function applyMixin (Vue) { @@ -382,7 +382,10 @@ class Store { handler(payload); }); }); - this._subscribers.forEach(sub => sub(mutation, this.state)); + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(sub => sub(mutation, this.state)); if ( options && options.silent @@ -412,6 +415,7 @@ class Store { try { this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(sub => sub.before) .forEach(sub => sub.before(action, this.state)); } catch (e) { @@ -769,9 +773,7 @@ function enableStrictMode (store) { } function getNestedState (state, path) { - return path.length - ? path.reduce((state, key) => state[key], state) - : state + return path.reduce((state, key) => state[key], state) } function unifyObjectStyle (type, payload, options) { @@ -996,7 +998,7 @@ function getModuleByNamespace (store, helper, namespace) { var index_esm = { Store, install, - version: '3.1.2', + version: '3.1.3', mapState, mapMutations, mapGetters, diff --git a/dist/vuex.esm.browser.min.js b/dist/vuex.esm.browser.min.js index ab6f953da..44b62508d 100644 --- a/dist/vuex.esm.browser.min.js +++ b/dist/vuex.esm.browser.min.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.2 - * (c) 2019 Evan You + * vuex v3.1.3 + * (c) 2020 Evan You * @license MIT */ -const t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(s=>e(t[s],s))}function s(t){return null!==t&&"object"==typeof t}class i{constructor(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;const s=t.state;this.state=("function"==typeof s?s():s)||{}}get namespaced(){return!!this._rawModule.namespaced}addChild(t,e){this._children[t]=e}removeChild(t){delete this._children[t]}getChild(t){return this._children[t]}update(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)}forEachChild(t){e(this._children,t)}forEachGetter(t){this._rawModule.getters&&e(this._rawModule.getters,t)}forEachAction(t){this._rawModule.actions&&e(this._rawModule.actions,t)}forEachMutation(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)}}class o{constructor(t){this.register([],t,!1)}get(t){return t.reduce((t,e)=>t.getChild(e),this.root)}getNamespace(t){let e=this.root;return t.reduce((t,s)=>t+((e=e.getChild(s)).namespaced?s+"/":""),"")}update(t){!function t(e,s,i){s.update(i);if(i.modules)for(const o in i.modules){if(!s.getChild(o))return;t(e.concat(o),s.getChild(o),i.modules[o])}}([],this.root,t)}register(t,s,o=!0){const n=new i(s,o);if(0===t.length)this.root=n;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],n)}s.modules&&e(s.modules,(e,s)=>{this.register(t.concat(s),e,o)})}unregister(t){const e=this.get(t.slice(0,-1)),s=t[t.length-1];e.getChild(s).runtime&&e.removeChild(s)}}let n;class r{constructor(e={}){!n&&"undefined"!=typeof window&&window.Vue&&p(window.Vue);const{plugins:s=[],strict:i=!1}=e;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new o(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new n,this._makeLocalGettersCache=Object.create(null);const r=this,{dispatch:c,commit:a}=this;this.dispatch=function(t,e){return c.call(r,t,e)},this.commit=function(t,e,s){return a.call(r,t,e,s)},this.strict=i;const l=this._modules.root.state;h(this,l,[],this._modules.root),u(this,l),s.forEach(t=>t(this)),(void 0!==e.devtools?e.devtools:n.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",t=>{e.replaceState(t)}),e.subscribe((e,s)=>{t.emit("vuex:mutation",e,s)}))}(this)}get state(){return this._vm._data.$$state}set state(t){}commit(t,e,s){const{type:i,payload:o,options:n}=d(t,e,s),r={type:i,payload:o},c=this._mutations[i];c&&(this._withCommit(()=>{c.forEach(function(t){t(o)})}),this._subscribers.forEach(t=>t(r,this.state)))}dispatch(t,e){const{type:s,payload:i}=d(t,e),o={type:s,payload:i},n=this._actions[s];if(n){try{this._actionSubscribers.filter(t=>t.before).forEach(t=>t.before(o,this.state))}catch(t){}return(n.length>1?Promise.all(n.map(t=>t(i))):n[0](i)).then(t=>{try{this._actionSubscribers.filter(t=>t.after).forEach(t=>t.after(o,this.state))}catch(t){}return t})}}subscribe(t){return c(t,this._subscribers)}subscribeAction(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)}watch(t,e,s){return this._watcherVM.$watch(()=>t(this.state,this.getters),e,s)}replaceState(t){this._withCommit(()=>{this._vm._data.$$state=t})}registerModule(t,e,s={}){"string"==typeof t&&(t=[t]),this._modules.register(t,e),h(this,this.state,t,this._modules.get(t),s.preserveState),u(this,this.state)}unregisterModule(t){"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(()=>{const e=l(this.state,t.slice(0,-1));n.delete(e,t[t.length-1])}),a(this)}hotUpdate(t){this._modules.update(t),a(this,!0)}_withCommit(t){const e=this._committing;this._committing=!0,t(),this._committing=e}}function c(t,e){return e.indexOf(t)<0&&e.push(t),()=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)}}function a(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);const s=t.state;h(t,s,[],t._modules.root,!0),u(t,s,e)}function u(t,s,i){const o=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);const r=t._wrappedGetters,c={};e(r,(e,s)=>{c[s]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,s,{get:()=>t._vm[s],enumerable:!0})});const a=n.config.silent;n.config.silent=!0,t._vm=new n({data:{$$state:s},computed:c}),n.config.silent=a,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},()=>{},{deep:!0,sync:!0})}(t),o&&(i&&t._withCommit(()=>{o._data.$$state=null}),n.nextTick(()=>o.$destroy()))}function h(t,e,s,i,o){const r=!s.length,c=t._modules.getNamespace(s);if(i.namespaced&&(t._modulesNamespaceMap[c],t._modulesNamespaceMap[c]=i),!r&&!o){const o=l(e,s.slice(0,-1)),r=s[s.length-1];t._withCommit(()=>{n.set(o,r,i.state)})}const a=i.context=function(t,e,s){const i=""===e,o={dispatch:i?t.dispatch:(s,i,o)=>{const n=d(s,i,o),{payload:r,options:c}=n;let{type:a}=n;return c&&c.root||(a=e+a),t.dispatch(a,r)},commit:i?t.commit:(s,i,o)=>{const n=d(s,i,o),{payload:r,options:c}=n;let{type:a}=n;c&&c.root||(a=e+a),t.commit(a,r,c)}};return Object.defineProperties(o,{getters:{get:i?()=>t.getters:()=>(function(t,e){if(!t._makeLocalGettersCache[e]){const s={},i=e.length;Object.keys(t.getters).forEach(o=>{if(o.slice(0,i)!==e)return;const n=o.slice(i);Object.defineProperty(s,n,{get:()=>t.getters[o],enumerable:!0})}),t._makeLocalGettersCache[e]=s}return t._makeLocalGettersCache[e]})(t,e)},state:{get:()=>l(t.state,s)}}),o}(t,c,s);i.forEachMutation((e,s)=>{!function(t,e,s,i){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){s.call(t,i.state,e)})}(t,c+s,e,a)}),i.forEachAction((e,s)=>{const i=e.root?s:c+s,o=e.handler||e;!function(t,e,s,i){(t._actions[e]||(t._actions[e]=[])).push(function(e){let o=s.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e);var n;return(n=o)&&"function"==typeof n.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch(e=>{throw t._devtoolHook.emit("vuex:error",e),e}):o})}(t,i,o,a)}),i.forEachGetter((e,s)=>{!function(t,e,s,i){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return s(i.state,i.getters,t.state,t.getters)}}(t,c+s,e,a)}),i.forEachChild((i,n)=>{h(t,e,s.concat(n),i,o)})}function l(t,e){return e.length?e.reduce((t,e)=>t[e],t):t}function d(t,e,i){return s(t)&&t.type&&(i=e,e=t,t=t.type),{type:t,payload:e,options:i}}function p(t){n&&t===n||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{const s=t.prototype._init;t.prototype._init=function(t={}){t.init=t.init?[e].concat(t.init):e,s.call(this,t)}}function e(){const t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(n=t)}const m=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(){let e=this.$store.state,s=this.$store.getters;if(t){const i=v(this.$store,"mapState",t);if(!i)return;e=i.context.state,s=i.context.getters}return"function"==typeof i?i.call(this,e,s):e[i]},s[e].vuex=!0}),s}),f=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.commit;if(t){const e=v(this.$store,"mapMutations",t);if(!e)return;s=e.context.commit}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),_=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{i=t+i,s[e]=function(){if(!t||v(this.$store,"mapGetters",t))return this.$store.getters[i]},s[e].vuex=!0}),s}),g=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.dispatch;if(t){const e=v(this.$store,"mapActions",t);if(!e)return;s=e.context.dispatch}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),y=t=>({mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:f.bind(null,t),mapActions:g.bind(null,t)});function b(t){return function(t){return Array.isArray(t)||s(t)}(t)?Array.isArray(t)?t.map(t=>({key:t,val:t})):Object.keys(t).map(e=>({key:e,val:t[e]})):[]}function w(t){return(e,s)=>("string"!=typeof e?(s=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,s))}function v(t,e,s){return t._modulesNamespaceMap[s]}export default{Store:r,install:p,version:"3.1.2",mapState:m,mapMutations:f,mapGetters:_,mapActions:g,createNamespacedHelpers:y};export{r as Store,p as install,m as mapState,f as mapMutations,_ as mapGetters,g as mapActions,y as createNamespacedHelpers}; \ No newline at end of file +const t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(s=>e(t[s],s))}function s(t){return null!==t&&"object"==typeof t}class i{constructor(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;const s=t.state;this.state=("function"==typeof s?s():s)||{}}get namespaced(){return!!this._rawModule.namespaced}addChild(t,e){this._children[t]=e}removeChild(t){delete this._children[t]}getChild(t){return this._children[t]}update(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)}forEachChild(t){e(this._children,t)}forEachGetter(t){this._rawModule.getters&&e(this._rawModule.getters,t)}forEachAction(t){this._rawModule.actions&&e(this._rawModule.actions,t)}forEachMutation(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)}}class o{constructor(t){this.register([],t,!1)}get(t){return t.reduce((t,e)=>t.getChild(e),this.root)}getNamespace(t){let e=this.root;return t.reduce((t,s)=>t+((e=e.getChild(s)).namespaced?s+"/":""),"")}update(t){!function t(e,s,i){s.update(i);if(i.modules)for(const o in i.modules){if(!s.getChild(o))return;t(e.concat(o),s.getChild(o),i.modules[o])}}([],this.root,t)}register(t,s,o=!0){const n=new i(s,o);if(0===t.length)this.root=n;else{this.get(t.slice(0,-1)).addChild(t[t.length-1],n)}s.modules&&e(s.modules,(e,s)=>{this.register(t.concat(s),e,o)})}unregister(t){const e=this.get(t.slice(0,-1)),s=t[t.length-1];e.getChild(s).runtime&&e.removeChild(s)}}let n;class r{constructor(e={}){!n&&"undefined"!=typeof window&&window.Vue&&p(window.Vue);const{plugins:s=[],strict:i=!1}=e;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new o(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new n,this._makeLocalGettersCache=Object.create(null);const r=this,{dispatch:c,commit:a}=this;this.dispatch=function(t,e){return c.call(r,t,e)},this.commit=function(t,e,s){return a.call(r,t,e,s)},this.strict=i;const l=this._modules.root.state;h(this,l,[],this._modules.root),u(this,l),s.forEach(t=>t(this)),(void 0!==e.devtools?e.devtools:n.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",t=>{e.replaceState(t)}),e.subscribe((e,s)=>{t.emit("vuex:mutation",e,s)}))}(this)}get state(){return this._vm._data.$$state}set state(t){}commit(t,e,s){const{type:i,payload:o,options:n}=d(t,e,s),r={type:i,payload:o},c=this._mutations[i];c&&(this._withCommit(()=>{c.forEach(function(t){t(o)})}),this._subscribers.slice().forEach(t=>t(r,this.state)))}dispatch(t,e){const{type:s,payload:i}=d(t,e),o={type:s,payload:i},n=this._actions[s];if(n){try{this._actionSubscribers.slice().filter(t=>t.before).forEach(t=>t.before(o,this.state))}catch(t){}return(n.length>1?Promise.all(n.map(t=>t(i))):n[0](i)).then(t=>{try{this._actionSubscribers.filter(t=>t.after).forEach(t=>t.after(o,this.state))}catch(t){}return t})}}subscribe(t){return c(t,this._subscribers)}subscribeAction(t){return c("function"==typeof t?{before:t}:t,this._actionSubscribers)}watch(t,e,s){return this._watcherVM.$watch(()=>t(this.state,this.getters),e,s)}replaceState(t){this._withCommit(()=>{this._vm._data.$$state=t})}registerModule(t,e,s={}){"string"==typeof t&&(t=[t]),this._modules.register(t,e),h(this,this.state,t,this._modules.get(t),s.preserveState),u(this,this.state)}unregisterModule(t){"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(()=>{const e=l(this.state,t.slice(0,-1));n.delete(e,t[t.length-1])}),a(this)}hotUpdate(t){this._modules.update(t),a(this,!0)}_withCommit(t){const e=this._committing;this._committing=!0,t(),this._committing=e}}function c(t,e){return e.indexOf(t)<0&&e.push(t),()=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)}}function a(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);const s=t.state;h(t,s,[],t._modules.root,!0),u(t,s,e)}function u(t,s,i){const o=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);const r=t._wrappedGetters,c={};e(r,(e,s)=>{c[s]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,s,{get:()=>t._vm[s],enumerable:!0})});const a=n.config.silent;n.config.silent=!0,t._vm=new n({data:{$$state:s},computed:c}),n.config.silent=a,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},()=>{},{deep:!0,sync:!0})}(t),o&&(i&&t._withCommit(()=>{o._data.$$state=null}),n.nextTick(()=>o.$destroy()))}function h(t,e,s,i,o){const r=!s.length,c=t._modules.getNamespace(s);if(i.namespaced&&(t._modulesNamespaceMap[c],t._modulesNamespaceMap[c]=i),!r&&!o){const o=l(e,s.slice(0,-1)),r=s[s.length-1];t._withCommit(()=>{n.set(o,r,i.state)})}const a=i.context=function(t,e,s){const i=""===e,o={dispatch:i?t.dispatch:(s,i,o)=>{const n=d(s,i,o),{payload:r,options:c}=n;let{type:a}=n;return c&&c.root||(a=e+a),t.dispatch(a,r)},commit:i?t.commit:(s,i,o)=>{const n=d(s,i,o),{payload:r,options:c}=n;let{type:a}=n;c&&c.root||(a=e+a),t.commit(a,r,c)}};return Object.defineProperties(o,{getters:{get:i?()=>t.getters:()=>(function(t,e){if(!t._makeLocalGettersCache[e]){const s={},i=e.length;Object.keys(t.getters).forEach(o=>{if(o.slice(0,i)!==e)return;const n=o.slice(i);Object.defineProperty(s,n,{get:()=>t.getters[o],enumerable:!0})}),t._makeLocalGettersCache[e]=s}return t._makeLocalGettersCache[e]})(t,e)},state:{get:()=>l(t.state,s)}}),o}(t,c,s);i.forEachMutation((e,s)=>{!function(t,e,s,i){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){s.call(t,i.state,e)})}(t,c+s,e,a)}),i.forEachAction((e,s)=>{const i=e.root?s:c+s,o=e.handler||e;!function(t,e,s,i){(t._actions[e]||(t._actions[e]=[])).push(function(e){let o=s.call(t,{dispatch:i.dispatch,commit:i.commit,getters:i.getters,state:i.state,rootGetters:t.getters,rootState:t.state},e);var n;return(n=o)&&"function"==typeof n.then||(o=Promise.resolve(o)),t._devtoolHook?o.catch(e=>{throw t._devtoolHook.emit("vuex:error",e),e}):o})}(t,i,o,a)}),i.forEachGetter((e,s)=>{!function(t,e,s,i){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return s(i.state,i.getters,t.state,t.getters)}}(t,c+s,e,a)}),i.forEachChild((i,n)=>{h(t,e,s.concat(n),i,o)})}function l(t,e){return e.reduce((t,e)=>t[e],t)}function d(t,e,i){return s(t)&&t.type&&(i=e,e=t,t=t.type),{type:t,payload:e,options:i}}function p(t){n&&t===n||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:e});else{const s=t.prototype._init;t.prototype._init=function(t={}){t.init=t.init?[e].concat(t.init):e,s.call(this,t)}}function e(){const t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(n=t)}const m=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(){let e=this.$store.state,s=this.$store.getters;if(t){const i=v(this.$store,"mapState",t);if(!i)return;e=i.context.state,s=i.context.getters}return"function"==typeof i?i.call(this,e,s):e[i]},s[e].vuex=!0}),s}),f=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.commit;if(t){const e=v(this.$store,"mapMutations",t);if(!e)return;s=e.context.commit}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),_=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{i=t+i,s[e]=function(){if(!t||v(this.$store,"mapGetters",t))return this.$store.getters[i]},s[e].vuex=!0}),s}),g=w((t,e)=>{const s={};return b(e).forEach(({key:e,val:i})=>{s[e]=function(...e){let s=this.$store.dispatch;if(t){const e=v(this.$store,"mapActions",t);if(!e)return;s=e.context.dispatch}return"function"==typeof i?i.apply(this,[s].concat(e)):s.apply(this.$store,[i].concat(e))}}),s}),y=t=>({mapState:m.bind(null,t),mapGetters:_.bind(null,t),mapMutations:f.bind(null,t),mapActions:g.bind(null,t)});function b(t){return function(t){return Array.isArray(t)||s(t)}(t)?Array.isArray(t)?t.map(t=>({key:t,val:t})):Object.keys(t).map(e=>({key:e,val:t[e]})):[]}function w(t){return(e,s)=>("string"!=typeof e?(s=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,s))}function v(t,e,s){return t._modulesNamespaceMap[s]}export default{Store:r,install:p,version:"3.1.3",mapState:m,mapMutations:f,mapGetters:_,mapActions:g,createNamespacedHelpers:y};export{r as Store,p as install,m as mapState,f as mapMutations,_ as mapGetters,g as mapActions,y as createNamespacedHelpers}; \ No newline at end of file diff --git a/dist/vuex.esm.js b/dist/vuex.esm.js index 5c704237e..a177b959a 100644 --- a/dist/vuex.esm.js +++ b/dist/vuex.esm.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.2 - * (c) 2019 Evan You + * vuex v3.1.3 + * (c) 2020 Evan You * @license MIT */ function applyMixin (Vue) { @@ -392,7 +392,10 @@ Store.prototype.commit = function commit (_type, _payload, _options) { handler(payload); }); }); - this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(function (sub) { return sub(mutation, this$1.state); }); if ( process.env.NODE_ENV !== 'production' && @@ -424,6 +427,7 @@ Store.prototype.dispatch = function dispatch (_type, _payload) { try { this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(function (sub) { return sub.before; }) .forEach(function (sub) { return sub.before(action, this$1.state); }); } catch (e) { @@ -792,9 +796,7 @@ function enableStrictMode (store) { } function getNestedState (state, path) { - return path.length - ? path.reduce(function (state, key) { return state[key]; }, state) - : state + return path.reduce(function (state, key) { return state[key]; }, state) } function unifyObjectStyle (type, payload, options) { @@ -1037,7 +1039,7 @@ function getModuleByNamespace (store, helper, namespace) { var index_esm = { Store: Store, install: install, - version: '3.1.2', + version: '3.1.3', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.js b/dist/vuex.js index ad9a9fb55..937e61270 100644 --- a/dist/vuex.js +++ b/dist/vuex.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.2 - * (c) 2019 Evan You + * vuex v3.1.3 + * (c) 2020 Evan You * @license MIT */ (function (global, factory) { @@ -398,7 +398,10 @@ handler(payload); }); }); - this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); + + this._subscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe + .forEach(function (sub) { return sub(mutation, this$1.state); }); if ( options && options.silent @@ -429,6 +432,7 @@ try { this._actionSubscribers + .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe .filter(function (sub) { return sub.before; }) .forEach(function (sub) { return sub.before(action, this$1.state); }); } catch (e) { @@ -797,9 +801,7 @@ } function getNestedState (state, path) { - return path.length - ? path.reduce(function (state, key) { return state[key]; }, state) - : state + return path.reduce(function (state, key) { return state[key]; }, state) } function unifyObjectStyle (type, payload, options) { @@ -1042,7 +1044,7 @@ var index = { Store: Store, install: install, - version: '3.1.2', + version: '3.1.3', mapState: mapState, mapMutations: mapMutations, mapGetters: mapGetters, diff --git a/dist/vuex.min.js b/dist/vuex.min.js index 41b878bbc..702e98719 100644 --- a/dist/vuex.min.js +++ b/dist/vuex.min.js @@ -1,6 +1,6 @@ /** - * vuex v3.1.2 - * (c) 2019 Evan You + * vuex v3.1.3 + * (c) 2020 Evan You * @license MIT */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function n(t){return null!==t&&"object"==typeof t}var o=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},i={namespaced:{configurable:!0}};i.namespaced.get=function(){return!!this._rawModule.namespaced},o.prototype.addChild=function(t,e){this._children[t]=e},o.prototype.removeChild=function(t){delete this._children[t]},o.prototype.getChild=function(t){return this._children[t]},o.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},o.prototype.forEachChild=function(t){e(this._children,t)},o.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},o.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},o.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(o.prototype,i);var r,s=function(t){this.register([],t,!1)};s.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},s.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},s.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},s.prototype.register=function(t,n,i){var r=this;void 0===i&&(i=!0);var s=new o(n,i);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);n.modules&&e(n.modules,function(e,n){r.register(t.concat(n),e,i)})},s.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var a=function(e){var n=this;void 0===e&&(e={}),!r&&"undefined"!=typeof window&&window.Vue&&m(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var i=e.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new s(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new r,this._makeLocalGettersCache=Object.create(null);var a=this,c=this.dispatch,u=this.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=i;var f=this._modules.root.state;p(this,f,[],this._modules.root),h(this,f),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:r.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,n){t.emit("vuex:mutation",e,n)}))}(this)},c={state:{configurable:!0}};function u(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function f(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,n,o){var i=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=r.config.silent;r.config.silent=!0,t._vm=new r({data:{$$state:n},computed:a}),r.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),i&&(o&&t._withCommit(function(){i._data.$$state=null}),r.nextTick(function(){return i.$destroy()}))}function p(t,e,n,o,i){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=o),!s&&!i){var c=l(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){r.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=d(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=d(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},o=e.length;Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return l(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e){var i,r=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),t._devtoolHook?r.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):r})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,r){p(t,e,n.concat(r),o,i)})}function l(t,e){return e.length?e.reduce(function(t,e){return t[e]},t):t}function d(t,e,o){return n(t)&&t.type&&(o=e,e=t,t=t.type),{type:t,payload:e,options:o}}function m(t){r&&t===r||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(r=t)}c.state.get=function(){return this._vm._data.$$state},c.state.set=function(t){},a.prototype.commit=function(t,e,n){var o=this,i=d(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.forEach(function(t){return t(a,o.state)}))},a.prototype.dispatch=function(t,e){var n=this,o=d(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},a.prototype.subscribe=function(t){return u(t,this._subscribers)},a.prototype.subscribeAction=function(t){return u("function"==typeof t?{before:t}:t,this._actionSubscribers)},a.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},a.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},a.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},a.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=l(e.state,t.slice(0,-1));r.delete(n,t[t.length-1])}),f(this)},a.prototype.hotUpdate=function(t){this._modules.update(t),f(this,!0)},a.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(a.prototype,c);var v=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=$(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),_=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=$(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),y=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||$(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),g=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=$(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function b(t){return function(t){return Array.isArray(t)||n(t)}(t)?Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}}):[]}function w(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function $(t,e,n){return t._modulesNamespaceMap[n]}return{Store:a,install:m,version:"3.1.2",mapState:v,mapMutations:_,mapGetters:y,mapActions:g,createNamespacedHelpers:function(t){return{mapState:v.bind(null,t),mapGetters:y.bind(null,t),mapMutations:_.bind(null,t),mapActions:g.bind(null,t)}}}}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Vuex=e()}(this,function(){"use strict";var t=("undefined"!=typeof window?window:"undefined"!=typeof global?global:{}).__VUE_DEVTOOLS_GLOBAL_HOOK__;function e(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function n(t){return null!==t&&"object"==typeof t}var o=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var n=t.state;this.state=("function"==typeof n?n():n)||{}},i={namespaced:{configurable:!0}};i.namespaced.get=function(){return!!this._rawModule.namespaced},o.prototype.addChild=function(t,e){this._children[t]=e},o.prototype.removeChild=function(t){delete this._children[t]},o.prototype.getChild=function(t){return this._children[t]},o.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},o.prototype.forEachChild=function(t){e(this._children,t)},o.prototype.forEachGetter=function(t){this._rawModule.getters&&e(this._rawModule.getters,t)},o.prototype.forEachAction=function(t){this._rawModule.actions&&e(this._rawModule.actions,t)},o.prototype.forEachMutation=function(t){this._rawModule.mutations&&e(this._rawModule.mutations,t)},Object.defineProperties(o.prototype,i);var r,s=function(t){this.register([],t,!1)};s.prototype.get=function(t){return t.reduce(function(t,e){return t.getChild(e)},this.root)},s.prototype.getNamespace=function(t){var e=this.root;return t.reduce(function(t,n){return t+((e=e.getChild(n)).namespaced?n+"/":"")},"")},s.prototype.update=function(t){!function t(e,n,o){n.update(o);if(o.modules)for(var i in o.modules){if(!n.getChild(i))return;t(e.concat(i),n.getChild(i),o.modules[i])}}([],this.root,t)},s.prototype.register=function(t,n,i){var r=this;void 0===i&&(i=!0);var s=new o(n,i);0===t.length?this.root=s:this.get(t.slice(0,-1)).addChild(t[t.length-1],s);n.modules&&e(n.modules,function(e,n){r.register(t.concat(n),e,i)})},s.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),n=t[t.length-1];e.getChild(n).runtime&&e.removeChild(n)};var a=function(e){var n=this;void 0===e&&(e={}),!r&&"undefined"!=typeof window&&window.Vue&&m(window.Vue);var o=e.plugins;void 0===o&&(o=[]);var i=e.strict;void 0===i&&(i=!1),this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new s(e),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._watcherVM=new r,this._makeLocalGettersCache=Object.create(null);var a=this,c=this.dispatch,u=this.commit;this.dispatch=function(t,e){return c.call(a,t,e)},this.commit=function(t,e,n){return u.call(a,t,e,n)},this.strict=i;var f=this._modules.root.state;p(this,f,[],this._modules.root),h(this,f),o.forEach(function(t){return t(n)}),(void 0!==e.devtools?e.devtools:r.config.devtools)&&function(e){t&&(e._devtoolHook=t,t.emit("vuex:init",e),t.on("vuex:travel-to-state",function(t){e.replaceState(t)}),e.subscribe(function(e,n){t.emit("vuex:mutation",e,n)}))}(this)},c={state:{configurable:!0}};function u(t,e){return e.indexOf(t)<0&&e.push(t),function(){var n=e.indexOf(t);n>-1&&e.splice(n,1)}}function f(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;p(t,n,[],t._modules.root,!0),h(t,n,e)}function h(t,n,o){var i=t._vm;t.getters={},t._makeLocalGettersCache=Object.create(null);var s=t._wrappedGetters,a={};e(s,function(e,n){a[n]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,n,{get:function(){return t._vm[n]},enumerable:!0})});var c=r.config.silent;r.config.silent=!0,t._vm=new r({data:{$$state:n},computed:a}),r.config.silent=c,t.strict&&function(t){t._vm.$watch(function(){return this._data.$$state},function(){},{deep:!0,sync:!0})}(t),i&&(o&&t._withCommit(function(){i._data.$$state=null}),r.nextTick(function(){return i.$destroy()}))}function p(t,e,n,o,i){var s=!n.length,a=t._modules.getNamespace(n);if(o.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=o),!s&&!i){var c=l(e,n.slice(0,-1)),u=n[n.length-1];t._withCommit(function(){r.set(c,u,o.state)})}var f=o.context=function(t,e,n){var o=""===e,i={dispatch:o?t.dispatch:function(n,o,i){var r=d(n,o,i),s=r.payload,a=r.options,c=r.type;return a&&a.root||(c=e+c),t.dispatch(c,s)},commit:o?t.commit:function(n,o,i){var r=d(n,o,i),s=r.payload,a=r.options,c=r.type;a&&a.root||(c=e+c),t.commit(c,s,a)}};return Object.defineProperties(i,{getters:{get:o?function(){return t.getters}:function(){return function(t,e){if(!t._makeLocalGettersCache[e]){var n={},o=e.length;Object.keys(t.getters).forEach(function(i){if(i.slice(0,o)===e){var r=i.slice(o);Object.defineProperty(n,r,{get:function(){return t.getters[i]},enumerable:!0})}}),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}(t,e)}},state:{get:function(){return l(t.state,n)}}}),i}(t,a,n);o.forEachMutation(function(e,n){!function(t,e,n,o){(t._mutations[e]||(t._mutations[e]=[])).push(function(e){n.call(t,o.state,e)})}(t,a+n,e,f)}),o.forEachAction(function(e,n){var o=e.root?n:a+n,i=e.handler||e;!function(t,e,n,o){(t._actions[e]||(t._actions[e]=[])).push(function(e){var i,r=n.call(t,{dispatch:o.dispatch,commit:o.commit,getters:o.getters,state:o.state,rootGetters:t.getters,rootState:t.state},e);return(i=r)&&"function"==typeof i.then||(r=Promise.resolve(r)),t._devtoolHook?r.catch(function(e){throw t._devtoolHook.emit("vuex:error",e),e}):r})}(t,o,i,f)}),o.forEachGetter(function(e,n){!function(t,e,n,o){if(t._wrappedGetters[e])return;t._wrappedGetters[e]=function(t){return n(o.state,o.getters,t.state,t.getters)}}(t,a+n,e,f)}),o.forEachChild(function(o,r){p(t,e,n.concat(r),o,i)})}function l(t,e){return e.reduce(function(t,e){return t[e]},t)}function d(t,e,o){return n(t)&&t.type&&(o=e,e=t,t=t.type),{type:t,payload:e,options:o}}function m(t){r&&t===r||function(t){if(Number(t.version.split(".")[0])>=2)t.mixin({beforeCreate:n});else{var e=t.prototype._init;t.prototype._init=function(t){void 0===t&&(t={}),t.init=t.init?[n].concat(t.init):n,e.call(this,t)}}function n(){var t=this.$options;t.store?this.$store="function"==typeof t.store?t.store():t.store:t.parent&&t.parent.$store&&(this.$store=t.parent.$store)}}(r=t)}c.state.get=function(){return this._vm._data.$$state},c.state.set=function(t){},a.prototype.commit=function(t,e,n){var o=this,i=d(t,e,n),r=i.type,s=i.payload,a={type:r,payload:s},c=this._mutations[r];c&&(this._withCommit(function(){c.forEach(function(t){t(s)})}),this._subscribers.slice().forEach(function(t){return t(a,o.state)}))},a.prototype.dispatch=function(t,e){var n=this,o=d(t,e),i=o.type,r=o.payload,s={type:i,payload:r},a=this._actions[i];if(a){try{this._actionSubscribers.slice().filter(function(t){return t.before}).forEach(function(t){return t.before(s,n.state)})}catch(t){}return(a.length>1?Promise.all(a.map(function(t){return t(r)})):a[0](r)).then(function(t){try{n._actionSubscribers.filter(function(t){return t.after}).forEach(function(t){return t.after(s,n.state)})}catch(t){}return t})}},a.prototype.subscribe=function(t){return u(t,this._subscribers)},a.prototype.subscribeAction=function(t){return u("function"==typeof t?{before:t}:t,this._actionSubscribers)},a.prototype.watch=function(t,e,n){var o=this;return this._watcherVM.$watch(function(){return t(o.state,o.getters)},e,n)},a.prototype.replaceState=function(t){var e=this;this._withCommit(function(){e._vm._data.$$state=t})},a.prototype.registerModule=function(t,e,n){void 0===n&&(n={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),p(this,this.state,t,this._modules.get(t),n.preserveState),h(this,this.state)},a.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit(function(){var n=l(e.state,t.slice(0,-1));r.delete(n,t[t.length-1])}),f(this)},a.prototype.hotUpdate=function(t){this._modules.update(t),f(this,!0)},a.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(a.prototype,c);var v=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){var e=this.$store.state,n=this.$store.getters;if(t){var o=$(this.$store,"mapState",t);if(!o)return;e=o.context.state,n=o.context.getters}return"function"==typeof i?i.call(this,e,n):e[i]},n[o].vuex=!0}),n}),_=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.commit;if(t){var r=$(this.$store,"mapMutations",t);if(!r)return;o=r.context.commit}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n}),y=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;i=t+i,n[o]=function(){if(!t||$(this.$store,"mapGetters",t))return this.$store.getters[i]},n[o].vuex=!0}),n}),g=w(function(t,e){var n={};return b(e).forEach(function(e){var o=e.key,i=e.val;n[o]=function(){for(var e=[],n=arguments.length;n--;)e[n]=arguments[n];var o=this.$store.dispatch;if(t){var r=$(this.$store,"mapActions",t);if(!r)return;o=r.context.dispatch}return"function"==typeof i?i.apply(this,[o].concat(e)):o.apply(this.$store,[i].concat(e))}}),n});function b(t){return function(t){return Array.isArray(t)||n(t)}(t)?Array.isArray(t)?t.map(function(t){return{key:t,val:t}}):Object.keys(t).map(function(e){return{key:e,val:t[e]}}):[]}function w(t){return function(e,n){return"string"!=typeof e?(n=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,n)}}function $(t,e,n){return t._modulesNamespaceMap[n]}return{Store:a,install:m,version:"3.1.3",mapState:v,mapMutations:_,mapGetters:y,mapActions:g,createNamespacedHelpers:function(t){return{mapState:v.bind(null,t),mapGetters:y.bind(null,t),mapMutations:_.bind(null,t),mapActions:g.bind(null,t)}}}}); \ No newline at end of file From 3a79b6d2a7507adacc6d683d5d0bcd138edfdf44 Mon Sep 17 00:00:00 2001 From: ktsn Date: Mon, 9 Mar 2020 21:04:58 +0800 Subject: [PATCH 064/280] [release] 3.1.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d990afe16..8d481a8a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vuex", - "version": "3.1.2", + "version": "3.1.3", "description": "state management for Vue.js", "main": "dist/vuex.common.js", "module": "dist/vuex.esm.js", From 4d7f3908df2e53da72c99c6c4fd89abcd101837f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barth=C3=A9l=C3=A9my=20Ledoux?= Date: Wed, 11 Mar 2020 05:05:10 -0500 Subject: [PATCH 065/280] docs: make obvious where the store come from (#1687) * docs: make obvious where to import store from As we browse through the modules page, it is unclear where the `store` is imported from. Since it is a one liner, I thought it would clarify to have the import explicitly here. Tell me what you think. * docs: import vuex instead of store Co-Authored-By: Katashin Co-authored-by: Katashin --- docs/guide/modules.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/guide/modules.md b/docs/guide/modules.md index 5630c8f6e..5723b4060 100644 --- a/docs/guide/modules.md +++ b/docs/guide/modules.md @@ -280,6 +280,10 @@ export function createPlugin (options = {}) { You can register a module **after** the store has been created with the `store.registerModule` method: ``` js +import Vuex from 'vuex' + +const store = new Vuex.Store({ /* options */ }) + // register a module `myModule` store.registerModule('myModule', { // ... From 6416ebb1e7822d52884824a4f54413b5a2e28647 Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Sun, 15 Mar 2020 17:37:23 +0900 Subject: [PATCH 066/280] feat!: add vue 3 support BREAKING CHANGE: - It only works with Vue 3. - The installation process has been changed due to aligning with Vue 3's new initiation process. --- .circleci/config.yml | 40 +- README.md | 67 +- build/build.main.js | 2 + examples/chat/app.js | 19 - examples/{ => classic}/chat/api/index.js | 0 examples/{ => classic}/chat/api/mock-data.js | 0 examples/classic/chat/app.js | 13 + .../{ => classic}/chat/components/App.vue | 0 .../{ => classic}/chat/components/Message.vue | 7 +- .../chat/components/MessageSection.vue | 0 .../{ => classic}/chat/components/Thread.vue | 9 +- .../chat/components/ThreadSection.vue | 0 examples/{ => classic}/chat/css/chat.css | 0 examples/{ => classic}/chat/index.html | 2 +- examples/{ => classic}/chat/store/actions.js | 0 examples/{ => classic}/chat/store/getters.js | 0 examples/{ => classic}/chat/store/index.js | 9 +- .../{ => classic}/chat/store/mutations.js | 22 +- .../counter-hot/CounterControls.vue | 0 examples/classic/counter-hot/app.js | 9 + .../counter-hot}/index.html | 2 +- .../counter-hot/store/actions.js | 0 .../counter-hot/store/getters.js | 0 .../{ => classic}/counter-hot/store/index.js | 7 +- .../counter-hot/store/mutations.js | 0 examples/{ => classic}/counter/Counter.vue | 0 examples/classic/counter/app.js | 10 + .../counter}/index.html | 2 +- examples/{ => classic}/counter/store.js | 7 +- .../{ => classic}/shopping-cart/api/shop.js | 0 examples/{ => classic}/shopping-cart/app.js | 14 +- .../shopping-cart/components/App.vue | 0 .../shopping-cart/components/ProductList.vue | 12 +- .../shopping-cart/components/ShoppingCart.vue | 6 +- .../{ => classic}/shopping-cart/currency.js | 0 .../{ => classic}/shopping-cart/index.html | 2 +- .../shopping-cart/store/index.js | 9 +- .../shopping-cart/store/modules/cart.js | 0 .../shopping-cart/store/modules/products.js | 0 examples/classic/todomvc/app.js | 9 + .../{ => classic}/todomvc/components/App.vue | 14 +- .../todomvc/components/TodoItem.vue | 10 +- examples/{ => classic}/todomvc/index.html | 2 +- .../{ => classic}/todomvc/store/actions.js | 0 examples/{ => classic}/todomvc/store/index.js | 7 +- .../{ => classic}/todomvc/store/mutations.js | 2 +- .../{ => classic}/todomvc/store/plugins.js | 2 +- examples/composition/chat/api/index.js | 24 + examples/composition/chat/api/mock-data.js | 58 + examples/composition/chat/app.js | 13 + examples/composition/chat/components/App.vue | 21 + .../composition/chat/components/Message.vue | 23 + .../chat/components/MessageSection.vue | 63 + .../composition/chat/components/Thread.vue | 29 + .../chat/components/ThreadSection.vue | 39 + examples/composition/chat/css/chat.css | 98 ++ examples/composition/chat/index.html | 13 + examples/composition/chat/store/actions.js | 17 + examples/composition/chat/store/getters.js | 25 + examples/composition/chat/store/index.js | 42 + examples/composition/chat/store/mutations.js | 64 + .../counter-hot/CounterControls.vue | 32 + examples/composition/counter-hot/app.js | 9 + examples/composition/counter-hot/index.html | 13 + .../composition/counter-hot/store/actions.js | 18 + .../composition/counter-hot/store/getters.js | 15 + .../composition/counter-hot/store/index.js | 33 + .../counter-hot/store/mutations.js | 9 + examples/composition/counter/Counter.vue | 35 + examples/composition/counter/app.js | 10 + examples/composition/counter/index.html | 13 + examples/composition/counter/store.js | 55 + .../composition/shopping-cart/api/shop.js | 23 + examples/composition/shopping-cart/app.js | 13 + .../shopping-cart/components/App.vue | 19 + .../shopping-cart/components/ProductList.vue | 48 + .../shopping-cart/components/ShoppingCart.vue | 42 + .../composition/shopping-cart/currency.js | 23 + examples/composition/shopping-cart/index.html | 13 + .../composition/shopping-cart/store/index.js | 15 + .../shopping-cart/store/modules/cart.js | 92 ++ .../shopping-cart/store/modules/products.js | 38 + examples/composition/todomvc/app.js | 9 + .../composition/todomvc/components/App.vue | 103 ++ .../todomvc/components/TodoItem.vue | 68 + examples/composition/todomvc/index.html | 12 + examples/composition/todomvc/store/actions.js | 33 + examples/composition/todomvc/store/index.js | 13 + .../composition/todomvc/store/mutations.js | 26 + examples/composition/todomvc/store/plugins.js | 12 + examples/counter-hot/app.js | 9 - examples/counter/app.js | 10 - examples/index.html | 23 +- examples/server.js | 4 + examples/todomvc/app.js | 10 - examples/webpack.config.js | 23 +- package.json | 11 +- src/index.esm.js | 11 +- src/index.js | 8 +- src/injectKey.js | 7 + src/mixin.js | 43 +- src/store.js | 96 +- test/e2e/specs/cart.js | 61 +- test/e2e/specs/chat.js | 57 +- test/e2e/specs/counter.js | 47 +- test/e2e/specs/todomvc.js | 322 ++--- test/unit/helpers.spec.js | 1160 ++++++++--------- test/unit/hot-reload.spec.js | 106 +- test/unit/modules.spec.js | 6 +- test/unit/setup.js | 4 - test/unit/store.spec.js | 51 +- yarn.lock | 156 ++- 112 files changed, 2772 insertions(+), 1142 deletions(-) delete mode 100644 examples/chat/app.js rename examples/{ => classic}/chat/api/index.js (100%) rename examples/{ => classic}/chat/api/mock-data.js (100%) create mode 100644 examples/classic/chat/app.js rename examples/{ => classic}/chat/components/App.vue (100%) rename examples/{ => classic}/chat/components/Message.vue (71%) rename examples/{ => classic}/chat/components/MessageSection.vue (100%) rename examples/{ => classic}/chat/components/Thread.vue (71%) rename examples/{ => classic}/chat/components/ThreadSection.vue (100%) rename examples/{ => classic}/chat/css/chat.css (100%) rename examples/{ => classic}/chat/index.html (85%) rename examples/{ => classic}/chat/store/actions.js (100%) rename examples/{ => classic}/chat/store/getters.js (100%) rename examples/{ => classic}/chat/store/index.js (78%) rename examples/{ => classic}/chat/store/mutations.js (87%) rename examples/{ => classic}/counter-hot/CounterControls.vue (100%) create mode 100644 examples/classic/counter-hot/app.js rename examples/{counter => classic/counter-hot}/index.html (81%) rename examples/{ => classic}/counter-hot/store/actions.js (100%) rename examples/{ => classic}/counter-hot/store/getters.js (100%) rename examples/{ => classic}/counter-hot/store/index.js (84%) rename examples/{ => classic}/counter-hot/store/mutations.js (100%) rename examples/{ => classic}/counter/Counter.vue (100%) create mode 100644 examples/classic/counter/app.js rename examples/{counter-hot => classic/counter}/index.html (82%) rename examples/{ => classic}/counter/store.js (92%) rename examples/{ => classic}/shopping-cart/api/shop.js (100%) rename examples/{ => classic}/shopping-cart/app.js (50%) rename examples/{ => classic}/shopping-cart/components/App.vue (100%) rename examples/{ => classic}/shopping-cart/components/ProductList.vue (71%) rename examples/{ => classic}/shopping-cart/components/ShoppingCart.vue (81%) rename examples/{ => classic}/shopping-cart/currency.js (100%) rename examples/{ => classic}/shopping-cart/index.html (81%) rename examples/{ => classic}/shopping-cart/store/index.js (61%) rename examples/{ => classic}/shopping-cart/store/modules/cart.js (100%) rename examples/{ => classic}/shopping-cart/store/modules/products.js (100%) create mode 100644 examples/classic/todomvc/app.js rename examples/{ => classic}/todomvc/components/App.vue (89%) rename examples/{ => classic}/todomvc/components/TodoItem.vue (85%) rename examples/{ => classic}/todomvc/index.html (79%) rename examples/{ => classic}/todomvc/store/actions.js (100%) rename examples/{ => classic}/todomvc/store/index.js (72%) rename examples/{ => classic}/todomvc/store/mutations.js (89%) rename examples/{ => classic}/todomvc/store/plugins.js (84%) create mode 100644 examples/composition/chat/api/index.js create mode 100644 examples/composition/chat/api/mock-data.js create mode 100644 examples/composition/chat/app.js create mode 100644 examples/composition/chat/components/App.vue create mode 100644 examples/composition/chat/components/Message.vue create mode 100644 examples/composition/chat/components/MessageSection.vue create mode 100644 examples/composition/chat/components/Thread.vue create mode 100644 examples/composition/chat/components/ThreadSection.vue create mode 100644 examples/composition/chat/css/chat.css create mode 100644 examples/composition/chat/index.html create mode 100644 examples/composition/chat/store/actions.js create mode 100644 examples/composition/chat/store/getters.js create mode 100644 examples/composition/chat/store/index.js create mode 100644 examples/composition/chat/store/mutations.js create mode 100644 examples/composition/counter-hot/CounterControls.vue create mode 100644 examples/composition/counter-hot/app.js create mode 100644 examples/composition/counter-hot/index.html create mode 100644 examples/composition/counter-hot/store/actions.js create mode 100644 examples/composition/counter-hot/store/getters.js create mode 100644 examples/composition/counter-hot/store/index.js create mode 100644 examples/composition/counter-hot/store/mutations.js create mode 100644 examples/composition/counter/Counter.vue create mode 100644 examples/composition/counter/app.js create mode 100644 examples/composition/counter/index.html create mode 100644 examples/composition/counter/store.js create mode 100644 examples/composition/shopping-cart/api/shop.js create mode 100644 examples/composition/shopping-cart/app.js create mode 100644 examples/composition/shopping-cart/components/App.vue create mode 100644 examples/composition/shopping-cart/components/ProductList.vue create mode 100644 examples/composition/shopping-cart/components/ShoppingCart.vue create mode 100644 examples/composition/shopping-cart/currency.js create mode 100644 examples/composition/shopping-cart/index.html create mode 100644 examples/composition/shopping-cart/store/index.js create mode 100644 examples/composition/shopping-cart/store/modules/cart.js create mode 100644 examples/composition/shopping-cart/store/modules/products.js create mode 100644 examples/composition/todomvc/app.js create mode 100644 examples/composition/todomvc/components/App.vue create mode 100644 examples/composition/todomvc/components/TodoItem.vue create mode 100644 examples/composition/todomvc/index.html create mode 100644 examples/composition/todomvc/store/actions.js create mode 100644 examples/composition/todomvc/store/index.js create mode 100644 examples/composition/todomvc/store/mutations.js create mode 100644 examples/composition/todomvc/store/plugins.js delete mode 100644 examples/counter-hot/app.js delete mode 100644 examples/counter/app.js delete mode 100644 examples/todomvc/app.js create mode 100644 src/injectKey.js diff --git a/.circleci/config.yml b/.circleci/config.yml index cb7d199ff..c12856e77 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,23 +27,23 @@ jobs: paths: - vuex - lint-types: - <<: *defaults - steps: - - attach_workspace: - at: ~/ - - run: - name: Linting - command: | - yarn lint --format junit --output-file test-results/eslint/results.xml - - run: - name: Testing Types - command: | - yarn test:types - - store_test_results: - path: test-results - - store_artifacts: - path: test-results + # lint-types: + # <<: *defaults + # steps: + # - attach_workspace: + # at: ~/ + # - run: + # name: Linting + # command: | + # yarn lint --format junit --output-file test-results/eslint/results.xml + # - run: + # name: Testing Types + # command: | + # yarn test:types + # - store_test_results: + # path: test-results + # - store_artifacts: + # path: test-results test-unit: <<: *defaults @@ -80,9 +80,9 @@ workflows: install-and-parallel-test: jobs: - install - - lint-types: - requires: - - install + # - lint-types: + # requires: + # - install - test-unit: requires: - install diff --git a/README.md b/README.md index e43391e6b..bef0e0f5b 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,58 @@ -# Vuex [![Build Status](https://circleci.com/gh/vuejs/vuex/tree/dev.png?style=shield)](https://circleci.com/gh/vuejs/vuex) +# Vuex 4 -> Centralized State Management for Vue.js. +This is the Vue 3 compatible version of Vuex. The focus is compatibility, and it provides the exact same API as Vuex 3, so users can reuse their existing Vuex code for Vue 3. -

- -

+## Status: Alpha -- [What is Vuex?](https://vuex.vuejs.org/) -- [Full Documentation](http://vuex.vuejs.org/) +All Vuex 3 feature works. There are a few breaking changes described in a later section, so please check them out. You can find basic usage with both option and composition API at `example` folder. -## Examples +Please note that it's still unstable, and there might be bugs. Please provide us feedback if you find anything. You may use [vue-next-webpack-preview](https://github.com/vuejs/vue-next-webpack-preview) to test out Vue 3 with Vuex 4. -- [Counter](https://github.com/vuejs/vuex/tree/dev/examples/counter) -- [Counter with Hot Reload](https://github.com/vuejs/vuex/tree/dev/examples/counter-hot) -- [TodoMVC](https://github.com/vuejs/vuex/tree/dev/examples/todomvc) -- [Flux Chat](https://github.com/vuejs/vuex/tree/dev/examples/chat) -- [Shopping Cart](https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart) +## Breaking changes -Running the examples: +### Installation process has changed -``` bash -$ npm install -$ npm run dev # serve examples at localhost:8080 +To align with the new Vue 3 initialization process, the installation process of Vuex has changed as well. + +You should use a new `createStore` function to create a new store instance. + +```js +import { createStore } from 'vuex' + +const store = createStore({ + state () { + return { + count: 1 + } + } +}) +``` + +> This is technically not a breaking change because you could still use `new Store(...)` syntax. However, to align with Vue 3 and also with Vue Router Next, we recommend users to use `createStore` function instead. + +Then to install Vuex to Vue app instance, pass the store instance instead of Vuex. + +```js +import { createApp } from 'vue' +import store from './store' +import App from './APP.vue' + +const app = createApp(Counter) + +app.use(store) + +app.mount('#app') ``` -## License +## Kown issues + +- The code is kept as close to Vuex 3 code base as possible, and there're plenty of places where we should refactor. However, we are waiting for all of the test cases to pass before doing so (some tests require Vue 3 update). +- TypeScript support is not ready yet. Please use JS environment to test this for now. + +## TODOs as of 4.0.0-alpha.1 -[MIT](http://opensource.org/licenses/MIT) +- Add TypeScript support +- Make all unit test working +- Refactor the codebase +- Update the build system to align with Vue 3 +- Update docs diff --git a/build/build.main.js b/build/build.main.js index 7f6e4e7ec..d433f000d 100644 --- a/build/build.main.js +++ b/build/build.main.js @@ -27,6 +27,8 @@ function build (builds) { } function buildEntry ({ input, output }) { + input.external = ['vue'] + output.globals = { vue: 'Vue' } const { file, banner } = output const isProd = /min\.js$/.test(file) return rollup.rollup(input) diff --git a/examples/chat/app.js b/examples/chat/app.js deleted file mode 100644 index 75081c2b1..000000000 --- a/examples/chat/app.js +++ /dev/null @@ -1,19 +0,0 @@ -import 'babel-polyfill' -import Vue from 'vue' -import App from './components/App.vue' -import store from './store' -import { getAllMessages } from './store/actions' - -Vue.config.debug = true - -Vue.filter('time', timestamp => { - return new Date(timestamp).toLocaleTimeString() -}) - -new Vue({ - el: '#app', - store, - render: h => h(App) -}) - -getAllMessages(store) diff --git a/examples/chat/api/index.js b/examples/classic/chat/api/index.js similarity index 100% rename from examples/chat/api/index.js rename to examples/classic/chat/api/index.js diff --git a/examples/chat/api/mock-data.js b/examples/classic/chat/api/mock-data.js similarity index 100% rename from examples/chat/api/mock-data.js rename to examples/classic/chat/api/mock-data.js diff --git a/examples/classic/chat/app.js b/examples/classic/chat/app.js new file mode 100644 index 000000000..6a8128b67 --- /dev/null +++ b/examples/classic/chat/app.js @@ -0,0 +1,13 @@ +import 'babel-polyfill' +import { createApp } from 'vue' +import App from './components/App.vue' +import store from './store' +import { getAllMessages } from './store/actions' + +const app = createApp(App) + +app.use(store) + +app.mount('#app') + +getAllMessages(store) diff --git a/examples/chat/components/App.vue b/examples/classic/chat/components/App.vue similarity index 100% rename from examples/chat/components/App.vue rename to examples/classic/chat/components/App.vue diff --git a/examples/chat/components/Message.vue b/examples/classic/chat/components/Message.vue similarity index 71% rename from examples/chat/components/Message.vue rename to examples/classic/chat/components/Message.vue index db78157c0..0c1f2e92c 100644 --- a/examples/chat/components/Message.vue +++ b/examples/classic/chat/components/Message.vue @@ -2,7 +2,7 @@
  • {{ message.authorName }}
    - {{ message.timestamp | time }} + {{ time(message.timestamp) }}
    {{ message.text }}
  • @@ -13,6 +13,11 @@ export default { name: 'Message', props: { message: Object + }, + methods: { + time (value) { + return new Date(value).toLocaleTimeString() + } } } diff --git a/examples/chat/components/MessageSection.vue b/examples/classic/chat/components/MessageSection.vue similarity index 100% rename from examples/chat/components/MessageSection.vue rename to examples/classic/chat/components/MessageSection.vue diff --git a/examples/chat/components/Thread.vue b/examples/classic/chat/components/Thread.vue similarity index 71% rename from examples/chat/components/Thread.vue rename to examples/classic/chat/components/Thread.vue index 3794241ce..af5359515 100644 --- a/examples/chat/components/Thread.vue +++ b/examples/classic/chat/components/Thread.vue @@ -1,11 +1,11 @@