replicache-nextjs
Advanced tools
Comparing version 0.1.4 to 0.1.5
@@ -1,3 +0,5 @@ | ||
import type { MutatorDefs } from "replicache"; | ||
import { ZodType } from "zod"; | ||
import type { MutatorDefs, ReadonlyJSONValue } from "replicache"; | ||
export declare function parseIfDebug<T>(schema: ZodType<T>, val: ReadonlyJSONValue): T; | ||
export declare type Error = "SpaceNotFound"; | ||
export declare function push<M extends MutatorDefs>(spaceID: string, requestBody: any, mutators: M): Promise<void>; |
@@ -5,3 +5,2 @@ import { transact } from "./pg.js"; | ||
import { z } from "zod"; | ||
import { parseIfDebug } from "@rocicorp/rails"; | ||
import { getPokeBackend } from "./poke/poke.js"; | ||
@@ -17,2 +16,8 @@ const mutationSchema = z.object({ | ||
}); | ||
export function parseIfDebug(schema, val) { | ||
if (globalThis.process?.env?.NODE_ENV !== "production") { | ||
return schema.parse(val); | ||
} | ||
return val; | ||
} | ||
export async function push(spaceID, | ||
@@ -19,0 +24,0 @@ // eslint-disable-next-line @typescript-eslint/no-explicit-any |
{ | ||
"name": "replicache-nextjs", | ||
"version": "0.1.4", | ||
"version": "0.1.5", | ||
"description": "Generic Replicache backend on Next.js", | ||
@@ -18,13 +18,15 @@ "homepage": "https://github.com/rocicorp/replicache-nextjs", | ||
"peerDependencies": { | ||
"@supabase/supabase-js": ">=1.35.3", | ||
"next": ">=12.1.6", | ||
"pg-mem": ">=2.5.0", | ||
"react": ">=16.0 <18.0", | ||
"react-dom": ">=16.0 <18.0", | ||
"replicache": ">=11.0.0", | ||
"pg-mem": ">=2.5.0", | ||
"@supabase/supabase-js": ">=1.35.3" | ||
"zod": ">=3.17.3", | ||
"pg": ">=8.6.0" | ||
}, | ||
"dependencies": { | ||
"nanoid": "^3.3.1" | ||
}, | ||
"devDependencies": { | ||
"@rocicorp/logger": "^2.2.0", | ||
"@rocicorp/rails": "^0.2.1", | ||
"@supabase/supabase-js": "^1.35.3", | ||
"@types/chai": "^4.3.0", | ||
@@ -39,14 +41,7 @@ "@types/mocha": "^9.1.0", | ||
"chai": "^4.3.6", | ||
"classnames": "^2.3.1", | ||
"eslint": "^8.2.0", | ||
"mocha": "^9.2.1", | ||
"nanoid": "^3.3.1", | ||
"next": "^12.1.6", | ||
"pg": "^8.7.3", | ||
"pg-mem": "^2.5.0", | ||
"prettier": "^2.2.1", | ||
"react": "17.0.2", | ||
"ts-node": "^10.7.0", | ||
"typescript": "^4.7.4", | ||
"zod": "^3.17.3" | ||
"typescript": "^4.7.4" | ||
}, | ||
@@ -53,0 +48,0 @@ "type": "module", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
62039
14
1276
0
9
+ Addednanoid@^3.3.1
+ Addedpg@8.13.1(transitive)
+ Addedpg-cloudflare@1.1.1(transitive)
+ Addedpg-connection-string@2.7.0(transitive)
+ Addedpg-int8@1.0.1(transitive)
+ Addedpg-pool@3.7.0(transitive)
+ Addedpg-protocol@1.7.0(transitive)
+ Addedpg-types@2.2.0(transitive)
+ Addedpgpass@1.0.5(transitive)
+ Addedpostgres-array@2.0.0(transitive)
+ Addedpostgres-bytea@1.0.0(transitive)
+ Addedpostgres-date@1.0.7(transitive)
+ Addedpostgres-interval@1.2.0(transitive)
+ Addedsplit2@4.2.0(transitive)
+ Addedxtend@4.0.2(transitive)
+ Addedzod@3.24.1(transitive)