@prisma/param-graph
Advanced tools
+1
-1
| export type { EnumLookup, InputEdge, InputNode, OutputEdge, OutputNode, RootEntry } from './param-graph'; | ||
| export { ParamGraph } from './param-graph'; | ||
| export type { InputEdgeData, InputNodeData, OutputEdgeData, OutputNodeData, ParamGraphData, RootEntryData, } from './param-graph'; | ||
| export type { EdgeFlagValue, ScalarMaskValue } from './param-graph'; | ||
| export { ParamGraph } from './param-graph'; | ||
| export { EdgeFlag, getScalarMask, hasFlag, ScalarMask, scalarTypeToMask } from './param-graph'; | ||
| export type { SerializedParamGraph } from './serialization'; | ||
| export { deserializeParamGraph, serializeParamGraph } from './serialization'; |
@@ -169,20 +169,2 @@ "use strict"; | ||
| }); | ||
| (0, import_vitest.test)("serialization produces more compact output with varint encoding", () => { | ||
| const data = { | ||
| strings: ["findMany", "create", "update", "where", "data", "id", "name", "email"], | ||
| inputNodes: [ | ||
| { edges: { 3: { flags: 1, scalarMask: 1 }, 4: { flags: 0, scalarMask: 2 } } }, | ||
| { edges: { 5: { flags: 2 }, 6: { flags: 2 }, 7: { flags: 2 } } } | ||
| ], | ||
| outputNodes: [{ edges: { 5: { argsNodeId: 0 }, 6: {}, 7: {} } }], | ||
| roots: { | ||
| findMany: { argsNodeId: 0, outputNodeId: 0 }, | ||
| create: { argsNodeId: 1, outputNodeId: 0 }, | ||
| update: { argsNodeId: 0, outputNodeId: 0 } | ||
| } | ||
| }; | ||
| const serialized = (0, import_serialization.serializeParamGraph)(data); | ||
| const binarySize = Buffer.from(serialized.graph, "base64url").length; | ||
| (0, import_vitest.expect)(binarySize).toBeLessThan(80); | ||
| }); | ||
| }); |
@@ -168,20 +168,2 @@ import { describe, expect, test } from "vitest"; | ||
| }); | ||
| test("serialization produces more compact output with varint encoding", () => { | ||
| const data = { | ||
| strings: ["findMany", "create", "update", "where", "data", "id", "name", "email"], | ||
| inputNodes: [ | ||
| { edges: { 3: { flags: 1, scalarMask: 1 }, 4: { flags: 0, scalarMask: 2 } } }, | ||
| { edges: { 5: { flags: 2 }, 6: { flags: 2 }, 7: { flags: 2 } } } | ||
| ], | ||
| outputNodes: [{ edges: { 5: { argsNodeId: 0 }, 6: {}, 7: {} } }], | ||
| roots: { | ||
| findMany: { argsNodeId: 0, outputNodeId: 0 }, | ||
| create: { argsNodeId: 1, outputNodeId: 0 }, | ||
| update: { argsNodeId: 0, outputNodeId: 0 } | ||
| } | ||
| }; | ||
| const serialized = serializeParamGraph(data); | ||
| const binarySize = Buffer.from(serialized.graph, "base64url").length; | ||
| expect(binarySize).toBeLessThan(80); | ||
| }); | ||
| }); |
+1
-4
| { | ||
| "name": "@prisma/param-graph", | ||
| "version": "7.4.0-integration-parameterization.22", | ||
| "version": "7.4.0", | ||
| "description": "This package is intended for Prisma's internal use", | ||
@@ -26,5 +26,2 @@ "main": "dist/index.js", | ||
| "license": "Apache-2.0", | ||
| "devDependencies": { | ||
| "vitest": "^2.1.8" | ||
| }, | ||
| "files": [ | ||
@@ -31,0 +28,0 @@ "dist" |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
-100%1
-50%75431
-2.29%1737
-2.03%