profile
viewpoint
Kia King Ishii kiaking @globalbrain Kanagawa, Japan The optimist web designer/developer. @vuejs core team. Author of @vuex-orm. Tech Talent at @globalbrain.

globalbrain/sefirot 70

Vue Components for Global Brain Design System.

vuejs-jp/art 7

Vue.js 日本ユーザーグループによるロゴなどのアートワーク。

kiaking/kiaking.github.io 5

Official blog site of Kia King Ishii

kiaking/laravel-locale 4

Cachable multi-locale routing and URL generating helper for Laravel 5.

kiaking/vitepress-playground 2

VitePress playground for VitePress development.

kiaking/vuex3-on-vue3 2

Minimal setup for building Vuex 3 on Vue 3.

vuex-orm/vuex-orm-playground 2

Vue CLI based template for playing around with Vuex ORM.

kiaking/relight 1

The script that builds the Vagrant box for Phoenix application development environment.

kiaking/code-guide 0

柔軟で、恒久的であり、持続性のあるHTMLとCSSの標準。

kiaking/config 0

Configuration of my fundamentals.

push eventvuejs/vuex

Alexander Sokolov

commit sha b956a695d3b159d947c0ef7308345ab2df24290f

docs(ru): translation update (#1810) * plugins.md update * api.md update * api.md udpate * hot-reload.md update * docs: (ru) modules.md update * docs: (ru) plugins.md update * docs: (ru) modules.md update Co-authored-by: Alex Sokolov <4497128+Alex-Sokolov@users.noreply.github.com>

view details

push time in 7 hours

PR merged vuejs/vuex

docs: [RU] Translation update docs
+28 -3

1 comment

2 changed files

Alex-Sokolov

pr closed time in 7 hours

pull request commentvuejs/vuex

docs: [RU] Translation update

Thanks as always!

Alex-Sokolov

comment created time in 7 hours

push eventvuejs/vuex

Eduard Aksamitov

commit sha 657afe3db42c8d1d721216955fc2be3132e9fe6c

fix(types): add lost argument of useStore (#1803)

view details

push time in 7 hours

PR merged vuejs/vuex

fix(types): add lost argument of useStore typescript

This PR adds lost argument key to useStore function types. Resolve #1807

+11 -2

2 comments

2 changed files

euaaaio

pr closed time in 7 hours

push eventvuejs/vuex

dependabot[bot]

commit sha f3acba5dad6ce52ec84c019ea8d04a3af8f1b55f

build(deps): bump prismjs from 1.15.0 to 1.21.0 (#1809) Bumps [prismjs](https://github.com/PrismJS/prism) from 1.15.0 to 1.21.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](https://github.com/PrismJS/prism/compare/v1.15.0...v1.21.0) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 7 hours

delete branch vuejs/vuex

delete branch : dependabot/npm_and_yarn/prismjs-1.21.0

delete time in 7 hours

PR merged vuejs/vuex

build(deps): bump prismjs from 1.15.0 to 1.21.0 dependencies

Bumps prismjs from 1.15.0 to 1.21.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/PrismJS/prism/releases">prismjs's releases</a>.</em></p> <blockquote> <h2>v1.21.0</h2> <p>Release 1.21.0</p> <h2>v1.20.0</h2> <p>Release 1.20.0</p> <h2>v1.19.0</h2> <p>Release 1.19.0</p> <h2>v1.18.0</h2> <p>Release 1.18.0</p> <h2>v1.17.1</h2> <p>Release 1.17.1</p> <h2>v1.17.0</h2> <p>Release 1.17.0</p> <h2>v1.16.0</h2> <p>Release 1.16.0</p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/PrismJS/prism/blob/master/CHANGELOG.md">prismjs's changelog</a>.</em></p> <blockquote> <h2>1.21.0 (2020-08-06)</h2> <h3>New components</h3> <ul> <li><strong>.ignore</strong> & <strong>.gitignore</strong> & <strong>.hgignore</strong> & <strong>.npmignore</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2481">#2481</a>) <a href="https://github.com/PrismJS/prism/commit/3fcce6fe"><code>3fcce6fe</code></a></li> <li><strong>Agda</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2430">#2430</a>) <a href="https://github.com/PrismJS/prism/commit/3a127c7d"><code>3a127c7d</code></a></li> <li><strong>AL</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2300">#2300</a>) <a href="https://github.com/PrismJS/prism/commit/de21eb64"><code>de21eb64</code></a></li> <li><strong>Cypher</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2459">#2459</a>) <a href="https://github.com/PrismJS/prism/commit/398e2943"><code>398e2943</code></a></li> <li><strong>Dhall</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2473">#2473</a>) <a href="https://github.com/PrismJS/prism/commit/649e51e5"><code>649e51e5</code></a></li> <li><strong>EditorConfig</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2471">#2471</a>) <a href="https://github.com/PrismJS/prism/commit/ed8fff91"><code>ed8fff91</code></a></li> <li><strong>HLSL</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2318">#2318</a>) <a href="https://github.com/PrismJS/prism/commit/87a5c7ae"><code>87a5c7ae</code></a></li> <li><strong>JS stack trace</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2418">#2418</a>) <a href="https://github.com/PrismJS/prism/commit/ae0327b3"><code>ae0327b3</code></a></li> <li><strong>PeopleCode</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2302">#2302</a>) <a href="https://github.com/PrismJS/prism/commit/bd4d8165"><code>bd4d8165</code></a></li> <li><strong>PureBasic</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2369">#2369</a>) <a href="https://github.com/PrismJS/prism/commit/d0c1c70d"><code>d0c1c70d</code></a></li> <li><strong>Racket</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2315">#2315</a>) <a href="https://github.com/PrismJS/prism/commit/053016ef"><code>053016ef</code></a></li> <li><strong>Smali</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2419">#2419</a>) <a href="https://github.com/PrismJS/prism/commit/22eb5cad"><code>22eb5cad</code></a></li> <li><strong>Structured Text (IEC 61131-3)</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2311">#2311</a>) <a href="https://github.com/PrismJS/prism/commit/8704cdfb"><code>8704cdfb</code></a></li> <li><strong>UnrealScript</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2305">#2305</a>) <a href="https://github.com/PrismJS/prism/commit/1093ceb3"><code>1093ceb3</code></a></li> <li><strong>WarpScript</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2307">#2307</a>) <a href="https://github.com/PrismJS/prism/commit/cde5b0fa"><code>cde5b0fa</code></a></li> <li><strong>XML doc (.net)</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2340">#2340</a>) <a href="https://github.com/PrismJS/prism/commit/caec5e30"><code>caec5e30</code></a></li> <li><strong>YANG</strong> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2467">#2467</a>) <a href="https://github.com/PrismJS/prism/commit/ed1df1e1"><code>ed1df1e1</code></a></li> </ul> <h3>Updated components</h3> <ul> <li>Markup & JSON: Added new aliases (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2390">#2390</a>) <a href="https://github.com/PrismJS/prism/commit/9782cfe6"><code>9782cfe6</code></a></li> <li>Fixed several cases of exponential backtracking (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2268">#2268</a>) <a href="https://github.com/PrismJS/prism/commit/7a554b5f"><code>7a554b5f</code></a></li> <li><strong>APL</strong> <ul> <li>Added <code>⍥</code> (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2409">#2409</a>) <a href="https://github.com/PrismJS/prism/commit/0255cb6a"><code>0255cb6a</code></a></li> </ul> </li> <li><strong>AutoHotkey</strong> <ul> <li>Added missing <code>format</code> built-in (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2450">#2450</a>) <a href="https://github.com/PrismJS/prism/commit/7c66cfc4"><code>7c66cfc4</code></a></li> <li>Improved comments and other improvements (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2412">#2412</a>) <a href="https://github.com/PrismJS/prism/commit/ddf3cc62"><code>ddf3cc62</code></a></li> <li>Added missing definitions (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2400">#2400</a>) <a href="https://github.com/PrismJS/prism/commit/4fe03676"><code>4fe03676</code></a></li> </ul> </li> <li><strong>Bash</strong> <ul> <li>Added <code>composer</code> command (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2298">#2298</a>) <a href="https://github.com/PrismJS/prism/commit/044dd271"><code>044dd271</code></a></li> </ul> </li> <li><strong>Batch</strong> <ul> <li>Fix escaped double quote (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2485">#2485</a>) <a href="https://github.com/PrismJS/prism/commit/f0f8210c"><code>f0f8210c</code></a></li> </ul> </li> <li><strong>C</strong> <ul> <li>Improved macros and expressions (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2440">#2440</a>) <a href="https://github.com/PrismJS/prism/commit/8a72fa6f"><code>8a72fa6f</code></a></li> <li>Improved macros (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2320">#2320</a>) <a href="https://github.com/PrismJS/prism/commit/fdcf7ed2"><code>fdcf7ed2</code></a></li> </ul> </li> <li><strong>C#</strong> <ul> <li>Improved pattern matching (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2411">#2411</a>) <a href="https://github.com/PrismJS/prism/commit/7f341fc1"><code>7f341fc1</code></a></li> <li>Fixed adjacent string interpolations (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2402">#2402</a>) <a href="https://github.com/PrismJS/prism/commit/2a2e79ed"><code>2a2e79ed</code></a></li> </ul> </li> <li><strong>C++</strong> <ul> <li>Added support for default comparison operator (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2426">#2426</a>) <a href="https://github.com/PrismJS/prism/commit/8e9d161c"><code>8e9d161c</code></a></li> <li>Improved class name detection (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2348">#2348</a>) <a href="https://github.com/PrismJS/prism/commit/e3fe9040"><code>e3fe9040</code></a></li> <li>Fixed <code>enum class</code> class names (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2342">#2342</a>) <a href="https://github.com/PrismJS/prism/commit/30b4e254"><code>30b4e254</code></a></li> </ul> </li> <li><strong>Content-Security-Policy</strong> <ul> <li>Fixed directives (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2461">#2461</a>) <a href="https://github.com/PrismJS/prism/commit/537a9e80"><code>537a9e80</code></a></li> </ul> </li> <li><strong>CSS</strong> <ul> <li>Improved url and added keywords (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2432">#2432</a>) <a href="https://github.com/PrismJS/prism/commit/964de5a1"><code>964de5a1</code></a></li> </ul> </li> </ul> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/PrismJS/prism/commit/187c8a607ee70c7914682870156faa31ed01f001"><code>187c8a6</code></a> 1.21.0</li> <li><a href="https://github.com/PrismJS/prism/commit/bf4f323391d546d4b2e1a388f05c512a27491e9c"><code>bf4f323</code></a> Changelog for v1.21.0 (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2507">#2507</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/8bba4880202ef6bd7a1e379fe9aebe69dd75f7be"><code>8bba488</code></a> Previewers: Fixed XSS (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2506">#2506</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/158caf52343e59a66c2351ff1d83648efe871e33"><code>158caf5</code></a> JSON: Greedy comments (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2479">#2479</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/f0f8210c1a9745c064d49bfb985544c654986b24"><code>f0f8210</code></a> Batch: Fix escaped double quote (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2485">#2485</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/649e51e56250a81dc0b0c4f5b3a4ea23e1c21834"><code>649e51e</code></a> Added support for Dhall (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2473">#2473</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/453079bf96746e0c44f90cb7cd90fcae9a5f94cc"><code>453079b</code></a> Line Numbers: Fixed class name on website</li> <li><a href="https://github.com/PrismJS/prism/commit/a0efa40bde420ac3923947be611ebe6b3f077dce"><code>a0efa40</code></a> Fixed Treeview page (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2484">#2484</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/78161d607fe7d493831ff19759aac951330134a1"><code>78161d6</code></a> VB: Added VBA alias (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2469">#2469</a>)</li> <li><a href="https://github.com/PrismJS/prism/commit/ed1df1e1208401a8b84330ecc39689fa37d0e9f6"><code>ed1df1e</code></a> Added support for YANG (<a href="https://github-redirect.dependabot.com/PrismJS/prism/issues/2467">#2467</a>)</li> <li>Additional commits viewable in <a href="https://github.com/PrismJS/prism/compare/v1.15.0...v1.21.0">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~jamesdigioia">jamesdigioia</a>, a new releaser for prismjs since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+9 -9

0 comment

1 changed file

dependabot[bot]

pr closed time in 7 hours

push eventvuejs/vuex

Fabian Krutsch

commit sha 1647675c06cf4e1e4cf02eb49ab6d1b04ac878e1

docs: fix minor typo (#1811) Update `plugins.md`.

view details

push time in 7 hours

PR merged vuejs/vuex

docs: fix minor typo docs

fix minor typo in plugins.md

+1 -1

1 comment

1 changed file

Krutsch

pr closed time in 7 hours

pull request commentvuejs/vuex

docs: fix minor typo

Beautiful! Thanks 🙌

Krutsch

comment created time in 7 hours

push eventvuejs/vuex

Kia Ishii

commit sha 05431dcc626a66f358d405f6dffb12753cd26f15

build: update npm packages

view details

push time in 7 days

push eventvuejs/vuex

dependabot[bot]

commit sha 3909af055ad1b09d2581d5925562e369e561938c

build(deps): bump elliptic from 6.4.1 to 6.5.3 (#1806) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

7006

commit sha 4b038d7306462211c4045845637493393915e92f

chore: refactor getters code in example counter-hot (#1801) Rewrite `recentHistory` getter using negative index for`start` argument of `Array.prototype.slice`. Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice

view details

Kia Ishii

commit sha e4df3498a17afca02c780aff46c4486d5284f0a5

docs: upgrade VuePress to the latest version

view details

Kia Ishii

commit sha f0e84a2b5e1466eeb95b47d31848db668720b77b

docs: add more translations

view details

Kia Ishii

commit sha 626abdc9b1a465ec5e17602fd1423db3f6fa1b91

docs: add PR translation for "Advanced"

view details

push time in 7 days

Pull request review commentvuejs/vuex

fix(types): add lost argument of useStore

 export declare class Store<S> {  export function createStore<S>(options: StoreOptions<S>): Store<S>; -export function useStore<S = any>(): Store<S>;+export function useStore<S = any>(injectKey?: InjectionKey<Store<any>> | string): Store<S>;

I think it should be InjectionKey<Store<S>>?

export function useStore<S = any>(injectKey?: InjectionKey<Store<S>> | string): Store<S>;
euaaaio

comment created time in 7 days

pull request commentvuejs/vuex

Support modules and state functions in Store typings

Commit massage should be fine, we can squash and rename it when merging the PR 👍 Though the test code should be added before merging.

But, please let's wait until we get response from Katashin, I would like to make sure this is the right direction we wanna take 🙇

zOadT

comment created time in 7 days

issue commentvuejs/vuex

store watch not triggered when depends on unregistered module

Oh I see, yeah well that makes more sense. Sorry for my misunderstanding. Though, it's because when the state is hydrated, nothing is really changing, hence watch doesn't fire. So again, there's not much we can do here.

Basically, watch was intended to actually watch the current state, and fire things up when ever it changes. This could be one of the downside having dynamic module registration 🤔

matthieusieben

comment created time in 7 days

issue commentvuejs/vuex

Component watch "$store.state.xxx" does not work on v4

Sorry I couldn't find it either. But there is a statement at Vue 3 docs.

Component watch option and instance method $watch no longer supports dot-delimited string paths, use a computed function as the parameter instead

https://v3.vuejs.org/guide/migration/introduction.html#breaking

xPaw

comment created time in 8 days

issue commentvuejs/vuex

Component watch "$store.state.xxx" does not work on v4

Well, yeah, the unwatching part is bit of work but watching part isn't that different I guess. Not much we can do as a Vuex side, since this is Vue's behavior change 🙏

xPaw

comment created time in 8 days

issue closedvuejs/vuex

Component watch "$store.state.xxx" does not work on v4

Version

4.0.0-beta.4

Reproduction link

https://jsfiddle.net/gbach1eu/

Steps to reproduce

I have code like this:

export default {
	name: "Mentions",
	watch: {
		"$store.state.mentions"() {
			this.isLoading = false;
		},
	},
}

And there is a mutation like so:

mentions(state, mentions) {
	state.mentions = mentions;
},

Which is triggered with store.commit("mentions", data);

What is expected?

Watch is triggered.

What is actually happening?

watch for store state change is not triggering. This worked on vue2 (vuex 3).


I don't know if it was intended that watch actually worked on vue 2 like this, and it's hard to find info if this was intentionally changed for vue 3.

<!-- generated by vue-issues. DO NOT REMOVE -->

closed time in 8 days

xPaw

issue commentvuejs/vuex

Component watch "$store.state.xxx" does not work on v4

@xPaw OK indeed the behavior was changed. You must use watch function to do this. So the below should work.

export default {
  data () {
    isLoading: true
  },
  mounted () {
    this.$watch(
      () => $store.state.mentions,
      () => {
        this.isLoading = false;
      }

      this.$store.commit('setMentions')
    )
  }
}
xPaw

comment created time in 8 days

issue closedvuejs/vuex

store watch not triggered when depends on unregistered module

Version

3.5.1

Reproduction link

https://codesandbox.io/s/awesome-wescoff-97l47?file=/src/main.js

<details>

<summary>Code</summary>

import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

// Uncomment one of these lines:
const initialState = '{"foo":{"value":4}}';
// const initialState = "{}";

const modules = {
  foo: {
    namespaced: true,
    getters: { value: state => state.value },
    state: () => ({ value: 1 })
  }
};

const myPlugin = store => {
  store.watch(
    (state, getters) => getters["foo/value"],
    value => console.error("Value from watch", value)
  );
};

const store = new Vuex.Store({
  state: () => JSON.parse(initialState),
  plugins: [myPlugin]
});

for (const ns in modules) {
  store.registerModule(ns, modules[ns], {
    preserveState: store.state[ns] !== undefined
  });
}

console.error("Value after init", store.getters["foo/value"]);

</details>

Notice the watcher's callback is not triggered.

The workaround is to register the watcher after the modules (i.e. not through a plugin)

Steps to reproduce

  • Create a store with
    • a plugin that register a watcher for a module's getter
    • an initial state for the sub module
  • Register the module (will generate a new store.getter object)

What is expected?

The watcher should be triggered when the getter goes from "undefined" (before the module was registered) to "defined" (after the module was registered).

Basically, store.getters should be reactive.

What is actually happening?

The watcher is not trigged

<!-- generated by vue-issues. DO NOT REMOVE -->

closed time in 8 days

matthieusieben

issue commentvuejs/vuex

store watch not triggered when depends on unregistered module

Interesting use case, but this is not supported indeed. To watch to have an effect, you need to have key defined. In your case, the key is not undefined; there is no key in the first place.

We can't really make the whole getters watched, it's like watching entire Vue instance. I would have to suggest you to explicitly call store.watch function after registering the module.

matthieusieben

comment created time in 8 days

pull request commentvuejs/vuex

fix(types): add lost argument of useStore

Thanks for the PR! Yap, this is a defect. However, could you add support for InjectionKey as well as String? Ref: https://composition-api.vuejs.org/api.html#dependency-injection

So It should be I think?

export function useStore<S = any>(key?: InjectionKey<Store<S>> | string): Store<S>;
euaaaio

comment created time in 8 days

push eventvuejs/vuex

ktsn

commit sha 6b0014cada1bfc249c46322810a8256088d83d40

release: v3.5.1

view details

Jupyo Hong

commit sha 0b3a2b01542ad03e6fabddbb502eadc7dae4af99

docs(kr): fix link typo in Korean docs (#1795) Remove duplicated parenthesis of link to "Scrimba" in Korean README markdown file.

view details

Reg Chiu

commit sha 931c8015128de2150b54c6446d93d1da45b5e17b

docs(zh): Remove semicolon

view details

Cue

commit sha 78924456905299ce91f72eb026eaa8cb90d54fc5

Merge pull request #1796 from regchiu/patch-2 docs(zh): removes semicolon from code example

view details

Evan You

commit sha 0e4d97f2e02b64dd6f955685fa368bde4c3dcf8f

chore: bump docs theme

view details

Micha Pietsch

commit sha 0fcc7f47b104cd031fd10bd05b7d808728769ae5

docs: add examples for getters in other namespaced modules (#1800)

view details

dependabot[bot]

commit sha 3909af055ad1b09d2581d5925562e369e561938c

build(deps): bump elliptic from 6.4.1 to 6.5.3 (#1806) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

7006

commit sha 4b038d7306462211c4045845637493393915e92f

chore: refactor getters code in example counter-hot (#1801) Rewrite `recentHistory` getter using negative index for`start` argument of `Array.prototype.slice`. Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice

view details

Kia Ishii

commit sha 2351c2205bfd600010333fc9840ee2a48b411810

Merge branch 'dev' into 4.0 # Conflicts: # CHANGELOG.md # dist/logger.js # dist/vuex.common.js # dist/vuex.esm.browser.js # dist/vuex.esm.browser.min.js # dist/vuex.esm.js # dist/vuex.js # dist/vuex.min.js # package.json # yarn.lock

view details

push time in 8 days

push eventvuejs/vuex

7006

commit sha 4b038d7306462211c4045845637493393915e92f

chore: refactor getters code in example counter-hot (#1801) Rewrite `recentHistory` getter using negative index for`start` argument of `Array.prototype.slice`. Ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice

view details

push time in 8 days

PR merged vuejs/vuex

Update getters.js

rewrite recentHistory getter using negative index forstart argument of Array.prototype.slice

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice

+1 -5

1 comment

1 changed file

7006

pr closed time in 8 days

pull request commentvuejs/vuex

Update getters.js

Thanks for the PR! Nice, yeah this looks much cleaner 👍

7006

comment created time in 8 days

issue commentvuejs/vuex

Component watch "$store.state.xxx" does not work on v4

Thanks for the report! Seems like Vue 3 docs has dropped this syntax, but not sure if this is still supported or not. Trying to finding it.

The comment you mentioned shouldn't be related since that behavior was changed after that discussion.

xPaw

comment created time in 8 days

pull request commentvuejs/vuex

Support modules and state functions in Store typings

Thank you so much for the PR! Yeah this kinda makes sense. It doesn't address the issue of dynamic module registration but seems like it's better than the current where we have to specify whole module tree interface manually.

@ktsn what do you think about this? If we don't find any risk, maybe it's nice to have?

zOadT

comment created time in 8 days

push eventvuejs/vuex

dependabot[bot]

commit sha 3909af055ad1b09d2581d5925562e369e561938c

build(deps): bump elliptic from 6.4.1 to 6.5.3 (#1806) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.4.1 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 8 days

delete branch vuejs/vuex

delete branch : dependabot/npm_and_yarn/elliptic-6.5.3

delete time in 8 days

PR merged vuejs/vuex

build(deps): bump elliptic from 6.4.1 to 6.5.3 dependencies

Bumps elliptic from 6.4.1 to 6.5.3. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indutny/elliptic/commit/8647803dc3d90506aa03021737f7b061ba959ae1"><code>8647803</code></a> 6.5.3</li> <li><a href="https://github.com/indutny/elliptic/commit/856fe4d99fe7b6200556e6400b3bf585b1721bec"><code>856fe4d</code></a> signature: prevent malleability and overflows</li> <li><a href="https://github.com/indutny/elliptic/commit/60489415e545efdfd3010ae74b9726facbf08ca8"><code>6048941</code></a> 6.5.2</li> <li><a href="https://github.com/indutny/elliptic/commit/9984964457c9f8a63b91b01ea103260417eca237"><code>9984964</code></a> package: bump dependencies</li> <li><a href="https://github.com/indutny/elliptic/commit/ec735edde187a43693197f6fa3667ceade751a3a"><code>ec735ed</code></a> utils: leak less information in <code>getNAF()</code></li> <li><a href="https://github.com/indutny/elliptic/commit/71e4e8e2f5b8f0bdbfbe106c72cc9fbc746d3d60"><code>71e4e8e</code></a> 6.5.1</li> <li><a href="https://github.com/indutny/elliptic/commit/7ec66ffa255079260126d87b1762a59ea10de5ea"><code>7ec66ff</code></a> short: add infinity check before multiplying</li> <li><a href="https://github.com/indutny/elliptic/commit/ee7970b92f388e981d694be0436c4c8036b5d36c"><code>ee7970b</code></a> travis: really move on</li> <li><a href="https://github.com/indutny/elliptic/commit/637d0216b58de7edee4f3eb5641295ac323acadb"><code>637d021</code></a> travis: move on</li> <li><a href="https://github.com/indutny/elliptic/commit/5ed0babb6467cd8575a9218265473fda926d9d42"><code>5ed0bab</code></a> package: update deps</li> <li>Additional commits viewable in <a href="https://github.com/indutny/elliptic/compare/v6.4.1...v6.5.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+14 -14

0 comment

1 changed file

dependabot[bot]

pr closed time in 8 days

delete branch vuejs-jp/home

delete branch : dependabot/npm_and_yarn/elliptic-6.5.3

delete time in 8 days

push eventvuejs-jp/home

dependabot[bot]

commit sha e5598f65c5cbc4d7de7fe8ee480693c116a0f2ef

build(deps): bump elliptic from 6.5.2 to 6.5.3 (#56) Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3. - [Release notes](https://github.com/indutny/elliptic/releases) - [Commits](https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 8 days

PR merged vuejs-jp/home

build(deps): bump elliptic from 6.5.2 to 6.5.3 dependencies

Bumps elliptic from 6.5.2 to 6.5.3. <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/indutny/elliptic/commit/8647803dc3d90506aa03021737f7b061ba959ae1"><code>8647803</code></a> 6.5.3</li> <li><a href="https://github.com/indutny/elliptic/commit/856fe4d99fe7b6200556e6400b3bf585b1721bec"><code>856fe4d</code></a> signature: prevent malleability and overflows</li> <li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+6 -6

0 comment

1 changed file

dependabot[bot]

pr closed time in 8 days

push eventvuejs/vuex

Kia Ishii

commit sha ba45730daea86f2bd7cf10faabb116769ae99455

docs: add PR translation for "Advanced"

view details

push time in 8 days

push eventvuejs/vuex

Kia Ishii

commit sha 3342ce7dc634854e74f28bc839c8e1bab3fe0cc5

docs: add more translations

view details

push time in 14 days

PR opened vuejs/vuex

docs: upgrade VuePress to the latest version docs

This PR upgrades VuePress to the latest version. Because of the sidebar styling difference from the current VuePress version, I've added 2 new top level sidebar title, "Introduction" and "Advanced". I hope it makes content structure a bit more organized as well.

Currently I'm gathering translations for the 2 new titles. Once it's done, we can merge this one.

+4265 -5978

0 comment

4 changed files

pr created time in 14 days

create barnchvuejs/vuex

branch : upgrade-vuepress

created branch time in 14 days

push eventvuejs/vuex

Micha Pietsch

commit sha 0fcc7f47b104cd031fd10bd05b7d808728769ae5

docs: add examples for getters in other namespaced modules (#1800)

view details

push time in 14 days

PR merged vuejs/vuex

docs(guide/modules): Add examples for getters in other namespaced modules docs

Hey,

I just found myself looking up the exact syntax, so I'd like to contribute these examples.

Best regards, Micha

+2 -0

1 comment

1 changed file

michapietsch

pr closed time in 14 days

pull request commentvuejs/vuex

docs(guide/modules): Add examples for getters in other namespaced modules

Thanks! Yea this is helpful 👍

michapietsch

comment created time in 14 days

push eventvuejs/vuex-router-sync

Kia Ishii

commit sha 36d2e8e58aadb60b39782c8d7913f825a7d63754

chore: make circle ci badge prettier

view details

push time in 14 days

push eventvuejs/vuex-router-sync

NeverBehave

commit sha 119a831cae1f8eab13d792d39554c479e8aaa6ea

chore: link to README.zh-cn.md (#99)

view details

push time in 14 days

pull request commentvuejs/vuex-router-sync

docs: link to README.zh-cn.md

Oops Thanks for the fix!

NeverBehave

comment created time in 14 days

startedvuejs/docs-next

started time in 15 days

push eventvuex-orm/vuex-orm

Kia Ishii

commit sha ce07139442bdadaa9915472af4ebc346f8f3eb13

deploy

view details

push time in 16 days

push eventvuex-orm/vuex-orm

Kia Ishii

commit sha b5c6f1e619ea3399658c59e1cf2ee64f23a077bb

chore: add a new sponsor

view details

push time in 16 days

Pull request review commentvuejs/vitepress

feat: add multi sidebar support (#38)

 export function isActive(route: Route, path?: string): boolean { export function normalize(path: string): string {   return decodeURI(path).replace(hashRE, '').replace(extRE, '') }++/**+ * get the path without filename (the last segment). for example, if the given+ * path is `/guide/getting-started.html`, this method will return `/guide/`.+ * Always with a trailing slash.+ */+export function resolvePath(path: string): string {

Done 🙌

kiaking

comment created time in 22 days

push eventkiaking/vitepress

Kia Ishii

commit sha 4236877b48de605e9a4bbe2c226357acef777dc1

refactor: rename `resolvePath` to more readable one

view details

push time in 22 days

Pull request review commentvuejs/vitepress

feat: add multi sidebar support (#38)

 export function isActive(route: Route, path?: string): boolean { export function normalize(path: string): string {   return decodeURI(path).replace(hashRE, '').replace(extRE, '') }++/**+ * get the path without filename (the last segment). for example, if the given+ * path is `/guide/getting-started.html`, this method will return `/guide/`.+ * Always with a trailing slash.+ */+export function resolvePath(path: string): string {

Good point! Let me change this one

kiaking

comment created time in 22 days

startedkazupon/api-docs-gen

started time in 23 days

startedantfu/icones

started time in 23 days

delete branch vuejs-jp/home

delete branch : dependabot/npm_and_yarn/lodash-4.17.19

delete time in 23 days

push eventvuejs-jp/home

dependabot[bot]

commit sha d7cf4a164c208da3d8758d0af4fb53342590f081

build(deps): bump lodash from 4.17.15 to 4.17.19 (#55) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

view details

push time in 23 days

PR merged vuejs-jp/home

build(deps): bump lodash from 4.17.15 to 4.17.19 dependencies

Bumps lodash from 4.17.15 to 4.17.19. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/lodash/lodash/releases">lodash's releases</a>.</em></p> <blockquote> <h2>4.17.16</h2> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/lodash/lodash/commit/d7fbc52ee0466a6d248f047b5d5c3e6d1e099056"><code>d7fbc52</code></a> Bump to v4.17.19</li> <li><a href="https://github.com/lodash/lodash/commit/2e1c0f22f425e9c013815b2cd7c2ebd51f49a8d6"><code>2e1c0f2</code></a> Add npm-package</li> <li><a href="https://github.com/lodash/lodash/commit/1b6c282299f4e0271f932b466c67f0f822aa308e"><code>1b6c282</code></a> Bump to v4.17.18</li> <li><a href="https://github.com/lodash/lodash/commit/a370ac81408de2da77a82b3c4b61a01a3b9c2fac"><code>a370ac8</code></a> Bump to v4.17.17</li> <li><a href="https://github.com/lodash/lodash/commit/1144918f3578a84fcc4986da9b806e63a6175cbb"><code>1144918</code></a> Rebuild lodash and docs</li> <li><a href="https://github.com/lodash/lodash/commit/3a3b0fd339c2109563f7e8167dc95265ed82ef3e"><code>3a3b0fd</code></a> Bump to v4.17.16</li> <li><a href="https://github.com/lodash/lodash/commit/c84fe82760fb2d3e03a63379b297a1cc1a2fce12"><code>c84fe82</code></a> fix(zipObjectDeep): prototype pollution (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4759">#4759</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/e7b28ea6cb17b4ca021e7c9d66218c8c89782f32"><code>e7b28ea</code></a> Sanitize sourceURL so it cannot affect evaled code (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4518">#4518</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/0cec225778d4ac26c2bac95031ecc92a94f08bbb"><code>0cec225</code></a> Fix lodash.isEqual for circular references (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4320">#4320</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4515">#4515</a>)</li> <li><a href="https://github.com/lodash/lodash/commit/94c3a8133cb4fcdb50db72b4fd14dd884b195cd5"><code>94c3a81</code></a> Document matches* shorthands for over* methods (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4510">#4510</a>) (<a href="https://github-redirect.dependabot.com/lodash/lodash/issues/4514">#4514</a>)</li> <li>Additional commits viewable in <a href="https://github.com/lodash/lodash/compare/4.17.15...4.17.19">compare view</a></li> </ul> </details> <details> <summary>Maintainer changes</summary> <p>This version was pushed to npm by <a href="https://www.npmjs.com/~mathias">mathias</a>, a new releaser for lodash since your current version.</p> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -3

0 comment

1 changed file

dependabot[bot]

pr closed time in 23 days

startedantfu/vue-demi

started time in a month

push eventvuejs/vuex

Jupyo Hong

commit sha 0b3a2b01542ad03e6fabddbb502eadc7dae4af99

docs(kr): fix link typo in Korean docs (#1795) Remove duplicated parenthesis of link to "Scrimba" in Korean README markdown file.

view details

push time in a month

PR merged vuejs/vuex

docs: fix link typo in Korean README docs

Remove duplicated parenthesis of link to "Scrimba" in Korean README markdown file.

+1 -1

1 comment

1 changed file

ohdnf

pr closed time in a month

pull request commentvuejs/vuex

docs: fix link typo in Korean README

Thank you so much! Good spot 👍

ohdnf

comment created time in a month

issue closedvuejs/vuex

Calls to mutations and actions don't get cancelled when a module is unregistered using `unregisterModule`

Version

3.4.0

Reproduction link

https://codesandbox.io/s/mutation-call-after-unregistermodule-v4n3z

Steps to reproduce

  1. Make sure the first page you see is the Home page.
  2. Click on Contact button and immediately click on Home
  3. Observe the Console.

What is expected?

No errors. When the module is unregistered, any running action or mutation calls should also be cancelled.

What is actually happening?

The action/mutation code keeps executing and user sees errors in the Console stating that the module does not exist. [vuex] unknown local mutation type: setContact, global type: contact/setContact


There are 2 components: Home.vue and Contact.vue. Contact.vue calls an action in it's mounted callback. The action changeContact mimics the behaviour of an API call and commits a mutation after a delay of 1 second.

What I am trying to do is that when user navigates from one page to another, the modules of the first route should be unregistered. This can be done easily using the unregisterModule method. The problem is that any action or mutation calls executed before the unregistering are not removed and they throw errors in the browser Console.

In the above sandbox, when user switches from Contact to Home immediately, following things happen:

  • Contact.vue loads and it's mounted callback is called.
  • Inside the mounted callback, the changeContact action is called
  • User goes back to Home. This calls beforeDestroy of Contact.vue that un-registers the contact module.
  • The changeContact tries to call the setContact mutation, but, since the module does not exist, an error message is thrown in the Console [vuex] unknown local mutation type: setContact, global type: contact/setContact

<!-- generated by vue-issues. DO NOT REMOVE -->

closed time in a month

kanteankit

issue commentvuejs/vuex

Calls to mutations and actions don't get cancelled when a module is unregistered using `unregisterModule`

Hi, we've discussed internally as well and came to a conclusion that we'll drop this feature request. First of all, there're no definitive ways to cancel the Promise execution in JS, and even if there were, we think it's almost impossible to handle correct canceling at the Vuex side.

These situation needs to be handled by users, since it's too specific to what app their building. For example, in the case you unregister a module and reregister it before the promise resolves, do you still want to commit that result to the store...? Handling all of this edge case would be really really hard in my opinion.

But thank you for bringing this up. Honestly I wasn't aware of this situation so hopefully we could do better in next Vuex iteration.

kanteankit

comment created time in a month

Pull request review commentvuejs/rfcs

add aborted and isNavigationFailure

 router.currentRoute // { path: '/login', redirectedFrom: { path: '/profile/dashb Since `router.afterEach` also triggers when a navigation fails, we need a way to know if the navigation succeeded or failed. To do that, we introduce an extra parameter that contains the same _failure_ we could find in a resolved navigation:  ```js-import { NavigationFailureType } from 'vue-router'+import { NavigationFailureType, isNavigationFailure } from 'vue-router'  router.afterEach((to, from, failure) => {-  if (failure) {-    if (failure.type === NavigationFailureType.canceled) {-      // ...-    }+  if (isNavigationFailure(failure)) {+    // ...   } }) ``` -# Drawbacks+## Differentiating Navigation failures -- Breaking change although migration is relatively simple and in many cases will allow the developer to remove existing code+Instead of directly checking the `type` property, we can use the `isNavigationFailure` helper:++```js+import { NavigationFailureType, isNavigationFailure } from 'vue-router'++router.afterEach((to, from, failure) => {+  // Any kind of navigation failure+  if (isNavigationFailure(failure)) {+    // ...+  }+  // Only duplicated navigations+  if (isNavigationFailure(failure, NavigationFailureType.duplicated)) {+    // ...+  }+  // Aborted or canceled navigations+  if (+    isNavigationFailure(+      failure,+      NavigationFailureType.aborted | NavigationFailureType.canceled

Ahhh I see thanks! Good to know 😳

posva

comment created time in a month

Pull request review commentvuejs/rfcs

add aborted and isNavigationFailure

 router.currentRoute // { path: '/login', redirectedFrom: { path: '/profile/dashb Since `router.afterEach` also triggers when a navigation fails, we need a way to know if the navigation succeeded or failed. To do that, we introduce an extra parameter that contains the same _failure_ we could find in a resolved navigation:  ```js-import { NavigationFailureType } from 'vue-router'+import { NavigationFailureType, isNavigationFailure } from 'vue-router'  router.afterEach((to, from, failure) => {-  if (failure) {-    if (failure.type === NavigationFailureType.canceled) {-      // ...-    }+  if (isNavigationFailure(failure)) {+    // ...   } }) ``` -# Drawbacks+## Differentiating Navigation failures -- Breaking change although migration is relatively simple and in many cases will allow the developer to remove existing code+Instead of directly checking the `type` property, we can use the `isNavigationFailure` helper:++```js+import { NavigationFailureType, isNavigationFailure } from 'vue-router'++router.afterEach((to, from, failure) => {+  // Any kind of navigation failure+  if (isNavigationFailure(failure)) {+    // ...+  }+  // Only duplicated navigations+  if (isNavigationFailure(failure, NavigationFailureType.duplicated)) {+    // ...+  }+  // Aborted or canceled navigations+  if (+    isNavigationFailure(+      failure,+      NavigationFailureType.aborted | NavigationFailureType.canceled

Nit pick but this should be NavigationFailureType.aborted || NavigationFailureType.canceled (double pipe)?

posva

comment created time in a month

issue commentvuejs/vuex

Slow registerModule when the module has getters

Good point yeah. I think it's worth mentioning it in the docs 👍

mattnathan

comment created time in a month

issue openedvuejs/vitepress

Git repository and Edit Links

Ref: https://vuepress.vuejs.org/theme/default-theme-config.html#git-repository-and-edit-links

created time in a month

PR opened vuejs/vitepress

feat: add multi sidebar support (#38)

This PR adds multi sidebar support. It does only support nesting array of objects as currently that is the only format supported by the array sidebar.

{
  sidebar: {
    '/guide/': [
      { text: 'Getting Started', link: '/guide/getting-started' },
      ...
    ],

    '/guide/nested/': [
      { text: 'Nested Index', link: '/guide/nested/' },
      ...
    ],

    // Fallback supported too.
    '/': [
      { text: 'Index', link: '/' },
      { text: 'Root', link: '/root' }
    ]
  }
}
  • children property in each object works as well.
  • Active state of Navbar item is not working correctly. It needs to compare correct path but thinking to create another PR for it.
  • URL without trailing slash acts differently than VuePress. Currently, if we access /guide, it renders /guide.html. If we access /guide/, it renders /guide/index.html. I'm leaving it as is for now but maybe we should have follow up PR for it...?

Screen Shot 2020-07-05 at 19 49 01

+37 -2

0 comment

2 changed files

pr created time in a month

create barnchkiaking/vitepress

branch : 38-multi-sidebar

created branch time in a month

create barnchkiaking/vitepress-playground

branch : master

created branch time in a month

created repositorykiaking/vitepress-playground

VitePress playground for VitePress development.

created time in a month

issue commentvuejs/vitepress

Multi Sidebar

I'll take this one ✋

yyx990803

comment created time in a month

issue closedvuejs/vuex

Slow registerModule when the module has getters

Version

3.5.1

Reproduction link

https://jsfiddle.net/qaL8f36y/

Steps to reproduce

  1. Open the link
  2. Specify any number > 0 for 'getters'
  3. Click Generate Modules
  4. Click Generate Modules

I was unable to generate more than about 3000 getters in total before the browser crashed.

Without the link, call Store.registerModule to register 1000s of modules with a single getter (or fewer modules with more getters) to see the browser run out of resources.

You can test out creating modules without getters and notice that the time taken is more-or-less constant (~45ms for me)

What is expected?

Registering modules with getters should perform the same as modules without getters

What is actually happening?

Performance of Store.registerModule when the module has getters is compounding, the more getters you have the slower it is to add more modules with getters.


I'm using dynamic modules as a pattern to handle 'collections of objects' in the store while avoiding needing to pass the index (or object key) around in getters, mutators, etc. Similar to https://stackoverflow.com/questions/44345704/separating-vuex-stores-for-dynamically-created-components - I have hundreds of objects in the store that are treated this way.

I noticed an issue when using the dev tools as the dev tools would frequently crash, and sometimes the page would too. There were repeated warning in the console [Violation] 'setTimeout' handler took 1552ms where the time was increasing each time, which I took to mean something wasn't linear/constant time. I finally took the time to create a minimal reproduction but found the issue was present without Vue/Vuex devtools open, though the numbers needed to crash the browser were larger without devtools.

<!-- generated by vue-issues. DO NOT REMOVE -->

closed time in a month

mattnathan

issue commentvuejs/vuex

Slow registerModule when the module has getters

This happens because registering a module forces Vuex to re-evaluate all getters. It's same reason described at this issue comment. So every time you add new getters, each registration become slower than before.

Also when you're using Dev Tools, it also dispatch changes in all subscribed watchers to force getter re-evaluation for hot reloading. That's why it becomes even slower when you're using Dev Tools.

Sad to say but module system in Vuex wasn't designed to be used in this way. Although your approach does make sense in theory, I would recommend you to store records in state object, or array (I know you wanted to avoid this but... 😢 ).

For example, Vuex ORM stores all records with in data property in a module, and we have perf test for more than 30,000 records and it gets resolved less than 100ms.

I'm not saying you should use Vuex ORM or anything, I'm just trying to illustrate that the performance issue should go away if you stick to storing records in module state instead of creating a module for each records.

As mentioned at the issue comment, there's not much we can do to fix this problem with current Vuex implementation. We're hoping to avoid this behavior in Vuex 5.

I'll be closing this issue since it's really the same issue with #1593, which I'm thinking to keep it open until we get Vuex version that fixes it 🤝

mattnathan

comment created time in a month

PR opened vuejs/vitepress

feat: add external link support for nav items

This PR adds external link support for the nav items. Such as for "Release Notes".

  • Creates new NavBarLink component.
  • Only hover style for external link is changed. Overall styles are untouched.
  • External icon copied from VuePress.

Screen Shot 2020-07-04 at 0 24 03

+160 -45

0 comment

6 changed files

pr created time in a month

create barnchkiaking/vitepress

branch : nav-item-external-link

created branch time in a month

push eventkiaking/vitepress

Carlos Rodrigues

commit sha 61adfc4dbff851f5d0cfc5a29edbd12045e8ecb6

build: build script compat for windows (#26)

view details

Carlos Rodrigues

commit sha 9116c9c3e06071f34b523cb488d9e5d963808a3c

fix: resolve relative path on windows (#27)

view details

simohamed

commit sha b127eed8de67cd1a278803cbdf0b7c75466941bd

chore: add box-sizing to Debug (#29)

view details

Eduardo San Martin Morote

commit sha 6f10ed6c63b7486f678fdd7eedc888925feb473c

fix: use resolve instead of join (#33) Allows the documentation to exist in a folder e.g. `docs`, and running `vitepress dev docs` as well as `vitepress build docs`

view details

Jeff Sagal

commit sha ad70881bd2196960df7044c4a62167d24b9073ae

Update README.md (#34) Update configuration src path.

view details

Ben Hong

commit sha da8df19cbe8d1fdb787cab6d4e10f7d63f3f16c9

docs: add contributing guide (#30)

view details

Kia King Ishii

commit sha 4a8388e113f978f6afc6936a86b06effc42a8304

feat: add array sidebar support (#35)

view details

Evan You

commit sha e77ea6323720f19d7401cb1a9fa94d1963f29e15

fix: avoid error when requesting non-existing md file

view details

Evan You

commit sha 26bcedf57884317ed65559dac4a4bed61f968ccd

chore: changelog [ci skip]

view details

Evan You

commit sha 582c5255e25e923d0ed7750dba1e830793e15a82

v0.4.1

view details

push time in a month

delete branch kiaking/vitepress

delete branch : array-sidebar-support

delete time in a month

PR opened vuejs/vitepress

feat: add array sidebar support

This PR adds array type sidebar support. It only supports this syntax.

{
  sidebar: [
    {
      text: 'Getting Started',
      link: 'getting-started',
      children: [...]
    }
  ]
}
  • You can't do sidebar: ['getting-started'].
  • Sidebar Groups works too, and header links works as well.
  • Basic stylings applied, but not responsive design (sidebar will not collapsable).

Screen Shot 2020-07-02 at 23 29 53

+139 -32

0 comment

4 changed files

pr created time in a month

create barnchkiaking/vitepress

branch : array-sidebar-support

created branch time in a month

fork kiaking/vitepress

Vite & Vue powered static site generator

fork in a month

Pull request review commentvuejs/vitepress

docs: add contributing guide

+# Contributing++This is a guide to help those who are interested in contributing to VitePress!++## Prerequisites++- [yarn](https://classic.yarnpkg.com/en/docs/cli/install/)++## Instructions++### Setup VitePress dev environment++1. Clone the VitePress repo+1. Install dependencies+    ```+    yarn+    ```+1. Create symlink to allow projects to link to local VitePress dev environment+    ```bash+    yarn link+    ```+    - If it's successful, you should see the following message:+    ```+    success Registered "vitepress".+    info You can now run `yarn link "vitepress"` in the projects where you want to use this package and it will be used instead.+    ✨  Done in 0.05s.+    ```+1. Start VitePress local dev environment+    ```bash+    yarn dev+    ```++++### Setup local VitePress project++1. Open up terminal+1. Create a new folder+1. Initialize with `npm init`+1. Create a `docs` directory+1. Create an `index.md` file with some content inside of `/docs`+1. Add dependency to local VitePress dev environment+    ```bash+    yarn link vitepress+    ```+1. Add script to run VitePress in `package.json`

I think it worth mentioning that before we do vitepress dev, we should be running yarn dev or yarn build at VitePress side to make it work. Tiny note may be good?

NOTE: Remember to run yarn dev at VitePress project mentioned at "Setup VitePress dev environment" section before running vitepress dev at local project.

bencodezen

comment created time in a month

delete branch vuejs/vuex

delete branch : 1787-add-missing-logger-type-file

delete time in a month

issue commentvuejs/rfcs

Vue 3: mid 2020 status update

Same for Vuex here. We'll probably create 3.0 branch and swap with current 4.0 branch. Vuex 3 will be supported as long as Vue 2 is supported 👍

yyx990803

comment created time in a month

push eventglobalbrain/sefirot

Kia Ishii

commit sha 049cc1a5a7342319a062a6801b6e8850257a9789

fix(validation): fix reactivity not working as expected

view details

push time in a month

push eventglobalbrain/sefirot

Kia Ishii

commit sha 3038d12fbb790bfc6935bece88f520ced2837cb7

chore: use 2 spaces for MD files

view details

push time in a month

push eventglobalbrain/sefirot

Kia Ishii

commit sha 86030b8f5f1583edb081a0899b4ce626f9096d00

refactor: split css variables into files to better handle theme changes

view details

push time in a month

push eventglobalbrain/sefirot

Kia Ishii

commit sha 09ba7a7e3762c5ce23226a1c0e99e08d2c2cf4e5

refactor: syntax highlight and stylings

view details

push time in a month

push eventglobalbrain/sefirot

Kia Ishii

commit sha 2c941c81b8cdef54685f3a622919b7cb060527c2

build: update npm packages

view details

push time in a month

push eventglobalbrain/sefirot

Kia Ishii

commit sha 1b22a3f92625addd40dcfe4c66113daa15b13f56

chore: update the release script

view details

push time in a month

issue commentnuxt/nuxt.js

vuex 3.5.0 logger.d.ts wrong location

Yap! It's fixed in 3.5.1 👍 Sorry for the confusion 😅

olamedia

comment created time in a month

issue commentvuejs/vuex

logger.d.ts wrong location

Ah I see. Thanks for the confirmation. I think it will updated soon at Nuxt side too 👍

olamedia

comment created time in a month

issue closedvuejs/vuex

logger.d.ts wrong location

Version

3.5.0

Reproduction link

https://codesandbox.io/s/solitary-surf-s268j

Steps to reproduce

  1. npm install
  2. check vuex/types/index.d.ts

What is expected?

vuex/types/index.d.ts contains the following line import createLogger from "./logger"; Expected logger.d.ts location is vuex/types

What is actually happening?

logger.d.ts is located at vuex/dist

<!-- generated by vue-issues. DO NOT REMOVE -->

closed time in a month

olamedia

issue commentvuejs/vuex

logger.d.ts wrong location

Thanks for the report! This issue should been solved with 3.5.1, which was released right after 3.5.0 😓

Please feel free to reopen it if you still have the same problem with 3.5.1 👍

olamedia

comment created time in a month

release vuejs/vuex

v4.0.0-beta.4

released time in a month

release vuejs/vuex

v3.5.1

released time in a month

issue closedvuejs/vuex

"types/logger.d.ts" file is missing from npm package

Version

3.5.0

Reproduction link

https://github.com/vuejs/vuex/blob/v3.5.0/package.json#L11-L16

Steps to reproduce

Run tsc or vue-cli-service build on repo with Vuex 3.5.0 installed.

What is expected?

No errors.

What is actually happening?

7:26 Cannot find module './logger' or its corresponding type declarations.
     5 |
     6 | import { mapState, mapMutations, mapGetters, mapActions, createNamespacedHelpers } from "./helpers";
  >  7 | import createLogger from "./logger";
       |                          ^
     8 |
     9 | export * from "./helpers";
    10 | export * from "./logger";
10:15 Cannot find module './logger' or its corresponding type declarations.
     8 |
     9 | export * from "./helpers";
  > 10 | export * from "./logger";
       |               ^
    11 |
    12 | export declare class Store<S> {
    13 |   constructor(options: StoreOptions<S>);

Fix: Add "types/helpers.d.ts", to package.json files config (https://github.com/vuejs/vuex/blob/v3.5.0/package.json#L11-L16).

<!-- generated by vue-issues. DO NOT REMOVE -->

closed time in a month

jgerigmeyer

issue commentvuejs/vuex

"types/logger.d.ts" file is missing from npm package

Thanks for the report! Will close this one due to duplication. The PR #1789 is open so we'll make a new release soon 🙏

jgerigmeyer

comment created time in a month

PR opened vuejs/vuex

Reviewers
fix(types): add missing `logger.d.ts` file to the package (#1787) bug typescript

fix #1787

This PR adds missing logger.d.ts file in the release package.

+1 -0

0 comment

1 changed file

pr created time in a month

create barnchvuejs/vuex

branch : 1787-add-missing-logger-type-file

created branch time in a month

more