🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

sql-escaper

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sql-escaper - npm Package Compare versions

Comparing version
1.5.0
to
1.5.1
+1
-1
lib/index.js

@@ -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')

@@ -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")

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>);
{
"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 @@ },