Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: type-safe JSON insertions/updates, eb.valJson & sql.valJson. #1130

Draft
wants to merge 13 commits into
base: v0.28
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,17 @@ jobs:
- name: Run build with newer TypeScript
run: npm run build

- name: Install older TypeScript
run: npm i -D typescript@${{ matrix.typescript-version }} tsd@${{ fromJson('{ "^4.6":"0.20.0", "^4.7":"0.22.0", "^4.8":"0.24.1", "^4.9":"0.27.0", "^5.0":"0.28.1", "^5.2":"0.29.0", "^5.3":"0.30.7", "^5.4":"0.31.2" }')[matrix.typescript-version] }}
- run: |
echo "TS_VERSION=${{ matrix.typescript-version }}" >> $GITHUB_ENV
echo "TSD_VERSION=${{ fromJson('{ "^4.6":"0.20.0", "^4.7":"0.22.0", "^4.8":"0.24.1", "^4.9":"0.27.0", "^5.0":"0.28.1", "^5.2":"0.29.0", "^5.3":"0.30.7", "^5.4":"0.31.2" }')[env.TS_VERSION] }} >> $GITHUB_ENV"

- name: Run tests with older TypeScript
- name: Install Typescript (${{ env.TS_VERSION }}) and TSD (${{ env.TSD_VERSION }})
run: npm i -D typescript@${{ env.TS_VERSION }} tsd@${{ env.TSD_VERSION }}

- name: Exclude non-backward compatible tests
run: npx tsx ./scripts/exclude-test-files-for-backwards-compat.mts

- name: Run tests with older TypeScript version
run: npm run test:typings && npm run test:node:build

jsdocs:
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ package-lock.json
tsconfig-base.json
tsconfig-cjs.json
tsconfig.json

CONTRIBUTING.md
5 changes: 5 additions & 0 deletions outdated-typescript.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import type { KyselyTypeError } from './dist/cjs/util/type-error'

declare const Kysely: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'>
declare const RawBuilder: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'>
declare const sql: KyselyTypeError<'The installed TypeScript version is outdated and cannot guarantee type-safety with Kysely. Please upgrade to version 4.6 or newer.'>
Loading
Loading