houdini-svelte 0.17.13 → 0.18.0
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/plugin/index.d.ts +1 -1
- package/build/plugin/naming.d.ts +5 -0
- package/build/plugin/transforms/query.d.ts +0 -1
- package/build/plugin-cjs/index.js +851 -704
- package/build/plugin-esm/index.js +851 -704
- package/build/preprocess-cjs/index.js +964 -813
- package/build/preprocess-esm/index.js +964 -813
- package/build/runtime-cjs/stores/query.js +3 -1
- package/build/runtime-esm/stores/query.js +3 -1
- package/build/test-cjs/index.js +1681 -1188
- package/build/test-esm/index.js +1681 -1188
- package/package.json +3 -3
- package/build/runtime-cjs/stores/pagination/pageInfo.test.js +0 -34
- package/build/runtime-esm/stores/pagination/pageInfo.test.js +0 -33
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "houdini-svelte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "The svelte plugin for houdini",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@kitql/helper": "^0.5.0",
|
|
22
|
-
"@sveltejs/kit": "1.0.0-next.
|
|
22
|
+
"@sveltejs/kit": "1.0.0-next.577",
|
|
23
23
|
"ast-types": "^0.15.1",
|
|
24
24
|
"estree-walker": "^3.0.1",
|
|
25
25
|
"graphql": "^15.8.0",
|
|
26
26
|
"minimatch": "^5.1.0",
|
|
27
27
|
"recast": "^0.21.5",
|
|
28
28
|
"svelte": "^3.52.0",
|
|
29
|
-
"houdini": "^0.
|
|
29
|
+
"houdini": "^0.18.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/minimatch": "^5.1.2",
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var import_vitest = require("vitest");
|
|
3
|
-
var import_pageInfo = require("./pageInfo");
|
|
4
|
-
(0, import_vitest.test)("can extract current page info", function() {
|
|
5
|
-
const data = {
|
|
6
|
-
user: {
|
|
7
|
-
friends: {
|
|
8
|
-
pageInfo: {
|
|
9
|
-
startCursor: "1",
|
|
10
|
-
endCursor: "2",
|
|
11
|
-
hasNextPage: true,
|
|
12
|
-
hasPreviousPage: false
|
|
13
|
-
},
|
|
14
|
-
edges: [
|
|
15
|
-
{
|
|
16
|
-
node: {
|
|
17
|
-
id: "1"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
const path = ["user", "friends"];
|
|
25
|
-
(0, import_vitest.expect)((0, import_pageInfo.extractPageInfo)(data, path)).toEqual(data.user.friends.pageInfo);
|
|
26
|
-
});
|
|
27
|
-
(0, import_vitest.test)("can count offset page size", function() {
|
|
28
|
-
const data = {
|
|
29
|
-
viewer: {
|
|
30
|
-
friends: [{}, {}, {}]
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
(0, import_vitest.expect)((0, import_pageInfo.countPage)(["viewer", "friends"], data)).toEqual(3);
|
|
34
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { test, expect } from "vitest";
|
|
2
|
-
import { extractPageInfo, countPage } from "./pageInfo";
|
|
3
|
-
test("can extract current page info", function() {
|
|
4
|
-
const data = {
|
|
5
|
-
user: {
|
|
6
|
-
friends: {
|
|
7
|
-
pageInfo: {
|
|
8
|
-
startCursor: "1",
|
|
9
|
-
endCursor: "2",
|
|
10
|
-
hasNextPage: true,
|
|
11
|
-
hasPreviousPage: false
|
|
12
|
-
},
|
|
13
|
-
edges: [
|
|
14
|
-
{
|
|
15
|
-
node: {
|
|
16
|
-
id: "1"
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
const path = ["user", "friends"];
|
|
24
|
-
expect(extractPageInfo(data, path)).toEqual(data.user.friends.pageInfo);
|
|
25
|
-
});
|
|
26
|
-
test("can count offset page size", function() {
|
|
27
|
-
const data = {
|
|
28
|
-
viewer: {
|
|
29
|
-
friends: [{}, {}, {}]
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
expect(countPage(["viewer", "friends"], data)).toEqual(3);
|
|
33
|
-
});
|