🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@postgresql-typed/cache

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@postgresql-typed/cache - npm Package Compare versions

Comparing version

to
0.3.3

13

lib/util/deserializer.js

@@ -9,3 +9,3 @@ import { Bit, BitVarying, Boolean, Box, ByteA, Character, CharacterVarying, Circle, Date, DateMultiRange, DateRange, Float4, Float8, Int2, Int4, Int4MultiRange, Int4Range, Int8, Int8MultiRange, Int8Range, Interval, JSON, Line, LineSegment, Money, Name, OID, Path, Point, Polygon, Text, Time, Timestamp, TimestampMultiRange, TimestampRange, TimestampTZ, TimestampTZMultiRange, TimestampTZRange, TimeTZ, UUID, } from "@postgresql-typed/parsers";

return Object.fromEntries(Object.entries(object).map(([key, value]) => [key, deserializer(value)]));
const { __pgtParserType, ...rest } = object;
const { __pgtParserType, __pgtParserExtraData, ...rest } = object;
switch (__pgtParserType) {

@@ -15,5 +15,5 @@ case "bytea":

case "bit":
return Bit.setN(Number.POSITIVE_INFINITY).from(rest);
return Bit.setN(Number(__pgtParserExtraData)).from(rest);
case "bitVarying":
return BitVarying.setN(Number.POSITIVE_INFINITY).from(rest);
return BitVarying.setN(Number(__pgtParserExtraData)).from(rest);
case "boolean":

@@ -24,5 +24,5 @@ return Boolean.from(rest);

case "character":
return Character.setN(Number.POSITIVE_INFINITY).from(rest);
return Character.setN(Number(__pgtParserExtraData)).from(rest);
case "characterVarying":
return CharacterVarying.setN(Number.POSITIVE_INFINITY).from(rest);
return CharacterVarying.setN(Number(__pgtParserExtraData)).from(rest);
case "circle":

@@ -104,6 +104,7 @@ return Circle.from(rest);

return UUID.from(rest);
/* c8 ignore next 4 */
/* c8 ignore next 5 */
//! It should be impossible to reach this point, but we need to handle it to satisfy TypeScript.
default:
delete object.__pgtParserType;
delete object.__pgtParserExtraData;
return object;

@@ -110,0 +111,0 @@ }

@@ -102,2 +102,3 @@ import { Bit, BitVarying, Boolean, Box, ByteA, Character, CharacterVarying, Circle, Date, DateMultiRange, DateRange, Float4, Float8, Int2, Int4, Int4MultiRange, Int4Range, Int8, Int8MultiRange, Int8Range, Interval, JSON, Line, LineSegment, Money, Name, OID, Path, Point, Polygon, Text, Time, Timestamp, TimestampMultiRange, TimestampRange, TimestampTZ, TimestampTZMultiRange, TimestampTZRange, TimeTZ, UUID, } from "@postgresql-typed/parsers";

__pgtParserType: parserType,
__pgtParserExtraData: "n" in parser ? parser.n.toString() : undefined,
...parser.toJSON(),

@@ -104,0 +105,0 @@ };

{
"name": "@postgresql-typed/cache",
"version": "0.3.2",
"version": "0.3.3",
"description": "A PostgreSQL-Typed extension to cache queries using Keyv",

@@ -46,4 +46,4 @@ "type": "module",

"source-map-support": "^0.5.21",
"@postgresql-typed/parsers": "0.9.3",
"@postgresql-typed/util": "0.9.0"
"@postgresql-typed/parsers": "0.10.0",
"@postgresql-typed/util": "0.10.0"
},

@@ -54,4 +54,4 @@ "devDependencies": {

"typescript": "^4.9.5",
"@postgresql-typed/cli": "0.7.0",
"@postgresql-typed/core": "0.9.2"
"@postgresql-typed/cli": "0.8.0",
"@postgresql-typed/core": "0.10.0"
},

@@ -58,0 +58,0 @@ "publishConfig": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet