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.numUpdatedOrDeletedRows → Already handled ✅
- Type inference changes (
InferResult) → Doesn't affect runtime
- TypeScript >= 5.2 required → Users' responsibility
Thank you for maintaining this excellent library!
Current Situation
kysely-data-apipeerDependencies:"kysely": "^0.27.4"0.28.8Problem
Users get peer dependency warnings when using Kysely 0.28.x, even though
kysely-data-apialready supports it through the backward compatibility layer:This code already handles the breaking change in Kysely 0.28 where
numUpdatedOrDeletedRowswas 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.0with Kysely0.28.8in production (Aurora Serverless v2 with Data API) and it works perfectly with no issues.Benefits
Breaking Changes in Kysely 0.28
For reference, the main breaking changes in Kysely 0.28 that could affect external libraries:
QueryResult.numUpdatedOrDeletedRows→ Already handled ✅InferResult) → Doesn't affect runtimeThank you for maintaining this excellent library!