Skip to content

Conversation

@vroldanbet
Copy link
Contributor

snyk-top-banner

Snyk has created this PR to upgrade flexsearch from 0.7.43 to 0.8.143.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 12 versions ahead of your current version.

  • The recommended version was released 24 days ago.

Release notes
Package name: flexsearch
  • 0.8.143 - 2025-03-27
  • 0.8.142 - 2025-03-26
  • 0.8.141 - 2025-03-26
  • 0.8.140 - 2025-03-26
  • 0.8.138 - 2025-03-25
  • 0.8.135 - 2025-03-25
  • 0.8.132 - 2025-03-24
  • 0.8.117 - 2025-03-21
  • 0.8.105 - 2025-03-19
  • 0.8.103 - 2025-03-17
  • 0.8.1 - 2025-03-17
    • Resolver Support for Documents
    • Asynchronous Runtime Balancer, new option priority
    • Export/Import Worker Indexes + Document Worker, new extern config options export and import
    • Improved interoperability of the different build packages, including source folder
    • Support custom filter function for encoder (stop-word filter)
  • 0.8.0 - 2025-03-17
    • Persistent indexes support for: IndexedDB (Browser), Redis, SQLite, Postgres, MongoDB, Clickhouse
    • Enhanced language customization via the new Encoder class
    • Result Highlighting
    • Query performance achieve results up to 4.5 times faster compared to the previous generation v0.7.x by also improving the quality of results
    • Enhanced support for larger indexes or larger result sets
    • Improved offset and limit processing achieve up to 100 times faster traversal performance through large datasets
    • Support for larger In-Memory index with extended key size (the defaults maximum keystore limit is: 2^24)
    • Greatly enhanced performance of the whole text encoding pipeline
    • Improved indexing of numeric content (Triplets)
    • Intermediate result sets and Resolver
    • Basic Resolver: and, or, xor, not, limit, offset, boost, resolve
    • Improved charset collection
    • New charset preset soundex which further reduces memory consumption by also increasing "fuzziness"
    • Performance gain when polling tasks to the index by using "Event-Loop-Caches"
    • Up to 100 times faster deletion/replacement when not using the additional "fastupdate" register
    • Regex Pre-Compilation (transforms hundreds of regex rules into just a few)
    • Extended support for multiple tags (DocumentIndex)
    • Custom Fields ("Virtual Fields")
    • Custom Filter
    • Custom Score Function
    • Added French language preset (stop-word filter, stemmer)
    • Enhanced Worker Support
    • Export / Import index in chunks
    • Improved Build System + Bundler (Supported: CommonJS, ESM, Global Namespace), also the import of language packs are now supported for Node.js
    • Full covering index.d.ts type definitions
    • Fast-Boot Serialization optimized for Server-Side-Rendering (PHP, Python, Ruby, Rust, Java, Go, Node.js, ...)
  • 0.7.43 - 2024-01-10
from flexsearch GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade flexsearch from 0.7.43 to 0.8.143.

See this package in npm:
flexsearch

See this project in Snyk:
https://app.snyk.io/org/authzed/project/ba1f5e2c-3779-4576-a375-1b68f7cd2dae?utm_source=github&utm_medium=referral&page=upgrade-pr
@vercel
Copy link

vercel bot commented Apr 20, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 21, 2025 4:55pm

@tstirrat15 tstirrat15 force-pushed the snyk-upgrade-720913843ed26694c83b9904d2837b82 branch from 9d93714 to f8fa029 Compare April 21, 2025 16:54
Copy link
Contributor

@tstirrat15 tstirrat15 left a comment

Choose a reason for hiding this comment

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

See comments

import cn from 'clsx';
// flexsearch types are incorrect, they were overwritten in tsconfig.json
import FlexSearch from 'flexsearch';
import { Document } from 'flexsearch';
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a change that was made to the types in the intervening versions

// Diff: Inlined definitions
export const DEFAULT_LOCALE = 'en-US';

type SectionIndex = FlexSearch.Document<
Copy link
Contributor

Choose a reason for hiding this comment

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

These are no longer generic, so I stripped them but left the types in place in case they reinstate this behavior later

const indexes: {
[locale: string]: [PageIndex, SectionIndex];
// tuple is PageIndex, SectionIndex
[locale: string]: [Document, Document];
Copy link
Contributor

Choose a reason for hiding this comment

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

And then annotated their usage wherever I stripped the types

@tstirrat15 tstirrat15 merged commit 9fb005c into main Apr 21, 2025
9 checks passed
@tstirrat15 tstirrat15 deleted the snyk-upgrade-720913843ed26694c83b9904d2837b82 branch April 21, 2025 17:23
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants