@trackunit/react-graphql-tools 1.20.11 → 1.21.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 1.21.0 (2026-10-20)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated iris-app-build-utilities to 2.8.0
|
|
6
|
+
- Updated react-vite-test-setup to 0.0.170
|
|
7
|
+
|
|
8
|
+
## 1.20.12 (2026-10-19)
|
|
9
|
+
|
|
10
|
+
### 🧱 Updated Dependencies
|
|
11
|
+
|
|
12
|
+
- Updated iris-app-build-utilities to 2.7.12
|
|
13
|
+
- Updated react-vite-test-setup to 0.0.169
|
|
14
|
+
|
|
1
15
|
## 1.20.11 (2026-10-19)
|
|
2
16
|
|
|
3
17
|
### 🧱 Updated Dependencies
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-graphql-tools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"executors": "./executors.json",
|
|
6
6
|
"generators": "./generators.json",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
"@graphql-codegen/client-preset": "^4.5.1",
|
|
15
15
|
"prettier": "^3.4.2",
|
|
16
16
|
"ts-morph": "^20.0.0",
|
|
17
|
-
"@faker-js/faker": "^
|
|
17
|
+
"@faker-js/faker": "^10.5.0",
|
|
18
18
|
"win-ca": "^3.5.1",
|
|
19
19
|
"tslib": "^2.6.2",
|
|
20
20
|
"@nx/devkit": "23.1.0",
|
|
21
21
|
"@nx/js": "23.1.0",
|
|
22
|
-
"@trackunit/iris-app-build-utilities": "2.
|
|
22
|
+
"@trackunit/iris-app-build-utilities": "2.8.0",
|
|
23
23
|
"graphql": "^16.10.0"
|
|
24
24
|
},
|
|
25
25
|
"migrations": "./migrations.json",
|
|
@@ -6,6 +6,9 @@ const faker_1 = require("@faker-js/faker");
|
|
|
6
6
|
const ts_morph_1 = require("ts-morph");
|
|
7
7
|
const collectPermissions_1 = require("./collectPermissions");
|
|
8
8
|
const UNDEFINED_SENTINEL = "__UNDEFINED__";
|
|
9
|
+
// faker v9 switched the default randomizer to 53-bit precision. The 32-bit Mersenne Twister keeps
|
|
10
|
+
// seeded values identical to faker v8 so regenerating doesn't churn every committed mock.ts.
|
|
11
|
+
const faker = new faker_1.Faker({ locale: [faker_1.en], randomizer: (0, faker_1.generateMersenne32Randomizer)() });
|
|
9
12
|
/**
|
|
10
13
|
* Strips surrounding double-quotes from a ts-morph property name.
|
|
11
14
|
* Codegen may emit JSON-style keys (`"kind"`) whose getName() includes the quotes.
|
|
@@ -84,11 +87,11 @@ const generateDefaultFromInputType = (type, sourceFile, depth = 0) => {
|
|
|
84
87
|
return type.getText() === "true";
|
|
85
88
|
const typeText = type.getText();
|
|
86
89
|
if (typeText === "string" || typeText === "number" || typeText === "boolean") {
|
|
87
|
-
|
|
90
|
+
faker.seed(123);
|
|
88
91
|
if (typeText === "string")
|
|
89
|
-
return
|
|
92
|
+
return faker.lorem.word();
|
|
90
93
|
if (typeText === "number")
|
|
91
|
-
return
|
|
94
|
+
return faker.number.int();
|
|
92
95
|
return false;
|
|
93
96
|
}
|
|
94
97
|
return UNDEFINED_SENTINEL;
|
|
@@ -216,7 +219,7 @@ const serializeToSource = (value, indent = 0) => {
|
|
|
216
219
|
};
|
|
217
220
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
218
221
|
const generateMockFromType = (type, text) => {
|
|
219
|
-
|
|
222
|
+
faker.seed(123);
|
|
220
223
|
// type aliases are not working well so using text here.
|
|
221
224
|
const rightSideText = text.substring(text.indexOf(":") + 1).trim();
|
|
222
225
|
if (rightSideText.startsWith("DateTimeISOString")) {
|
|
@@ -236,10 +239,10 @@ const generateMockFromType = (type, text) => {
|
|
|
236
239
|
return type.compilerType.value === "true";
|
|
237
240
|
}
|
|
238
241
|
if (type.getText() === "string") {
|
|
239
|
-
return
|
|
242
|
+
return faker.lorem.word();
|
|
240
243
|
}
|
|
241
244
|
if (type.getText() === "number") {
|
|
242
|
-
return
|
|
245
|
+
return faker.number.int();
|
|
243
246
|
}
|
|
244
247
|
if (type.getText() === "Date" || type.getText() === "DateTime") {
|
|
245
248
|
return "2023-01-22T15:08:12.527Z";
|