houdini-svelte 1.2.21 → 1.2.22
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/build/test-cjs/index.js +19 -4
- package/build/test-esm/index.js +19 -4
- package/package.json +2 -2
package/build/test-cjs/index.js
CHANGED
|
@@ -136359,7 +136359,23 @@ function withArguments(config22, node2) {
|
|
|
136359
136359
|
if (!withDirectives || withDirectives.length === 0) {
|
|
136360
136360
|
return [];
|
|
136361
136361
|
}
|
|
136362
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
136362
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
136363
|
+
}
|
|
136364
|
+
function removeLocKey(value2) {
|
|
136365
|
+
if (typeof value2 !== "object" || value2 === null) {
|
|
136366
|
+
return value2;
|
|
136367
|
+
}
|
|
136368
|
+
if (Array.isArray(value2)) {
|
|
136369
|
+
return value2.map(removeLocKey);
|
|
136370
|
+
}
|
|
136371
|
+
return Object.fromEntries(
|
|
136372
|
+
Object.entries(value2).map(([key, fieldValue]) => {
|
|
136373
|
+
if (key === "loc") {
|
|
136374
|
+
return [];
|
|
136375
|
+
}
|
|
136376
|
+
return [key, removeLocKey(fieldValue)];
|
|
136377
|
+
})
|
|
136378
|
+
);
|
|
136363
136379
|
}
|
|
136364
136380
|
function fragmentArguments(config22, filepath, definition) {
|
|
136365
136381
|
const directives = definition.directives?.filter(
|
|
@@ -136450,6 +136466,7 @@ function collectWithArguments(config22, filepath, node2, scope2 = {}) {
|
|
|
136450
136466
|
}
|
|
136451
136467
|
value2 = scope2[value2.name.value];
|
|
136452
136468
|
}
|
|
136469
|
+
value2.loc = void 0;
|
|
136453
136470
|
args[arg.name.value] = {
|
|
136454
136471
|
...value2,
|
|
136455
136472
|
loc: void 0
|
|
@@ -136559,9 +136576,7 @@ function serializeValue(value2) {
|
|
|
136559
136576
|
}
|
|
136560
136577
|
if (typeof value2 === "object" && value2 !== null) {
|
|
136561
136578
|
return AST4.objectExpression(
|
|
136562
|
-
Object.entries(value2).filter(
|
|
136563
|
-
([key, value22]) => typeof value22 !== "undefined" && key !== "prev" && key !== "next"
|
|
136564
|
-
).map(([key, val]) => {
|
|
136579
|
+
Object.entries(value2).filter(([key, value22]) => typeof value22 !== "undefined").map(([key, val]) => {
|
|
136565
136580
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
136566
136581
|
})
|
|
136567
136582
|
);
|
package/build/test-esm/index.js
CHANGED
|
@@ -136346,7 +136346,23 @@ function withArguments(config22, node2) {
|
|
|
136346
136346
|
if (!withDirectives || withDirectives.length === 0) {
|
|
136347
136347
|
return [];
|
|
136348
136348
|
}
|
|
136349
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
136349
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
136350
|
+
}
|
|
136351
|
+
function removeLocKey(value2) {
|
|
136352
|
+
if (typeof value2 !== "object" || value2 === null) {
|
|
136353
|
+
return value2;
|
|
136354
|
+
}
|
|
136355
|
+
if (Array.isArray(value2)) {
|
|
136356
|
+
return value2.map(removeLocKey);
|
|
136357
|
+
}
|
|
136358
|
+
return Object.fromEntries(
|
|
136359
|
+
Object.entries(value2).map(([key, fieldValue]) => {
|
|
136360
|
+
if (key === "loc") {
|
|
136361
|
+
return [];
|
|
136362
|
+
}
|
|
136363
|
+
return [key, removeLocKey(fieldValue)];
|
|
136364
|
+
})
|
|
136365
|
+
);
|
|
136350
136366
|
}
|
|
136351
136367
|
function fragmentArguments(config22, filepath, definition) {
|
|
136352
136368
|
const directives = definition.directives?.filter(
|
|
@@ -136437,6 +136453,7 @@ function collectWithArguments(config22, filepath, node2, scope2 = {}) {
|
|
|
136437
136453
|
}
|
|
136438
136454
|
value2 = scope2[value2.name.value];
|
|
136439
136455
|
}
|
|
136456
|
+
value2.loc = void 0;
|
|
136440
136457
|
args[arg.name.value] = {
|
|
136441
136458
|
...value2,
|
|
136442
136459
|
loc: void 0
|
|
@@ -136546,9 +136563,7 @@ function serializeValue(value2) {
|
|
|
136546
136563
|
}
|
|
136547
136564
|
if (typeof value2 === "object" && value2 !== null) {
|
|
136548
136565
|
return AST4.objectExpression(
|
|
136549
|
-
Object.entries(value2).filter(
|
|
136550
|
-
([key, value22]) => typeof value22 !== "undefined" && key !== "prev" && key !== "next"
|
|
136551
|
-
).map(([key, val]) => {
|
|
136566
|
+
Object.entries(value2).filter(([key, value22]) => typeof value22 !== "undefined").map(([key, val]) => {
|
|
136552
136567
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
136553
136568
|
})
|
|
136554
136569
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.22",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"rollup": "^3.7.4",
|
|
33
33
|
"svelte": "^3.57.0",
|
|
34
34
|
"vite": "^4.1.1",
|
|
35
|
-
"houdini": "^1.2.
|
|
35
|
+
"houdini": "^1.2.22"
|
|
36
36
|
},
|
|
37
37
|
"files": [
|
|
38
38
|
"build"
|