@planetscale/database
Advanced tools
Comparing version 1.8.0 to 1.9.0
export { format } from './sanitization.js'; | ||
export { hex } from './text.js'; | ||
declare type Row = Record<string, any> | any[]; | ||
type Row = Record<string, any> | any[]; | ||
interface VitessError { | ||
@@ -13,3 +13,3 @@ message: string; | ||
} | ||
declare type Types = Record<string, string>; | ||
type Types = Record<string, string>; | ||
export interface ExecutedQuery { | ||
@@ -26,3 +26,3 @@ headers: string[]; | ||
} | ||
declare type Req = { | ||
type Req = { | ||
method: string; | ||
@@ -33,3 +33,3 @@ headers: Record<string, string>; | ||
}; | ||
declare type Res = { | ||
type Res = { | ||
ok: boolean; | ||
@@ -41,3 +41,3 @@ status: number; | ||
}; | ||
export declare type Cast = typeof cast; | ||
export type Cast = typeof cast; | ||
export interface Config { | ||
@@ -64,8 +64,8 @@ url?: string; | ||
} | ||
declare type ExecuteAs = 'array' | 'object'; | ||
declare type ExecuteOptions = { | ||
type ExecuteAs = 'array' | 'object'; | ||
type ExecuteOptions = { | ||
as?: ExecuteAs; | ||
cast?: Cast; | ||
}; | ||
declare type ExecuteArgs = object | any[] | null; | ||
type ExecuteArgs = object | any[] | null; | ||
export declare class Client { | ||
@@ -78,3 +78,3 @@ private config; | ||
} | ||
export declare type Transaction = Tx; | ||
export type Transaction = Tx; | ||
declare class Tx { | ||
@@ -81,0 +81,0 @@ private conn; |
@@ -1,6 +0,6 @@ | ||
declare type Stringable = { | ||
type Stringable = { | ||
toString: () => string; | ||
}; | ||
declare type Value = null | undefined | number | boolean | string | Array<Value> | Date | Stringable; | ||
type Value = null | undefined | number | boolean | string | Array<Value> | Date | Stringable; | ||
export declare function format(query: string, values: Value[] | Record<string, Value>): string; | ||
export {}; |
@@ -1,1 +0,1 @@ | ||
export declare const Version = "1.8.0"; | ||
export declare const Version = "1.9.0"; |
@@ -1,1 +0,1 @@ | ||
export const Version = '1.8.0'; | ||
export const Version = '1.9.0'; |
{ | ||
"name": "@planetscale/database", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"description": "A Fetch API-compatible PlanetScale database driver", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
@@ -14,2 +12,9 @@ "dist" | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
"import": "./dist/index.js", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"prettier": { | ||
@@ -27,3 +32,4 @@ "semi": false, | ||
"prebuild": "npm run clean", | ||
"build": "tsc", | ||
"build": "tsc && tsc --module commonjs --outDir dist/cjs", | ||
"postbuild": "echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json", | ||
"lint": "eslint src/ __tests__/", | ||
@@ -56,15 +62,15 @@ "pretest": "npm run build", | ||
"devDependencies": { | ||
"@types/jest": "^28.1.6", | ||
"@types/jest": "^29.5.3", | ||
"@types/sqlstring": "^2.3.0", | ||
"@typescript-eslint/eslint-plugin": "^5.31.0", | ||
"@typescript-eslint/parser": "^5.31.0", | ||
"eslint": "^8.20.0", | ||
"@typescript-eslint/eslint-plugin": "^6.1.0", | ||
"@typescript-eslint/parser": "^6.1.0", | ||
"eslint": "^8.45.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"jest": "^28.1.3", | ||
"prettier": "^2.7.1", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"jest": "^29.6.1", | ||
"prettier": "^3.0.0", | ||
"sqlstring": "^2.3.3", | ||
"ts-jest": "^28.0.7", | ||
"ts-jest": "^29.1.1", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.7.4", | ||
"typescript": "^5.1.6", | ||
"undici": "^5.8.0" | ||
@@ -71,0 +77,0 @@ }, |
44033
20
804
6