@prisma/param-graph 7.4.0-integration-parameterization.22 → 7.5.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/serialization.test.js +0 -18
- package/dist/serialization.test.mjs +0 -18
- package/package.json +1 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { EnumLookup, InputEdge, InputNode, OutputEdge, OutputNode, RootEntry } from './param-graph';
|
|
2
|
-
export { ParamGraph } from './param-graph';
|
|
3
2
|
export type { InputEdgeData, InputNodeData, OutputEdgeData, OutputNodeData, ParamGraphData, RootEntryData, } from './param-graph';
|
|
4
3
|
export type { EdgeFlagValue, ScalarMaskValue } from './param-graph';
|
|
4
|
+
export { ParamGraph } from './param-graph';
|
|
5
5
|
export { EdgeFlag, getScalarMask, hasFlag, ScalarMask, scalarTypeToMask } from './param-graph';
|
|
6
6
|
export type { SerializedParamGraph } from './serialization';
|
|
7
7
|
export { deserializeParamGraph, serializeParamGraph } from './serialization';
|
|
@@ -166,22 +166,4 @@ var import_serialization = require("./serialization");
|
|
|
166
166
|
(0, import_vitest.expect)(deserialized.roots["root"].argsNodeId).toBe(0);
|
|
167
167
|
(0, import_vitest.expect)(deserialized.roots["root"].outputNodeId).toBe(0);
|
|
168
168
|
});
|
|
169
|
-
(0, import_vitest.test)("serialization produces more compact output with varint encoding", () => {
|
|
170
|
-
const data = {
|
|
171
|
-
strings: ["findMany", "create", "update", "where", "data", "id", "name", "email"],
|
|
172
|
-
inputNodes: [
|
|
173
|
-
{ edges: { 3: { flags: 1, scalarMask: 1 }, 4: { flags: 0, scalarMask: 2 } } },
|
|
174
|
-
{ edges: { 5: { flags: 2 }, 6: { flags: 2 }, 7: { flags: 2 } } }
|
|
175
|
-
],
|
|
176
|
-
outputNodes: [{ edges: { 5: { argsNodeId: 0 }, 6: {}, 7: {} } }],
|
|
177
|
-
roots: {
|
|
178
|
-
findMany: { argsNodeId: 0, outputNodeId: 0 },
|
|
179
|
-
create: { argsNodeId: 1, outputNodeId: 0 },
|
|
180
|
-
update: { argsNodeId: 0, outputNodeId: 0 }
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
const serialized = (0, import_serialization.serializeParamGraph)(data);
|
|
184
|
-
const binarySize = Buffer.from(serialized.graph, "base64url").length;
|
|
185
|
-
(0, import_vitest.expect)(binarySize).toBeLessThan(80);
|
|
186
|
-
});
|
|
187
169
|
});
|
|
@@ -165,22 +165,4 @@ describe("param-graph serialization", () => {
|
|
|
165
165
|
expect(deserialized.roots["root"].argsNodeId).toBe(0);
|
|
166
166
|
expect(deserialized.roots["root"].outputNodeId).toBe(0);
|
|
167
167
|
});
|
|
168
|
-
test("serialization produces more compact output with varint encoding", () => {
|
|
169
|
-
const data = {
|
|
170
|
-
strings: ["findMany", "create", "update", "where", "data", "id", "name", "email"],
|
|
171
|
-
inputNodes: [
|
|
172
|
-
{ edges: { 3: { flags: 1, scalarMask: 1 }, 4: { flags: 0, scalarMask: 2 } } },
|
|
173
|
-
{ edges: { 5: { flags: 2 }, 6: { flags: 2 }, 7: { flags: 2 } } }
|
|
174
|
-
],
|
|
175
|
-
outputNodes: [{ edges: { 5: { argsNodeId: 0 }, 6: {}, 7: {} } }],
|
|
176
|
-
roots: {
|
|
177
|
-
findMany: { argsNodeId: 0, outputNodeId: 0 },
|
|
178
|
-
create: { argsNodeId: 1, outputNodeId: 0 },
|
|
179
|
-
update: { argsNodeId: 0, outputNodeId: 0 }
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
const serialized = serializeParamGraph(data);
|
|
183
|
-
const binarySize = Buffer.from(serialized.graph, "base64url").length;
|
|
184
|
-
expect(binarySize).toBeLessThan(80);
|
|
185
|
-
});
|
|
186
168
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/param-graph",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.5.0-dev.1",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -23,9 +23,6 @@
|
|
|
23
23
|
"directory": "packages/param-graph"
|
|
24
24
|
},
|
|
25
25
|
"license": "Apache-2.0",
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"vitest": "^2.1.8"
|
|
28
|
-
},
|
|
29
26
|
"files": [
|
|
30
27
|
"dist"
|
|
31
28
|
],
|