Skip to content

Commit c8f2c55

Browse files
chore(deps): Bump fuse.js from 5.2.3 to 6.4.1 (#44)
* Bump fuse.js from 5.2.3 to 6.4.1 Bumps [fuse.js](https://github.com/krisk/Fuse) from 5.2.3 to 6.4.1. - [Release notes](https://github.com/krisk/Fuse/releases) - [Changelog](https://github.com/krisk/Fuse/blob/master/CHANGELOG.md) - [Commits](krisk/Fuse@v5.2.3...v6.4.1) Signed-off-by: dependabot[bot] <[email protected]> * fix: use fuse basic to reduce the bundle size * fix: set default keys prop to the [this.label, this.keyBy] * fix: fuse.js TypeError: keys.forEach is not a function issue when searching * docs: fix EmailContacs component search issue * docs: update CHANGELOG.md Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ivan Vilanculo <[email protected]>
1 parent 21a5a4d commit c8f2c55

File tree

6 files changed

+25
-39
lines changed

6 files changed

+25
-39
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Fixed
9+
- To reduce verbosity `keys` prop now uses `[this.label, this.keyBy]` as default value.
10+
### Security
11+
- We have updated a lot of our dependencies.
812

913
## [0.6.0]
1014
### Fixed
@@ -50,7 +54,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
5054
- `.form-control` class [#3](https://github.com/isneezy/vue-selectize/issues/3)
5155

5256
### Fixed
53-
- This dependency was not found (possible fix) [#5](https://github.com/isneezy/vue-selectize/issues/5)
57+
- This dependency where not found (possible fix) [#5](https://github.com/isneezy/vue-selectize/issues/5)
5458
- Some styles issues
5559

5660
## [0.2.0] - 2017-07-17

docs/.vuepress/components/EmailContacts.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div>Email:</div>
44
<v-selectize :options="options" @search="text = $event" v-model="selected" :create-item="maybeCreate()" multiple placeholder="Pick some people..." keyBy="email"
55
label="name"
6-
keys="['name', 'email']">
6+
:keys="['name', 'email']">
77
<template slot="item" slot-scope="{item}">{{item.name}} <{{item.email}}></template>
88
<template slot="option" slot-scope="{option}">
99
<label>{{ option.name }}</label>
@@ -51,4 +51,4 @@
5151
label, span{
5252
display: block;
5353
}
54-
</style>
54+
</style>

docs/api/props.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ vue-selectize internaly uses fuse.js to perform its search capabilities, this pr
5353
witch keys to use for searching.
5454

5555
```js
56-
keys: { default: () => ['label'] },
56+
keys: {
57+
default() {
58+
return [this.label, this.keyBy]
59+
},
60+
},
5761
```
5862

5963
## value

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"dependencies": {
3535
"core-js": "^3.6.4",
36-
"fuse.js": "^5.2.3",
36+
"fuse.js": "^6.4.1",
3737
"lodash.difference": "^4.5.0",
3838
"vue": "^2.6.12",
3939
"vue-click-outside": "^1.1.0"

src/components/VSelectize.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
</template>
8282

8383
<script>
84-
import Fuse from 'fuse.js'
84+
import Fuse from 'fuse.js/dist/fuse.basic'
8585
import ClickOutside from 'vue-click-outside'
8686
import ArrayDifference from 'lodash.difference'
8787
import { isPromise } from './utils.js'
@@ -116,7 +116,11 @@ export default {
116116
/**
117117
* Keys used during search and sorting options
118118
*/
119-
keys: { default: () => ['label'] },
119+
keys: {
120+
default() {
121+
return [this.label, this.keyBy]
122+
},
123+
},
120124
121125
/**
122126
* The value of the component
@@ -205,13 +209,9 @@ export default {
205209
*/
206210
filteredOptions() {
207211
const fuse = new Fuse(this.formattedOptions, {
208-
shouldSort: true,
212+
includeScore: true,
209213
threshold: 0.2,
210-
location: 0,
211-
distance: 100,
212-
maxPatternLength: 32,
213-
minMatchCharLength: 1,
214-
keys: this.keys,
214+
keys: Array.from(this.keys),
215215
})
216216
const options =
217217
this.searchText.length && !this.disableSearch

yarn.lock

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# yarn lockfile v1
33

44

5-
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3":
65
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4":
76
version "7.10.4"
87
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.10.4.tgz#168da1a36e90da68ae8d49c0f1b48c7c6249213a"
@@ -874,22 +873,6 @@
874873
minimatch "^3.0.4"
875874
strip-json-comments "^3.1.1"
876875

877-
"@eslint/eslintrc@^0.1.3":
878-
version "0.1.3"
879-
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.1.3.tgz#7d1a2b2358552cc04834c0979bd4275362e37085"
880-
integrity sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==
881-
dependencies:
882-
ajv "^6.12.4"
883-
debug "^4.1.1"
884-
espree "^7.3.0"
885-
globals "^12.1.0"
886-
ignore "^4.0.6"
887-
import-fresh "^3.2.1"
888-
js-yaml "^3.13.1"
889-
lodash "^4.17.19"
890-
minimatch "^3.0.4"
891-
strip-json-comments "^3.1.1"
892-
893876
894877
version "2.1.4"
895878
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
@@ -3981,11 +3964,6 @@ estraverse@^5.1.0, estraverse@^5.2.0:
39813964
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
39823965
integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
39833966

3984-
estraverse@^5.2.0:
3985-
version "5.2.0"
3986-
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880"
3987-
integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==
3988-
39893967
esutils@^2.0.2:
39903968
version "2.0.3"
39913969
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
@@ -4476,10 +4454,10 @@ functional-red-black-tree@^1.0.1:
44764454
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
44774455
integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
44784456

4479-
fuse.js@^5.2.3:
4480-
version "5.2.3"
4481-
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-5.2.3.tgz#fdf3aa62859782b3f73ddfa57a9ca81517280c91"
4482-
integrity sha512-ld3AEgKtKnnXCtJavtygAb+aLlD5aVvLwTocXXBSStLA6JGFI6oMxTvumwh46N2/3gs3A7JNDu1px5F1/cq84g==
4457+
fuse.js@^6.4.1:
4458+
version "6.4.1"
4459+
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-6.4.1.tgz#76f1b4ab9cd021b854a68381b35628033d27507e"
4460+
integrity sha512-+hAS7KYgLXontDh/vqffs7wIBw0ceb9Sx8ywZQhOsiQGcSO5zInGhttWOUYQYlvV/yYMJOacQ129Xs3mP3+oZQ==
44834461

44844462
gensync@^1.0.0-beta.1:
44854463
version "1.0.0-beta.1"

0 commit comments

Comments
 (0)