houdini 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/cmd-cjs/index.js +21 -6
- package/build/cmd-esm/index.js +21 -6
- package/build/codegen/transforms/fragmentVariables.d.ts +1 -1
- package/build/codegen-cjs/index.js +19 -4
- package/build/codegen-esm/index.js +19 -4
- package/build/test-cjs/index.js +19 -4
- package/build/test-esm/index.js +19 -4
- package/build/vite-cjs/index.js +19 -4
- package/build/vite-esm/index.js +19 -4
- package/package.json +1 -1
package/build/cmd-cjs/index.js
CHANGED
|
@@ -69898,7 +69898,23 @@ function withArguments(config2, node) {
|
|
|
69898
69898
|
if (!withDirectives || withDirectives.length === 0) {
|
|
69899
69899
|
return [];
|
|
69900
69900
|
}
|
|
69901
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
69901
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
69902
|
+
}
|
|
69903
|
+
function removeLocKey(value) {
|
|
69904
|
+
if (typeof value !== "object" || value === null) {
|
|
69905
|
+
return value;
|
|
69906
|
+
}
|
|
69907
|
+
if (Array.isArray(value)) {
|
|
69908
|
+
return value.map(removeLocKey);
|
|
69909
|
+
}
|
|
69910
|
+
return Object.fromEntries(
|
|
69911
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
69912
|
+
if (key === "loc") {
|
|
69913
|
+
return [];
|
|
69914
|
+
}
|
|
69915
|
+
return [key, removeLocKey(fieldValue)];
|
|
69916
|
+
})
|
|
69917
|
+
);
|
|
69902
69918
|
}
|
|
69903
69919
|
function fragmentArguments(config2, filepath, definition) {
|
|
69904
69920
|
const directives = definition.directives?.filter(
|
|
@@ -69989,6 +70005,7 @@ function collectWithArguments(config2, filepath, node, scope = {}) {
|
|
|
69989
70005
|
}
|
|
69990
70006
|
value = scope[value.name.value];
|
|
69991
70007
|
}
|
|
70008
|
+
value.loc = void 0;
|
|
69992
70009
|
args[arg.name.value] = {
|
|
69993
70010
|
...value,
|
|
69994
70011
|
loc: void 0
|
|
@@ -70109,9 +70126,7 @@ function serializeValue(value) {
|
|
|
70109
70126
|
}
|
|
70110
70127
|
if (typeof value === "object" && value !== null) {
|
|
70111
70128
|
return AST4.objectExpression(
|
|
70112
|
-
Object.entries(value).filter(
|
|
70113
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
70114
|
-
).map(([key, val]) => {
|
|
70129
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
70115
70130
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
70116
70131
|
})
|
|
70117
70132
|
);
|
|
@@ -76161,12 +76176,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
76161
76176
|
}
|
|
76162
76177
|
packageJSON2.devDependencies = {
|
|
76163
76178
|
...packageJSON2.devDependencies,
|
|
76164
|
-
houdini: "^1.2.
|
|
76179
|
+
houdini: "^1.2.22"
|
|
76165
76180
|
};
|
|
76166
76181
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
76167
76182
|
packageJSON2.devDependencies = {
|
|
76168
76183
|
...packageJSON2.devDependencies,
|
|
76169
|
-
"houdini-svelte": "^1.2.
|
|
76184
|
+
"houdini-svelte": "^1.2.22"
|
|
76170
76185
|
};
|
|
76171
76186
|
} else {
|
|
76172
76187
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
package/build/cmd-esm/index.js
CHANGED
|
@@ -69903,7 +69903,23 @@ function withArguments(config2, node) {
|
|
|
69903
69903
|
if (!withDirectives || withDirectives.length === 0) {
|
|
69904
69904
|
return [];
|
|
69905
69905
|
}
|
|
69906
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
69906
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
69907
|
+
}
|
|
69908
|
+
function removeLocKey(value) {
|
|
69909
|
+
if (typeof value !== "object" || value === null) {
|
|
69910
|
+
return value;
|
|
69911
|
+
}
|
|
69912
|
+
if (Array.isArray(value)) {
|
|
69913
|
+
return value.map(removeLocKey);
|
|
69914
|
+
}
|
|
69915
|
+
return Object.fromEntries(
|
|
69916
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
69917
|
+
if (key === "loc") {
|
|
69918
|
+
return [];
|
|
69919
|
+
}
|
|
69920
|
+
return [key, removeLocKey(fieldValue)];
|
|
69921
|
+
})
|
|
69922
|
+
);
|
|
69907
69923
|
}
|
|
69908
69924
|
function fragmentArguments(config2, filepath, definition) {
|
|
69909
69925
|
const directives = definition.directives?.filter(
|
|
@@ -69994,6 +70010,7 @@ function collectWithArguments(config2, filepath, node, scope = {}) {
|
|
|
69994
70010
|
}
|
|
69995
70011
|
value = scope[value.name.value];
|
|
69996
70012
|
}
|
|
70013
|
+
value.loc = void 0;
|
|
69997
70014
|
args[arg.name.value] = {
|
|
69998
70015
|
...value,
|
|
69999
70016
|
loc: void 0
|
|
@@ -70114,9 +70131,7 @@ function serializeValue(value) {
|
|
|
70114
70131
|
}
|
|
70115
70132
|
if (typeof value === "object" && value !== null) {
|
|
70116
70133
|
return AST4.objectExpression(
|
|
70117
|
-
Object.entries(value).filter(
|
|
70118
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
70119
|
-
).map(([key, val]) => {
|
|
70134
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
70120
70135
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
70121
70136
|
})
|
|
70122
70137
|
);
|
|
@@ -76166,12 +76181,12 @@ async function packageJSON(targetPath, frameworkInfo) {
|
|
|
76166
76181
|
}
|
|
76167
76182
|
packageJSON2.devDependencies = {
|
|
76168
76183
|
...packageJSON2.devDependencies,
|
|
76169
|
-
houdini: "^1.2.
|
|
76184
|
+
houdini: "^1.2.22"
|
|
76170
76185
|
};
|
|
76171
76186
|
if (frameworkInfo.framework === "svelte" || frameworkInfo.framework === "kit") {
|
|
76172
76187
|
packageJSON2.devDependencies = {
|
|
76173
76188
|
...packageJSON2.devDependencies,
|
|
76174
|
-
"houdini-svelte": "^1.2.
|
|
76189
|
+
"houdini-svelte": "^1.2.22"
|
|
76175
76190
|
};
|
|
76176
76191
|
} else {
|
|
76177
76192
|
throw new Error(`Unmanaged framework: "${JSON.stringify(frameworkInfo)}"`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as graphql from 'graphql';
|
|
2
|
-
import type
|
|
2
|
+
import { type Config, type Document, type ValueMap } from '../../lib';
|
|
3
3
|
export default function fragmentVariables(config: Config, documents: Document[]): Promise<void>;
|
|
4
4
|
export declare function withArguments(config: Config, node: graphql.FragmentSpreadNode): graphql.ArgumentNode[];
|
|
5
5
|
export type FragmentArgument = {
|
|
@@ -58339,7 +58339,23 @@ function withArguments(config2, node) {
|
|
|
58339
58339
|
if (!withDirectives || withDirectives.length === 0) {
|
|
58340
58340
|
return [];
|
|
58341
58341
|
}
|
|
58342
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
58342
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
58343
|
+
}
|
|
58344
|
+
function removeLocKey(value) {
|
|
58345
|
+
if (typeof value !== "object" || value === null) {
|
|
58346
|
+
return value;
|
|
58347
|
+
}
|
|
58348
|
+
if (Array.isArray(value)) {
|
|
58349
|
+
return value.map(removeLocKey);
|
|
58350
|
+
}
|
|
58351
|
+
return Object.fromEntries(
|
|
58352
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
58353
|
+
if (key === "loc") {
|
|
58354
|
+
return [];
|
|
58355
|
+
}
|
|
58356
|
+
return [key, removeLocKey(fieldValue)];
|
|
58357
|
+
})
|
|
58358
|
+
);
|
|
58343
58359
|
}
|
|
58344
58360
|
function fragmentArguments(config2, filepath, definition) {
|
|
58345
58361
|
const directives = definition.directives?.filter(
|
|
@@ -58430,6 +58446,7 @@ function collectWithArguments(config2, filepath, node, scope = {}) {
|
|
|
58430
58446
|
}
|
|
58431
58447
|
value = scope[value.name.value];
|
|
58432
58448
|
}
|
|
58449
|
+
value.loc = void 0;
|
|
58433
58450
|
args[arg.name.value] = {
|
|
58434
58451
|
...value,
|
|
58435
58452
|
loc: void 0
|
|
@@ -58550,9 +58567,7 @@ function serializeValue(value) {
|
|
|
58550
58567
|
}
|
|
58551
58568
|
if (typeof value === "object" && value !== null) {
|
|
58552
58569
|
return AST4.objectExpression(
|
|
58553
|
-
Object.entries(value).filter(
|
|
58554
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58555
|
-
).map(([key, val]) => {
|
|
58570
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
58556
58571
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58557
58572
|
})
|
|
58558
58573
|
);
|
|
@@ -58338,7 +58338,23 @@ function withArguments(config2, node) {
|
|
|
58338
58338
|
if (!withDirectives || withDirectives.length === 0) {
|
|
58339
58339
|
return [];
|
|
58340
58340
|
}
|
|
58341
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
58341
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
58342
|
+
}
|
|
58343
|
+
function removeLocKey(value) {
|
|
58344
|
+
if (typeof value !== "object" || value === null) {
|
|
58345
|
+
return value;
|
|
58346
|
+
}
|
|
58347
|
+
if (Array.isArray(value)) {
|
|
58348
|
+
return value.map(removeLocKey);
|
|
58349
|
+
}
|
|
58350
|
+
return Object.fromEntries(
|
|
58351
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
58352
|
+
if (key === "loc") {
|
|
58353
|
+
return [];
|
|
58354
|
+
}
|
|
58355
|
+
return [key, removeLocKey(fieldValue)];
|
|
58356
|
+
})
|
|
58357
|
+
);
|
|
58342
58358
|
}
|
|
58343
58359
|
function fragmentArguments(config2, filepath, definition) {
|
|
58344
58360
|
const directives = definition.directives?.filter(
|
|
@@ -58429,6 +58445,7 @@ function collectWithArguments(config2, filepath, node, scope = {}) {
|
|
|
58429
58445
|
}
|
|
58430
58446
|
value = scope[value.name.value];
|
|
58431
58447
|
}
|
|
58448
|
+
value.loc = void 0;
|
|
58432
58449
|
args[arg.name.value] = {
|
|
58433
58450
|
...value,
|
|
58434
58451
|
loc: void 0
|
|
@@ -58549,9 +58566,7 @@ function serializeValue(value) {
|
|
|
58549
58566
|
}
|
|
58550
58567
|
if (typeof value === "object" && value !== null) {
|
|
58551
58568
|
return AST4.objectExpression(
|
|
58552
|
-
Object.entries(value).filter(
|
|
58553
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58554
|
-
).map(([key, val]) => {
|
|
58569
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
58555
58570
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58556
58571
|
})
|
|
58557
58572
|
);
|
package/build/test-cjs/index.js
CHANGED
|
@@ -58775,7 +58775,23 @@ function withArguments(config2, node) {
|
|
|
58775
58775
|
if (!withDirectives || withDirectives.length === 0) {
|
|
58776
58776
|
return [];
|
|
58777
58777
|
}
|
|
58778
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
58778
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
58779
|
+
}
|
|
58780
|
+
function removeLocKey(value) {
|
|
58781
|
+
if (typeof value !== "object" || value === null) {
|
|
58782
|
+
return value;
|
|
58783
|
+
}
|
|
58784
|
+
if (Array.isArray(value)) {
|
|
58785
|
+
return value.map(removeLocKey);
|
|
58786
|
+
}
|
|
58787
|
+
return Object.fromEntries(
|
|
58788
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
58789
|
+
if (key === "loc") {
|
|
58790
|
+
return [];
|
|
58791
|
+
}
|
|
58792
|
+
return [key, removeLocKey(fieldValue)];
|
|
58793
|
+
})
|
|
58794
|
+
);
|
|
58779
58795
|
}
|
|
58780
58796
|
function fragmentArguments(config2, filepath, definition) {
|
|
58781
58797
|
const directives = definition.directives?.filter(
|
|
@@ -58866,6 +58882,7 @@ function collectWithArguments(config2, filepath, node, scope = {}) {
|
|
|
58866
58882
|
}
|
|
58867
58883
|
value = scope[value.name.value];
|
|
58868
58884
|
}
|
|
58885
|
+
value.loc = void 0;
|
|
58869
58886
|
args[arg.name.value] = {
|
|
58870
58887
|
...value,
|
|
58871
58888
|
loc: void 0
|
|
@@ -58986,9 +59003,7 @@ function serializeValue(value) {
|
|
|
58986
59003
|
}
|
|
58987
59004
|
if (typeof value === "object" && value !== null) {
|
|
58988
59005
|
return AST4.objectExpression(
|
|
58989
|
-
Object.entries(value).filter(
|
|
58990
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58991
|
-
).map(([key, val]) => {
|
|
59006
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
58992
59007
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58993
59008
|
})
|
|
58994
59009
|
);
|
package/build/test-esm/index.js
CHANGED
|
@@ -58771,7 +58771,23 @@ function withArguments(config2, node) {
|
|
|
58771
58771
|
if (!withDirectives || withDirectives.length === 0) {
|
|
58772
58772
|
return [];
|
|
58773
58773
|
}
|
|
58774
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
58774
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
58775
|
+
}
|
|
58776
|
+
function removeLocKey(value) {
|
|
58777
|
+
if (typeof value !== "object" || value === null) {
|
|
58778
|
+
return value;
|
|
58779
|
+
}
|
|
58780
|
+
if (Array.isArray(value)) {
|
|
58781
|
+
return value.map(removeLocKey);
|
|
58782
|
+
}
|
|
58783
|
+
return Object.fromEntries(
|
|
58784
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
58785
|
+
if (key === "loc") {
|
|
58786
|
+
return [];
|
|
58787
|
+
}
|
|
58788
|
+
return [key, removeLocKey(fieldValue)];
|
|
58789
|
+
})
|
|
58790
|
+
);
|
|
58775
58791
|
}
|
|
58776
58792
|
function fragmentArguments(config2, filepath, definition) {
|
|
58777
58793
|
const directives = definition.directives?.filter(
|
|
@@ -58862,6 +58878,7 @@ function collectWithArguments(config2, filepath, node, scope = {}) {
|
|
|
58862
58878
|
}
|
|
58863
58879
|
value = scope[value.name.value];
|
|
58864
58880
|
}
|
|
58881
|
+
value.loc = void 0;
|
|
58865
58882
|
args[arg.name.value] = {
|
|
58866
58883
|
...value,
|
|
58867
58884
|
loc: void 0
|
|
@@ -58982,9 +58999,7 @@ function serializeValue(value) {
|
|
|
58982
58999
|
}
|
|
58983
59000
|
if (typeof value === "object" && value !== null) {
|
|
58984
59001
|
return AST4.objectExpression(
|
|
58985
|
-
Object.entries(value).filter(
|
|
58986
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
58987
|
-
).map(([key, val]) => {
|
|
59002
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
58988
59003
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
58989
59004
|
})
|
|
58990
59005
|
);
|
package/build/vite-cjs/index.js
CHANGED
|
@@ -71963,7 +71963,23 @@ function withArguments(config4, node) {
|
|
|
71963
71963
|
if (!withDirectives || withDirectives.length === 0) {
|
|
71964
71964
|
return [];
|
|
71965
71965
|
}
|
|
71966
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
71966
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
71967
|
+
}
|
|
71968
|
+
function removeLocKey(value) {
|
|
71969
|
+
if (typeof value !== "object" || value === null) {
|
|
71970
|
+
return value;
|
|
71971
|
+
}
|
|
71972
|
+
if (Array.isArray(value)) {
|
|
71973
|
+
return value.map(removeLocKey);
|
|
71974
|
+
}
|
|
71975
|
+
return Object.fromEntries(
|
|
71976
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
71977
|
+
if (key === "loc") {
|
|
71978
|
+
return [];
|
|
71979
|
+
}
|
|
71980
|
+
return [key, removeLocKey(fieldValue)];
|
|
71981
|
+
})
|
|
71982
|
+
);
|
|
71967
71983
|
}
|
|
71968
71984
|
function fragmentArguments(config4, filepath, definition) {
|
|
71969
71985
|
const directives = definition.directives?.filter(
|
|
@@ -72054,6 +72070,7 @@ function collectWithArguments(config4, filepath, node, scope = {}) {
|
|
|
72054
72070
|
}
|
|
72055
72071
|
value = scope[value.name.value];
|
|
72056
72072
|
}
|
|
72073
|
+
value.loc = void 0;
|
|
72057
72074
|
args[arg.name.value] = {
|
|
72058
72075
|
...value,
|
|
72059
72076
|
loc: void 0
|
|
@@ -72174,9 +72191,7 @@ function serializeValue(value) {
|
|
|
72174
72191
|
}
|
|
72175
72192
|
if (typeof value === "object" && value !== null) {
|
|
72176
72193
|
return AST4.objectExpression(
|
|
72177
|
-
Object.entries(value).filter(
|
|
72178
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
72179
|
-
).map(([key, val]) => {
|
|
72194
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
72180
72195
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
72181
72196
|
})
|
|
72182
72197
|
);
|
package/build/vite-esm/index.js
CHANGED
|
@@ -71958,7 +71958,23 @@ function withArguments(config4, node) {
|
|
|
71958
71958
|
if (!withDirectives || withDirectives.length === 0) {
|
|
71959
71959
|
return [];
|
|
71960
71960
|
}
|
|
71961
|
-
return withDirectives.flatMap((directive) => directive.arguments || []);
|
|
71961
|
+
return withDirectives.flatMap((directive) => removeLocKey(directive.arguments) || []);
|
|
71962
|
+
}
|
|
71963
|
+
function removeLocKey(value) {
|
|
71964
|
+
if (typeof value !== "object" || value === null) {
|
|
71965
|
+
return value;
|
|
71966
|
+
}
|
|
71967
|
+
if (Array.isArray(value)) {
|
|
71968
|
+
return value.map(removeLocKey);
|
|
71969
|
+
}
|
|
71970
|
+
return Object.fromEntries(
|
|
71971
|
+
Object.entries(value).map(([key, fieldValue]) => {
|
|
71972
|
+
if (key === "loc") {
|
|
71973
|
+
return [];
|
|
71974
|
+
}
|
|
71975
|
+
return [key, removeLocKey(fieldValue)];
|
|
71976
|
+
})
|
|
71977
|
+
);
|
|
71962
71978
|
}
|
|
71963
71979
|
function fragmentArguments(config4, filepath, definition) {
|
|
71964
71980
|
const directives = definition.directives?.filter(
|
|
@@ -72049,6 +72065,7 @@ function collectWithArguments(config4, filepath, node, scope = {}) {
|
|
|
72049
72065
|
}
|
|
72050
72066
|
value = scope[value.name.value];
|
|
72051
72067
|
}
|
|
72068
|
+
value.loc = void 0;
|
|
72052
72069
|
args[arg.name.value] = {
|
|
72053
72070
|
...value,
|
|
72054
72071
|
loc: void 0
|
|
@@ -72169,9 +72186,7 @@ function serializeValue(value) {
|
|
|
72169
72186
|
}
|
|
72170
72187
|
if (typeof value === "object" && value !== null) {
|
|
72171
72188
|
return AST4.objectExpression(
|
|
72172
|
-
Object.entries(value).filter(
|
|
72173
|
-
([key, value2]) => typeof value2 !== "undefined" && key !== "prev" && key !== "next"
|
|
72174
|
-
).map(([key, val]) => {
|
|
72189
|
+
Object.entries(value).filter(([key, value2]) => typeof value2 !== "undefined").map(([key, val]) => {
|
|
72175
72190
|
return AST4.objectProperty(AST4.stringLiteral(key), serializeValue(val));
|
|
72176
72191
|
})
|
|
72177
72192
|
);
|