@trackunit/react-graphql-tools 1.14.85 → 1.14.87

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,15 @@
1
+ ## 1.14.87 (2026-08-03)
2
+
3
+ ### 🧱 Updated Dependencies
4
+
5
+ - Updated react-vite-test-setup to 0.0.86
6
+
7
+ ## 1.14.86 (2026-08-03)
8
+
9
+ ### 🧱 Updated Dependencies
10
+
11
+ - Updated react-vite-test-setup to 0.0.85
12
+
1
13
  ## 1.14.85 (2026-07-31)
2
14
 
3
15
  ### 🧱 Updated Dependencies
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-graphql-tools",
3
- "version": "1.14.85",
3
+ "version": "1.14.87",
4
4
  "main": "src/index.js",
5
5
  "executors": "./executors.json",
6
6
  "generators": "./generators.json",
@@ -17,7 +17,8 @@
17
17
  "@faker-js/faker": "^8.4.1",
18
18
  "win-ca": "^3.5.1",
19
19
  "tslib": "^2.6.2",
20
- "@nx/devkit": "22.7.5"
20
+ "@nx/devkit": "23.1.0",
21
+ "@nx/js": "23.1.0"
21
22
  },
22
23
  "migrations": "./migrations.json",
23
24
  "types": "./src/index.d.ts",
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.generateHooks = void 0;
4
4
  const cli_1 = require("@graphql-codegen/cli");
5
+ const internal_1 = require("@nx/js/internal");
6
+ const node_path_1 = require("node:path");
5
7
  /**
6
8
  * Generates React hooks from your graphql files.
7
9
  *
@@ -28,8 +30,17 @@ const generateHooks = async (options) => {
28
30
  // eslint-disable-next-line no-console
29
31
  console.log(contextConfig);
30
32
  }
31
- const context = await (0, cli_1.createContext)(contextConfig);
32
- return await (0, cli_1.generate)(context);
33
+ // graphql-codegen loads codegen.ts through its own loader. Nx 23 leaves TypeScript to Node's
34
+ // native type stripping and no longer registers tsconfig-paths up front, so the workspace
35
+ // aliases codegen.ts imports only resolve once we register them ourselves.
36
+ const unregisterTsProject = (0, internal_1.registerTsProject)((0, node_path_1.join)(options.nxRoot, "tsconfig.base.json"));
37
+ try {
38
+ const context = await (0, cli_1.createContext)(contextConfig);
39
+ return await (0, cli_1.generate)(context);
40
+ }
41
+ finally {
42
+ unregisterTsProject();
43
+ }
33
44
  };
34
45
  exports.generateHooks = generateHooks;
35
46
  //# sourceMappingURL=generateHooks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"generateHooks.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/executors/createHooks/generateHooks.ts"],"names":[],"mappings":";;;AAAA,8CAA+D;AAC/D;;;;;;;;GAQG;AACI,MAAM,aAAa,GAAG,KAAK,EAAE,OAKnC,EAAE,EAAE;IACH,MAAM,aAAa,GAAG;QACpB,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,OAAO,CAAC,YAAY;QAC7B,MAAM,EAAE,OAAO,CAAC,eAAe;QAC/B,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,OAAO,CAAC,SAAS;QAC1B,KAAK,EAAE,OAAO,CAAC,SAAS;KACzB,CAAC;IACF,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC7B,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAa,EAAC,aAAa,CAAC,CAAC;IAEnD,OAAO,MAAM,IAAA,cAAQ,EAAC,OAAO,CAAC,CAAC;AACjC,CAAC,CAAC;AA1BW,QAAA,aAAa,iBA0BxB","sourcesContent":["import { createContext, generate } from \"@graphql-codegen/cli\";\n/**\n * Generates React hooks from your graphql files.\n *\n * @param options - The generation options.\n * @param options.codeGenFilePath - The path to the codegen file.\n * @param options.nxRoot - The nx root.\n * @param options.tsConfigPath - The path to the tsconfig file.\n * @param options.isVerbose - If true, will log more information.\n */\nexport const generateHooks = async (options: {\n codeGenFilePath: string;\n nxRoot: string;\n isVerbose?: boolean;\n tsConfigPath: string;\n}) => {\n const contextConfig = {\n watch: false,\n overwrite: true,\n silent: !options.isVerbose,\n errorsOnly: false,\n profile: false,\n project: options.tsConfigPath,\n config: options.codeGenFilePath,\n require: [],\n verbose: options.isVerbose,\n debug: options.isVerbose,\n };\n if (options.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(contextConfig);\n }\n\n const context = await createContext(contextConfig);\n\n return await generate(context);\n};\n"]}
