@tanstack/router-generator 1.166.34 → 1.166.36

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.
@@ -1,10 +1,8 @@
1
1
  require("../../_virtual/_rolldown/runtime.cjs");
2
- let node_url = require("node:url");
3
- let tsx_esm_api = require("tsx/esm/api");
2
+ let jiti = require("jiti");
4
3
  //#region src/filesystem/virtual/loadConfigFile.ts
5
4
  async function loadConfigFile(filePath) {
6
- const fileURL = (0, node_url.pathToFileURL)(filePath).href;
7
- return await (0, tsx_esm_api.tsImport)(fileURL, "./");
5
+ return await (0, jiti.createJiti)(filePath, { interopDefault: false }).import(filePath);
8
6
  }
9
7
  //#endregion
10
8
  exports.loadConfigFile = loadConfigFile;
@@ -1 +1 @@
1
- {"version":3,"file":"loadConfigFile.cjs","names":[],"sources":["../../../../src/filesystem/virtual/loadConfigFile.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url'\nimport { tsImport } from 'tsx/esm/api'\n\nexport async function loadConfigFile(filePath: string) {\n const fileURL = pathToFileURL(filePath).href\n const loaded = await tsImport(fileURL, './')\n return loaded\n}\n"],"mappings":";;;;AAGA,eAAsB,eAAe,UAAkB;CACrD,MAAM,WAAA,GAAA,SAAA,eAAwB,SAAS,CAAC;AAExC,QADe,OAAA,GAAA,YAAA,UAAe,SAAS,KAAK"}
1
+ {"version":3,"file":"loadConfigFile.cjs","names":[],"sources":["../../../../src/filesystem/virtual/loadConfigFile.ts"],"sourcesContent":["import { createJiti } from 'jiti'\n\nexport async function loadConfigFile(filePath: string) {\n const jiti = createJiti(filePath, { interopDefault: false })\n const loaded = await jiti.import<any>(filePath)\n return loaded\n}\n"],"mappings":";;;AAEA,eAAsB,eAAe,UAAkB;AAGrD,QADe,OAAA,GAAA,KAAA,YADS,UAAU,EAAE,gBAAgB,OAAO,CAAC,CAClC,OAAY,SAAS"}
@@ -1,9 +1,7 @@
1
- import { pathToFileURL } from "node:url";
2
- import { tsImport } from "tsx/esm/api";
1
+ import { createJiti } from "jiti";
3
2
  //#region src/filesystem/virtual/loadConfigFile.ts
4
3
  async function loadConfigFile(filePath) {
5
- const fileURL = pathToFileURL(filePath).href;
6
- return await tsImport(fileURL, "./");
4
+ return await createJiti(filePath, { interopDefault: false }).import(filePath);
7
5
  }
8
6
  //#endregion
9
7
  export { loadConfigFile };
@@ -1 +1 @@
1
- {"version":3,"file":"loadConfigFile.js","names":[],"sources":["../../../../src/filesystem/virtual/loadConfigFile.ts"],"sourcesContent":["import { pathToFileURL } from 'node:url'\nimport { tsImport } from 'tsx/esm/api'\n\nexport async function loadConfigFile(filePath: string) {\n const fileURL = pathToFileURL(filePath).href\n const loaded = await tsImport(fileURL, './')\n return loaded\n}\n"],"mappings":";;;AAGA,eAAsB,eAAe,UAAkB;CACrD,MAAM,UAAU,cAAc,SAAS,CAAC;AAExC,QADe,MAAM,SAAS,SAAS,KAAK"}
1
+ {"version":3,"file":"loadConfigFile.js","names":[],"sources":["../../../../src/filesystem/virtual/loadConfigFile.ts"],"sourcesContent":["import { createJiti } from 'jiti'\n\nexport async function loadConfigFile(filePath: string) {\n const jiti = createJiti(filePath, { interopDefault: false })\n const loaded = await jiti.import<any>(filePath)\n return loaded\n}\n"],"mappings":";;AAEA,eAAsB,eAAe,UAAkB;AAGrD,QADe,MADF,WAAW,UAAU,EAAE,gBAAgB,OAAO,CAAC,CAClC,OAAY,SAAS"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/router-generator",
3
- "version": "1.166.34",
3
+ "version": "1.166.36",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -50,18 +50,18 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@babel/types": "^7.28.5",
53
+ "jiti": "^2.6.1",
53
54
  "magic-string": "^0.30.21",
54
55
  "prettier": "^3.5.0",
55
- "tsx": "^4.19.2",
56
56
  "zod": "^3.24.2",
57
- "@tanstack/router-core": "1.168.16",
57
+ "@tanstack/router-core": "1.168.17",
58
58
  "@tanstack/router-utils": "1.161.7",
59
59
  "@tanstack/virtual-file-routes": "1.161.7"
60
60
  },
61
61
  "devDependencies": {
62
62
  "vite": "*",
63
63
  "@types/node": ">=20",
64
- "@tanstack/react-router": "1.168.24"
64
+ "@tanstack/react-router": "1.168.25"
65
65
  },
66
66
  "scripts": {
67
67
  "clean": "rimraf ./dist && rimraf ./coverage",
@@ -1,8 +1,7 @@
1
- import { pathToFileURL } from 'node:url'
2
- import { tsImport } from 'tsx/esm/api'
1
+ import { createJiti } from 'jiti'
3
2
 
4
3
  export async function loadConfigFile(filePath: string) {
5
- const fileURL = pathToFileURL(filePath).href
6
- const loaded = await tsImport(fileURL, './')
4
+ const jiti = createJiti(filePath, { interopDefault: false })
5
+ const loaded = await jiti.import<any>(filePath)
7
6
  return loaded
8
7
  }