fix: Upgrade pico-search to 0.6.0 (#13645)

This commit is contained in:
Sivin Varghese
2026-02-25 16:52:45 +05:30
committed by GitHub
parent a44cb2c738
commit ba804e0f30
5 changed files with 15 additions and 11 deletions

View File

@@ -45,7 +45,10 @@ const records = computed(() =>
const filteredRecords = computed(() => { const filteredRecords = computed(() => {
const query = searchQuery.value.trim(); const query = searchQuery.value.trim();
if (!query) return records.value; if (!query) return records.value;
return picoSearch(records.value, query, ['short_code', 'content']); return picoSearch(records.value, query, [
{ name: 'short_code', weight: 4 },
'content',
]);
}); });
const uiFlags = computed(() => getters.getUIFlags.value); const uiFlags = computed(() => getters.getUIFlags.value);

View File

@@ -32,7 +32,10 @@ const records = computed(() => getters['labels/getLabels'].value);
const filteredRecords = computed(() => { const filteredRecords = computed(() => {
const query = searchQuery.value.trim(); const query = searchQuery.value.trim();
if (!query) return records.value; if (!query) return records.value;
return picoSearch(records.value, query, ['title', 'description']); return picoSearch(records.value, query, [
{ name: 'title', weight: 4 },
'description',
]);
}); });
const uiFlags = computed(() => getters['labels/getUIFlags'].value); const uiFlags = computed(() => getters['labels/getUIFlags'].value);

View File

@@ -46,9 +46,7 @@ export default {
filteredActiveLabels() { filteredActiveLabels() {
if (!this.search) return this.accountLabels; if (!this.search) return this.accountLabels;
return picoSearch(this.accountLabels, this.search, ['title'], { return picoSearch(this.accountLabels, this.search, ['title']);
threshold: 0.9,
});
}, },
noResult() { noResult() {

View File

@@ -46,7 +46,7 @@
"@radix-ui/colors": "^3.0.0", "@radix-ui/colors": "^3.0.0",
"@rails/actioncable": "6.1.3", "@rails/actioncable": "6.1.3",
"@rails/ujs": "^7.1.400", "@rails/ujs": "^7.1.400",
"@scmmishra/pico-search": "0.5.4", "@scmmishra/pico-search": "0.6.0",
"@sentry/vue": "^8.55.0", "@sentry/vue": "^8.55.0",
"@sindresorhus/slugify": "2.2.1", "@sindresorhus/slugify": "2.2.1",
"@tailwindcss/typography": "^0.5.15", "@tailwindcss/typography": "^0.5.15",

10
pnpm-lock.yaml generated
View File

@@ -59,8 +59,8 @@ importers:
specifier: ^7.1.400 specifier: ^7.1.400
version: 7.1.400 version: 7.1.400
'@scmmishra/pico-search': '@scmmishra/pico-search':
specifier: 0.5.4 specifier: 0.6.0
version: 0.5.4 version: 0.6.0
'@sentry/vue': '@sentry/vue':
specifier: ^8.55.0 specifier: ^8.55.0
version: 8.55.0(pinia@3.0.4(typescript@5.6.2)(vue@3.5.12(typescript@5.6.2)))(vue@3.5.12(typescript@5.6.2)) version: 8.55.0(pinia@3.0.4(typescript@5.6.2)(vue@3.5.12(typescript@5.6.2)))(vue@3.5.12(typescript@5.6.2))
@@ -1240,8 +1240,8 @@ packages:
'@rtsao/scc@1.1.0': '@rtsao/scc@1.1.0':
resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==} resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}
'@scmmishra/pico-search@0.5.4': '@scmmishra/pico-search@0.6.0':
resolution: {integrity: sha512-JdV8KumQ+pE5tqgQ71xUT9biE/qV//tx3NCqTLkW9Z4tsjKGN0B6kVowmtaZBAtErqir9XiMxsKXRTMF/MpUww==} resolution: {integrity: sha512-1zC2cAwPWuv38VEh0It90fdUWkvX75OwBUjgTj+d5LTltARnf3ydbpcN2Ucl0aATBMmaNqPMcVvT25IOCAqCEA==}
'@sentry-internal/browser-utils@8.55.0': '@sentry-internal/browser-utils@8.55.0':
resolution: {integrity: sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw==} resolution: {integrity: sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw==}
@@ -5795,7 +5795,7 @@ snapshots:
'@rtsao/scc@1.1.0': {} '@rtsao/scc@1.1.0': {}
'@scmmishra/pico-search@0.5.4': {} '@scmmishra/pico-search@0.6.0': {}
'@sentry-internal/browser-utils@8.55.0': '@sentry-internal/browser-utils@8.55.0':
dependencies: dependencies: