Skip to content

[Patch] Remove silent option from mutations #457

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 11, 2016

Conversation

blake-newman
Copy link
Member

  • Now Dev tools supports filtering silent option is no longer required
  • Updated unit and type tests

@ktsn
Copy link
Member

ktsn commented Nov 14, 2016

Maybe we should deprecate the option and provide warning for users at first?

@yyx990803
Copy link
Member

Yeah, this would technically be a breaking change. Let's mark it deprecated for now.

@blake-newman
Copy link
Member Author

Good idea, would you prefer to depreciate that feature (silent flag) or the options object.

As there is no need for the object at all in with depreciation, however technically we are depreciating just the silent flag.

@ktsn
Copy link
Member

ktsn commented Nov 15, 2016

I think it would prefer to deprecate silent flag only, because I introduce new option in #380 😉

@blake-newman
Copy link
Member Author

@ktsn I will modify to keep option parameter available and depreciate the silent flag.

#380 is fascinating!

@blake-newman blake-newman force-pushed the patch/remove-silent-option branch from fa9df67 to 50c1478 Compare November 18, 2016 11:11
@blake-newman
Copy link
Member Author

/ping @yyx990803 @ktsn

- Now Dev tools supports filtering silent option is no longer required
- Added depreciation warning
- Updated unit and type tests
@blake-newman blake-newman force-pushed the patch/remove-silent-option branch from 50c1478 to 948857d Compare November 18, 2016 13:05
@@ -78,8 +78,16 @@ class Store {
handler(payload)
})
})
if (!options || !options.silent) {
this._subscribers.forEach(sub => sub(mutation, this.state))
this._subscribers.forEach(sub => sub(mutation, this.state))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not only provide deprecation message but also retain the silent flag's behavior until next major release.

this._subscribers.forEach(sub => sub(mutation, this.state))

if (
process.env.NODE_ENV !== 'production' &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As vuex currently does not resolve NODE_ENV check on the build time, we should not introduce it?
This line would cause runtime error if we use Vuex from <script> tag.
Or can we update build configuration for it?

@blake-newman
Copy link
Member Author

@ktsn to be honest this feature is rarely used, so probably no need to check env variable.

Will modify to still retain existing silent functionality if @yyx990803 agrees

@yyx990803 yyx990803 merged commit 9b6e452 into vuejs:dev Dec 11, 2016
@blake-newman blake-newman deleted the patch/remove-silent-option branch December 20, 2016 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants