From 304d7122412fcfea4c338f068a5c2dd51b35c558 Mon Sep 17 00:00:00 2001 From: igalklebanov Date: Thu, 24 Oct 2024 21:05:59 +0300 Subject: [PATCH] enforce min TS version --- .npmignore | 2 +- outdated-typescript.d.ts | 23 +++++++++++++++++++++++ package-lock.json | 2 +- package.json | 9 ++++++++- 4 files changed, 33 insertions(+), 3 deletions(-) create mode 100644 outdated-typescript.d.ts diff --git a/.npmignore b/.npmignore index c92c384f7..d9e1ad890 100644 --- a/.npmignore +++ b/.npmignore @@ -16,4 +16,4 @@ package-lock.json tsconfig-base.json tsconfig-cjs.json tsconfig.json - +CONTRIBUTING.md diff --git a/outdated-typescript.d.ts b/outdated-typescript.d.ts new file mode 100644 index 000000000..1114df2ca --- /dev/null +++ b/outdated-typescript.d.ts @@ -0,0 +1,23 @@ +type ErrorMessage = + 'Your TypeScript version is too old. Please upgrade to >= 4.6.' +export type Kysely = ErrorMessage +export type sql = ErrorMessage +export type expressionBuilder = ErrorMessage +export type Expression = ErrorMessage +export type ColumnType = ErrorMessage +export type Generated = ErrorMessage +export type GeneratedAlways = ErrorMessage +export type JSONColumnType = ErrorMessage +export type Selectable = ErrorMessage +export type Insertable = ErrorMessage +export type Updateable = ErrorMessage +export type MysqlDialect = ErrorMessage +export type PostgresDialect = ErrorMessage +export type SqliteDialect = ErrorMessage +export type MssqlDialect = ErrorMessage +export type InferResult = ErrorMessage +export type CompiledQuery = ErrorMessage +export type UpdateResult = ErrorMessage +export type InsertResult = ErrorMessage +export type DeleteResult = ErrorMessage +export type MergeResult = ErrorMessage diff --git a/package-lock.json b/package-lock.json index 164783d7a..8bf093547 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "typescript": "^5.6.3" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" } }, "node_modules/@azure/abort-controller": { diff --git a/package.json b/package.json index fc96cec28..5aacd5cb3 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,17 @@ "url": "git://github.com/kysely-org/kysely.git" }, "engines": { - "node": ">=14.0.0" + "node": ">=18.0.0" }, "main": "dist/cjs/index.js", "module": "dist/esm/index.js", + "typesVersions": { + "<4.6": { + "*": [ + "outdated-typescript.d.ts" + ] + } + }, "exports": { ".": { "import": "./dist/esm/index.js",