Fraci
    Preparing search index...

    fraci

    • 977b2f0: BREAKING CHANGE: Published output now targets ES2022 and requires Node.js 22.13 or newer and TypeScript 5.7 or newer. Invalid numeric options and generation arguments that were previously accepted now throw a FraciError with the INVALID_ARGUMENT code.

      Also add lower-bound ORM and TypeScript compatibility coverage and allow Prisma transaction clients in ordering helpers.

    • 7ecfe80: Add compatibility with Drizzle ORM 0.45 and v1 prereleases and Prisma ORM 7, while preserving support for Drizzle ORM 0.30 and later v0 releases and Prisma ORM 5 and 6.

    • 9866b54: Keep every conflict-retry candidate strictly inside its requested bounds, including batched generation, and make retry selection logarithmic in skip.

      Reject oversized input keys and impractically large generation counts before expensive work. Replace recursive midpoint construction and repeated array spreads with stack-safe, allocation-efficient implementations.

      Document bytewise database collation requirements and safe group compaction, and make random-operation benchmarks deterministic.

    • 7ecfe80: Migrate the repository to a pnpm and Vite+ workspace without changing the published entry points, and ensure the npm package includes its MIT license as LICENSE.
    • 27bbb30: BREAKING CHANGE: Added support for Prisma client type definitions generated outside of node_modules.

      The type definition for PrismaClient is no longer imported from @prisma/client. As a result, you must provide a type definition when instantiating fraci options or extensions. Please migrate as follows:

        import { definePrismaFraci, prismaFraci } from "fraci/prisma";
        import { PrismaClient } from "./path/to/your/prisma/client.js"; // Adjust the import path to your Prisma client
      
        const baseClient = new PrismaClient();
      
      - const definition = definePrismaFraci({
      + const definition = definePrismaFraci(baseClient, {  // or you can use `PrismaClient` instead of `baseClient`
          // your options here
        });
      
        const client = baseClient.$extends(
      -   prismaFraci(definition),
      +   prismaFraci(baseClient, definition),  // or you can use `PrismaClient` instead of `baseClient`
        );
      

      Along with this, the PrismaClient type argument was added first to the following related public type definitions:

      • prismaFraci
      • definePrismaFraci
      • FraciForPrisma
      • PrismaFraciExtension
      • PrismaFraciFieldOptionsRecord
      • PrismaFraciOptions

      Furthermore, we are anticipating future changes to Prisma's architecture and reducing imports from @prisma/client. As a result, the PrismaClientConflictError type no longer inherits from PrismaClientKnownRequestError.

    • 48a2ec2: Added custom error class.
    • 82808da: Throws an error when the maximum number of retries is exceeded to allow consistent error handling.
    • 4dfa326: Added development build.
    • 6e3a866: Added overloads for generateKeyBetween and generateNKeysBetween to make the spread operator work with conditional tuples.
    • 78a2622: Support Drizzle ORM v0.41.
    • df19427: Exported some Prisma types.
    • 9bc7f1d: Implemented Binary Fractional Indexing.

      Added support for binary-based fractional indices using Uint8Array for more efficient storage and operations. This implementation provides:

      • Improved performance with optimized binary operations for generating and comparing indices
      • Enhanced memory efficiency for applications handling large numbers of indices
      • Specialized factory functions for creating binary or string-based indices

      New Features:

      • Added fraciBinary and fraciString factory functions for creating specialized fractional indexing utilities
      • Added base and brand properties to Fraci for better type safety and runtime information
      • Enhanced validation and error handling for binary fractional indices

      Breaking Changes:

      • Template Parameter Signature: Changed template parameter signature for fraci, Fraci, and FractionalIndex types
      • Removed Properties: Removed digitBase and lengthBase properties from Fraci

      Added comprehensive type system with clear separation between binary and string-based indices:

      • AnyFractionalIndex, AnyBinaryFractionalIndex, AnyStringFractionalIndex
      • AnyFractionalIndexBase, AnyBinaryFractionalIndexBase, AnyStringFractionalIndexBase
      • AnyFraci, AnyBinaryFraci, AnyStringFraci
      • FraciOptionsBase, BinaryFraciOptions, StringFraciOptions
    • 294fb62: Added FraciForPrisma type.
    • da64bc1: Added definePrismaFraci function. Added PrismaFraciExtension type export.
    • 3c273e3: Reduced Prisma ORM integration code size.
    • b0c4151: Enhanced error handling:
      • Added "Fraci" prefix to error messages to make it easier to identify the source of the error
      • Added comprehensive "Runtime Errors" section to the documentation with detailed information about each error message
      • Provided clear causes and solutions for each error message to improve troubleshooting experience
    • 6451d6a: BREAKING CHANGE: Renamed base constants for better consistency and clarity:

      • BASE16 -> BASE16L (lowercase hex digits)
      • BASE26 -> BASE26L (lowercase alphabets)
      • BASE36 -> BASE36L (lowercase alphanumeric)
      • BASE64 -> BASE64URL (URL-safe Base64 characters)

      Added new complementary constants:

      • BASE16U (uppercase hex digits)

      The naming convention now uses L suffix for lowercase and U suffix for uppercase variants.

    • 1ba4bab: BREAKING CHANGE: Renamed Prisma integration function and type for better consistency with other database integrations:

      • fraciExtension -> prismaFraci - The main function for creating Prisma extensions
      • FraciExtensionOptions ->PrismaFraciOptions - The options interface for configuration

      Migration: Replace all instances of fraciExtension with prismaFraci and update type references from FraciExtensionOptions to PrismaFraciOptions.

    • 509d84a: BREAKING CHANGE: Renamed DrizzleFraciFetcher(Sync) type to FraciForDrizzle(Sync).

    • 54e65e5: BREAKING CHANGE: Changed the parameter order in indicesForAfter and indicesForBefore functions to make it more natural, with the broader grouping context (where/group) before the more specific cursor (cursor).

      Before:

      indicesForAfter(cursor, where);
      indicesForBefore(cursor, where);

      After:

      indicesForAfter(where, cursor);
      indicesForBefore(where, cursor);

      This change affects both Drizzle and Prisma implementations.

    • 8f28a82: BREAKING CHANGE: Changed the parameter order in defineDrizzleFraci function.

      The order of the group and cursor parameters has been swapped to make the API more intuitive. The new order is:

      defineDrizzleFraci(
      fraci, // Fractional index instance
      table, // Table
      column, // Fractional index column
      group, // Group (columns that define the grouping context)
      cursor, // Cursor (columns that uniquely identify a row within a group)
      );
    • edb941e: Add fraci methods to Drizzle ORM helper.

    • ec3cddd: Add skip parameter to generateKeyBetween and generateNKeysBetween methods.
    • e7e7a0a: Support Drizzle ORM integration.
    • 5f3cec8: Do not use unique symbol to brand FractionalIndex to avoid TS4058 error.
    • 1430862: Mark package side-effect free.
    • 93c538b: Do not use unique symbol to brand Prisma types to avoid TS4058 error.
    • 082ff42: Remove __EXAMPLE__ type only hint.
    • 367b8d6: Add caching feature.
    • d46c49a: BREAKING CHANGE: Renamed methods and types.
    • c0a5d80: Support transaction.
    • 3c91aed: Changed default max retry count to 5 (from 10).
    • 8eb6ae7: Updated package description.
    • 364b106: BREAKING CHANGE: Removed result extension.
    • d193157: Add isIndexConflictError method.
    • ff8627c: Automate release.