1
+ {"version":3,"file":"generateHooks.js","sourceRoot":"","sources":["../../../../../../../libs/react/graphql-tools/src/executors/createHooks/generateHooks.ts"],"names":[],"mappings":";;;AAAA,8CAA+D;AAC/D,8CAAoD;AACpD,yCAAiC;AAEjC;;;;;;;;GAQG;AACI,MAAM,aAAa,GAAG,KAAK,EAAE,OAKnC,EAAE,EAAE;IACH,MAAM,aAAa,GAAG;QACpB,KAAK,EAAE,KAAK;QACZ,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,CAAC,OAAO,CAAC,SAAS;QAC1B,UAAU,EAAE,KAAK;QACjB,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,OAAO,CAAC,YAAY;QAC7B,MAAM,EAAE,OAAO,CAAC,eAAe;QAC/B,OAAO,EAAE,EAAE;QACX,OAAO,EAAE,OAAO,CAAC,SAAS;QAC1B,KAAK,EAAE,OAAO,CAAC,SAAS;KACzB,CAAC;IACF,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACtB,sCAAsC;QACtC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IAC7B,CAAC;IAED,6FAA6F;IAC7F,0FAA0F;IAC1F,2EAA2E;IAC3E,MAAM,mBAAmB,GAAG,IAAA,4BAAiB,EAAC,IAAA,gBAAI,EAAC,OAAO,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAE1F,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAa,EAAC,aAAa,CAAC,CAAC;QAEnD,OAAO,MAAM,IAAA,cAAQ,EAAC,OAAO,CAAC,CAAC;IACjC,CAAC;YAAS,CAAC;QACT,mBAAmB,EAAE,CAAC;IACxB,CAAC;AACH,CAAC,CAAC;AAnCW,QAAA,aAAa,iBAmCxB","sourcesContent":["import { createContext, generate } from \"@graphql-codegen/cli\";\nimport { registerTsProject } from \"@nx/js/internal\";\nimport { join } from \"node:path\";\n\n/**\n * Generates React hooks from your graphql files.\n *\n * @param options - The generation options.\n * @param options.codeGenFilePath - The path to the codegen file.\n * @param options.nxRoot - The nx root.\n * @param options.tsConfigPath - The path to the tsconfig file.\n * @param options.isVerbose - If true, will log more information.\n */\nexport const generateHooks = async (options: {\n codeGenFilePath: string;\n nxRoot: string;\n isVerbose?: boolean;\n tsConfigPath: string;\n}) => {\n const contextConfig = {\n watch: false,\n overwrite: true,\n silent: !options.isVerbose,\n errorsOnly: false,\n profile: false,\n project: options.tsConfigPath,\n config: options.codeGenFilePath,\n require: [],\n verbose: options.isVerbose,\n debug: options.isVerbose,\n };\n if (options.isVerbose) {\n // eslint-disable-next-line no-console\n console.log(contextConfig);\n }\n\n // graphql-codegen loads codegen.ts through its own loader. Nx 23 leaves TypeScript to Node's\n // native type stripping and no longer registers tsconfig-paths up front, so the workspace\n // aliases codegen.ts imports only resolve once we register them ourselves.\n const unregisterTsProject = registerTsProject(join(options.nxRoot, \"tsconfig.base.json\"));\n\n try {\n const context = await createContext(contextConfig);\n\n return await generate(context);\n } finally {\n unregisterTsProject();\n }\n};\n"]}