sql-escaper
Advanced tools
+1
-1
@@ -359,3 +359,3 @@ "use strict"; | ||
| const temporalToString = (value, timezone) => { | ||
| if ('epochMilliseconds' in value) | ||
| if (typeof value.epochMilliseconds === 'number') | ||
| return (0, exports.dateToString)(new Date(value.epochMilliseconds), timezone || 'local'); | ||
@@ -362,0 +362,0 @@ if (value[Symbol.toStringTag] === 'Temporal.PlainDateTime') |
+1
-1
@@ -300,3 +300,3 @@ import { Buffer } from "node:buffer"; | ||
| const temporalToString = (value, timezone) => { | ||
| if ("epochMilliseconds" in value) | ||
| if (typeof value.epochMilliseconds === "number") | ||
| return dateToString(new Date(value.epochMilliseconds), timezone || "local"); | ||
@@ -303,0 +303,0 @@ if (value[Symbol.toStringTag] === "Temporal.PlainDateTime") |
+6
-1
| export type Raw = { | ||
| toSqlString(): string; | ||
| }; | ||
| export type TemporalValue = Temporal.Instant | Temporal.ZonedDateTime | Temporal.PlainDateTime | Temporal.PlainDate | Temporal.PlainTime | Temporal.PlainYearMonth | Temporal.PlainMonthDay | Temporal.Duration; | ||
| /** Avoids the global `Temporal` namespace so consumers don't need TS's ESNext.Temporal lib. */ | ||
| export type TemporalValue = { | ||
| readonly [Symbol.toStringTag]: `Temporal.${string}`; | ||
| readonly epochMilliseconds?: number; | ||
| toString(): string; | ||
| }; | ||
| export type SqlValue = string | number | bigint | boolean | Date | TemporalValue | Buffer | Uint8Array | Raw | Record<string, unknown> | SqlValue[] | Set<SqlValue> | Map<string, SqlValue> | null | undefined; | ||
| export type Timezone = 'local' | 'Z' | (string & NonNullable<unknown>); |
+9
-9
| { | ||
| "name": "sql-escaper", | ||
| "version": "1.5.0", | ||
| "version": "1.5.1", | ||
| "description": "🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).", | ||
@@ -33,4 +33,4 @@ "main": "./lib/index.js", | ||
| "build": "rm -rf ./lib && tsc && npm run build:esm", | ||
| "test:node": "poku test", | ||
| "test:bun": "bun --bun poku test", | ||
| "test:node": "poku test -r=\"compact\"", | ||
| "test:bun": "bun --bun poku -r=\"compact\" test", | ||
| "test:coverage": "mcr --import tsx --config mcr.config.ts npm run test:node", | ||
@@ -43,11 +43,11 @@ "lint": "biome lint --error-on-warnings && prettier --check .", | ||
| "@biomejs/biome": "^1.9.4", | ||
| "@ianvs/prettier-plugin-sort-imports": "^4.7.0", | ||
| "@ianvs/prettier-plugin-sort-imports": "^4.7.1", | ||
| "@js-temporal/polyfill": "^0.5.1", | ||
| "@types/node": "^25.2.0", | ||
| "@types/node": "^26.1.1", | ||
| "esbuild": "^0.28.1", | ||
| "monocart-coverage-reports": "^2.12.9", | ||
| "monocart-coverage-reports": "^2.12.12", | ||
| "packages-update": "^2.0.0", | ||
| "poku": "^4.3.2", | ||
| "prettier": "^3.8.1", | ||
| "tsx": "^4.21.0", | ||
| "poku": "^4.5.0", | ||
| "prettier": "^3.9.5", | ||
| "tsx": "^4.23.0", | ||
| "typescript": "^7.0.2" | ||
@@ -54,0 +54,0 @@ }, |
59030
0.17%1062
0.47%