@@ -207,3 +207,3 @@ export * from './kysely.js'; | ||
| export * from './util/log.js'; | ||
| export { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, Equals, UnknownRow, Simplify, SqlBool, Nullable, NotNull, ShallowDehydrateObject, ShallowDehydrateValue, StringsWhenDataTypeNotAvailable, } from './util/type-utils.js'; | ||
| export { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, Equals, UnknownRow, Simplify, SqlBool, Nullable, NumbersWhenDataTypeNotAvailable, NotNull, NumericString, ShallowDehydrateObject, ShallowDehydrateValue, StringsWhenDataTypeNotAvailable, } from './util/type-utils.js'; | ||
| export * from './util/infer-result.js'; | ||
@@ -210,0 +210,0 @@ export { logOnce } from './util/log-once.js'; |
@@ -517,3 +517,3 @@ import { ExpressionWrapper } from '../expression/expression-wrapper.js'; | ||
| */ | ||
| any<RE extends StringReference<DB, TB>>(expr: RE): Exclude<ExtractTypeFromStringReference<DB, TB, RE>, null> extends ReadonlyArray<infer I> ? ExpressionWrapper<DB, TB, I> : KyselyTypeError<'any(expr) call failed: expr must be an array'>; | ||
| any<RE extends StringReference<DB, TB>>(expr: RE): Exclude<ExtractTypeFromReferenceExpression<DB, TB, RE>, null> extends ReadonlyArray<infer I> ? ExpressionWrapper<DB, TB, I> : KyselyTypeError<'any(expr) call failed: expr must be an array'>; | ||
| any<T>(subquery: SelectQueryBuilderExpression<Record<string, T>>): ExpressionWrapper<DB, TB, T>; | ||
@@ -520,0 +520,0 @@ any<T>(expr: Expression<ReadonlyArray<T>>): ExpressionWrapper<DB, TB, T>; |
@@ -183,7 +183,8 @@ import { InsertResult } from '../query-builder/insert-result.js'; | ||
| * | ||
| * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`. | ||
| * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`, | ||
| * and anything in {@link NumbersWhenDataTypeNotAvailable} and convert it to `number`. | ||
| */ | ||
| export type ShallowDehydrateValue<T> = [T] extends [ | ||
| (infer U)[] | null | undefined | ||
| ] ? Array<ShallowDehydrateValue<U>> | Extract<T, null | undefined> : T extends Exclude<T, StringsWhenDataTypeNotAvailable> ? T : string | Exclude<T, StringsWhenDataTypeNotAvailable>; | ||
| export type StringsWhenDataTypeNotAvailable = ArrayBuffer | bigint | Buffer | Date; | ||
| export type ShallowDehydrateValue<T> = T extends null | undefined ? T : T extends (infer U)[] | null | undefined ? Array<ShallowDehydrateValue<U>> | Extract<T, null | undefined> : Exclude<T, StringsWhenDataTypeNotAvailable | NumbersWhenDataTypeNotAvailable> | ([Extract<T, NumbersWhenDataTypeNotAvailable>] extends [never] ? never : number) | ([Extract<T, StringsWhenDataTypeNotAvailable>] extends [never] ? never : string); | ||
| export type StringsWhenDataTypeNotAvailable = Date | Buffer | ArrayBuffer; | ||
| export type NumbersWhenDataTypeNotAvailable = bigint | NumericString; | ||
| export type NumericString = `${number}`; |
@@ -207,3 +207,3 @@ export * from './kysely.js'; | ||
| export * from './util/log.js'; | ||
| export { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, Equals, UnknownRow, Simplify, SqlBool, Nullable, NotNull, ShallowDehydrateObject, ShallowDehydrateValue, StringsWhenDataTypeNotAvailable, } from './util/type-utils.js'; | ||
| export { AnyAliasedColumn, AnyAliasedColumnWithTable, AnyColumn, AnyColumnWithTable, Equals, UnknownRow, Simplify, SqlBool, Nullable, NumbersWhenDataTypeNotAvailable, NotNull, NumericString, ShallowDehydrateObject, ShallowDehydrateValue, StringsWhenDataTypeNotAvailable, } from './util/type-utils.js'; | ||
| export * from './util/infer-result.js'; | ||
@@ -210,0 +210,0 @@ export { logOnce } from './util/log-once.js'; |
@@ -517,3 +517,3 @@ import { ExpressionWrapper } from '../expression/expression-wrapper.js'; | ||
| */ | ||
| any<RE extends StringReference<DB, TB>>(expr: RE): Exclude<ExtractTypeFromStringReference<DB, TB, RE>, null> extends ReadonlyArray<infer I> ? ExpressionWrapper<DB, TB, I> : KyselyTypeError<'any(expr) call failed: expr must be an array'>; | ||
| any<RE extends StringReference<DB, TB>>(expr: RE): Exclude<ExtractTypeFromReferenceExpression<DB, TB, RE>, null> extends ReadonlyArray<infer I> ? ExpressionWrapper<DB, TB, I> : KyselyTypeError<'any(expr) call failed: expr must be an array'>; | ||
| any<T>(subquery: SelectQueryBuilderExpression<Record<string, T>>): ExpressionWrapper<DB, TB, T>; | ||
@@ -520,0 +520,0 @@ any<T>(expr: Expression<ReadonlyArray<T>>): ExpressionWrapper<DB, TB, T>; |
@@ -183,7 +183,8 @@ import { InsertResult } from '../query-builder/insert-result.js'; | ||
| * | ||
| * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`. | ||
| * For now, we catch anything in {@link StringsWhenDataTypeNotAvailable} and convert it to `string`, | ||
| * and anything in {@link NumbersWhenDataTypeNotAvailable} and convert it to `number`. | ||
| */ | ||
| export type ShallowDehydrateValue<T> = [T] extends [ | ||
| (infer U)[] | null | undefined | ||
| ] ? Array<ShallowDehydrateValue<U>> | Extract<T, null | undefined> : T extends Exclude<T, StringsWhenDataTypeNotAvailable> ? T : string | Exclude<T, StringsWhenDataTypeNotAvailable>; | ||
| export type StringsWhenDataTypeNotAvailable = ArrayBuffer | bigint | Buffer | Date; | ||
| export type ShallowDehydrateValue<T> = T extends null | undefined ? T : T extends (infer U)[] | null | undefined ? Array<ShallowDehydrateValue<U>> | Extract<T, null | undefined> : Exclude<T, StringsWhenDataTypeNotAvailable | NumbersWhenDataTypeNotAvailable> | ([Extract<T, NumbersWhenDataTypeNotAvailable>] extends [never] ? never : number) | ([Extract<T, StringsWhenDataTypeNotAvailable>] extends [never] ? never : string); | ||
| export type StringsWhenDataTypeNotAvailable = Date | Buffer | ArrayBuffer; | ||
| export type NumbersWhenDataTypeNotAvailable = bigint | NumericString; | ||
| export type NumericString = `${number}`; |
+31
-34
| { | ||
| "name": "kysely", | ||
| "version": "0.28.3", | ||
| "version": "0.28.4", | ||
| "description": "Type safe SQL query builder", | ||
@@ -53,32 +53,2 @@ "repository": { | ||
| }, | ||
| "scripts": { | ||
| "clean": "rm -rf dist & rm -rf test/node/dist & rm -rf test/browser/bundle.js & rm -rf helpers", | ||
| "bench:ts": "npm run build && cd ./test/ts-benchmarks && node --experimental-strip-types ./index.ts", | ||
| "test": "npm run build && npm run test:node:build && npm run test:node:run && npm run test:typings && npm run test:esmimports && npm run test:exports", | ||
| "test:node:build": "tsc -p test/node", | ||
| "test:node": "npm run build && npm run test:node:build && npm run test:node:run", | ||
| "test:node:run": "mocha --timeout 15000 test/node/dist/**/*.test.js", | ||
| "test:browser:build": "rm -rf test/browser/bundle.js && esbuild test/browser/main.ts --bundle --outfile=test/browser/bundle.js", | ||
| "test:browser": "npm run build && npm run test:browser:build && node test/browser/test.js", | ||
| "test:bun": "npm run build && bun link && cd test/bun && bun install && bun run test", | ||
| "test:cloudflare-workers": "npm run build && cd test/cloudflare-workers && npm ci && npm test", | ||
| "test:deno": "deno run --allow-env --allow-read --allow-net test/deno/local.test.ts && deno run --allow-env --allow-read --allow-net test/deno/cdn.test.ts", | ||
| "test:typings": "tsd test/typings", | ||
| "test:esmimports": "node scripts/check-esm-imports.js", | ||
| "test:esbuild": "esbuild --bundle --platform=node --external:pg-native dist/esm/index.js --outfile=/dev/null", | ||
| "test:exports": "attw --pack . && node scripts/check-exports.js", | ||
| "test:jsdocs": "deno check --doc-only --no-lock --unstable-sloppy-imports --config=\"deno.check.json\" ./src", | ||
| "test:outdatedts": "npm run build && cd test/outdated-ts && npm ci && npm test", | ||
| "prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", | ||
| "build": "npm run clean && (npm run build:esm & npm run build:cjs) && npm run script:module-fixup && npm run script:copy-interface-doc", | ||
| "build:esm": "tsc -p tsconfig.json && npm run script:add-deno-type-references", | ||
| "build:cjs": "tsc -p tsconfig-cjs.json", | ||
| "script:module-fixup": "node scripts/module-fixup.js", | ||
| "script:copy-interface-doc": "node scripts/copy-interface-documentation.js", | ||
| "script:add-deno-type-references": "node scripts/add-deno-type-references.js", | ||
| "script:align-site-version": "node scripts/align-site-version.js", | ||
| "script:generate-site-examples": "node scripts/generate-site-examples.js", | ||
| "prepublishOnly": "npm run build && npm run test:exports", | ||
| "version": "npm run script:align-site-version && git add ." | ||
| }, | ||
| "author": "Sami Koskimäki <sami@jakso.me>", | ||
@@ -96,3 +66,2 @@ "license": "MIT", | ||
| "@types/chai-as-promised": "^8.0.2", | ||
| "@types/chai-subset": "^1.3.6", | ||
| "@types/mocha": "^10.0.10", | ||
@@ -108,3 +77,2 @@ "@types/node": "^22.15.3", | ||
| "chai-as-promised": "^8.0.1", | ||
| "chai-subset": "^1.6.0", | ||
| "esbuild": "^0.25.3", | ||
@@ -125,3 +93,32 @@ "lodash": "^4.17.21", | ||
| "typescript": "^5.8.3" | ||
| }, | ||
| "scripts": { | ||
| "clean": "rm -rf dist & rm -rf test/node/dist & rm -rf test/browser/bundle.js & rm -rf helpers", | ||
| "bench:ts": "pnpm build && cd ./test/ts-benchmarks && node --experimental-strip-types ./index.ts", | ||
| "test": "pnpm build && pnpm test:node:build && pnpm test:node:run && pnpm test:typings && pnpm test:esmimports && pnpm test:exports", | ||
| "test:node:build": "tsc -p test/node", | ||
| "test:node": "pnpm build && pnpm test:node:build && pnpm test:node:run", | ||
| "test:node:run": "mocha --timeout 15000 test/node/dist/**/*.test.js", | ||
| "test:browser:build": "rm -rf test/browser/bundle.js && esbuild test/browser/main.ts --bundle --outfile=test/browser/bundle.js", | ||
| "test:browser": "pnpm build && pnpm test:browser:build && node test/browser/test.js", | ||
| "test:bun": "pnpm build && bun link && cd test/bun && bun install && bun run test", | ||
| "test:cloudflare-workers": "pnpm build && pnpm -r test --filter kysely-cloudflare-workers-test", | ||
| "test:deno": "deno run --allow-env --allow-read --allow-net test/deno/local.test.ts && deno run --allow-env --allow-read --allow-net test/deno/cdn.test.ts", | ||
| "test:typings": "tsd test/typings", | ||
| "test:esmimports": "node scripts/check-esm-imports.js", | ||
| "test:esbuild": "esbuild --bundle --platform=node --external:pg-native dist/esm/index.js --outfile=/dev/null", | ||
| "test:exports": "attw --pack . && node scripts/check-exports.js", | ||
| "test:jsdocs": "deno check --doc-only --no-lock --unstable-sloppy-imports --config=\"deno.check.json\" ./src", | ||
| "test:outdatedts": "pnpm build && cd test/outdated-ts && pnpm i && pnpm test", | ||
| "prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'", | ||
| "build": "pnpm clean && (pnpm build:esm & pnpm build:cjs) && pnpm script:module-fixup && pnpm script:copy-interface-doc", | ||
| "build:esm": "tsc -p tsconfig.json && pnpm script:add-deno-type-references", | ||
| "build:cjs": "tsc -p tsconfig-cjs.json", | ||
| "script:module-fixup": "node scripts/module-fixup.js", | ||
| "script:copy-interface-doc": "node scripts/copy-interface-documentation.js", | ||
| "script:add-deno-type-references": "node scripts/add-deno-type-references.js", | ||
| "script:align-site-version": "node --experimental-strip-types scripts/align-site-version.mts", | ||
| "script:generate-site-examples": "node scripts/generate-site-examples.js", | ||
| "version": "pnpm script:align-site-version && git add ." | ||
| } | ||
| } | ||
| } |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
3246215
0.02%30
-6.25%90374
0.01%72
-1.37%