Skip to content

Update peerDependencies to support Kysely 0.28 #48

@MasaGon

Description

@MasaGon

Current Situation

  • kysely-data-api peerDependencies: "kysely": "^0.27.4"
  • Latest Kysely version: 0.28.8

Problem

Users get peer dependency warnings when using Kysely 0.28.x, even though kysely-data-api already supports it through the backward compatibility layer:

// src/data-api-driver.ts
// @ts-ignore replaces `QueryResult.numUpdatedOrDeletedRows` in kysely >= 0.23
// following https://github.com/koskimas/kysely/pull/188
numAffectedRows,
// deprecated in kysely >= 0.23, keep for backward compatibility.
numUpdatedOrDeletedRows: numAffectedRows,

This code already handles the breaking change in Kysely 0.28 where numUpdatedOrDeletedRows was removed.

Proposed Solution

Update package.json:

{
  "peerDependencies": {
    "kysely": "^0.27.4 || ^0.28.0"
  }
}

Or alternatively:

{
  "peerDependencies": {
    "kysely": ">=0.27.4 <0.29.0"
  }
}

Testing

I've tested kysely-data-api@2.0.0 with Kysely 0.28.8 in production (Aurora Serverless v2 with Data API) and it works perfectly with no issues.

Benefits

  • ✅ Eliminates unnecessary peer dependency warnings
  • ✅ Allows users to use latest Kysely features (transaction improvements, using keyword, etc.)
  • ✅ No code changes required (already compatible)
  • ✅ Better developer experience

Breaking Changes in Kysely 0.28

For reference, the main breaking changes in Kysely 0.28 that could affect external libraries:

  • Removed QueryResult.numUpdatedOrDeletedRowsAlready handled
  • Type inference changes (InferResult) → Doesn't affect runtime
  • TypeScript >= 5.2 required → Users' responsibility

Thank you for maintaining this excellent library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions