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

add import prop @ FileMigrationProvider. #994

Open
wants to merge 12 commits into
base: v0.28
Choose a base branch
from
Open
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
32 changes: 29 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,34 @@ 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

outdated-typescript-version:
name: Outdated TypeScript version (<4.6)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Test outdated TypeScript version
run: npm run test:outdatedts && echo "Outdated TypeScript version users are required to upgrade!"
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.'>
231 changes: 66 additions & 165 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading