-
Notifications
You must be signed in to change notification settings - Fork 27
fix(filter): remove unsupported Vue.filter #81
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
fix(filter): remove unsupported Vue.filter #81
Conversation
32fd587
to
b92dc9d
Compare
tests/plugin.test.js
Outdated
describe('Plugin tests', () => { | ||
describe('useFacade', () => { | ||
const ComponentMock = { | ||
template: '<div id="maskedText">{{ useFacade(input, facadeConfig) }}</div>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe good to edit the readme section for filters to show this new syntax as well
there is also the filter.md which is shown in the styleguide for the intput facade which would be nice to update with this vue3 compatible syntax
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call to edit README 👍
src/plugin.js
Outdated
* | ||
* @param {String} value the value to apply the filter to | ||
* @param {*} config the masking config | ||
* @returns {string} the masked value as returned by the masker function | ||
*/ | ||
function filter(value, config) { | ||
function useFacade(value, config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!!!
src/plugin.js
Outdated
* | ||
* @param {String} value the value to apply the filter to | ||
* @param {*} config the masking config | ||
* @returns {string} the masked value as returned by the masker function | ||
*/ | ||
function filter(value, config) { | ||
function useFacade(value, config) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the filters are no longer supported then we should just remove this function and anyone who needs it can just use the masker function which is already been exported. This was just a wrapper around that function for syntax sugar in vue2.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- fix
Vue 3 doesn't support Vue.filter anymore but we can use the masker directly instead. closes RonaldJerez#44
b92dc9d
to
344ff9d
Compare
🎉 This PR is included in version 3.0.0-beta.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Vue 3 doesn't support Vue.filter anymore but we can use the masker directly instead. closes RonaldJerez#44
Description
Vue 3 upgrade gives errors due to the deprecated
Vue.filter
. This PR fixes this issue by removing the filter altogether. As mentioned by Ronald further down we can use the already exportedmasker
directly instead.For example:
Note: Not marking this as a breaking change as the existing beta branch was already broken for Vue 3.
Checklist