@takazudo/zudo-doc 5.26.4 → 5.26.5

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
@@ -8,6 +8,12 @@ The format is based on Keep a Changelog, and release notes are generated from th
8
8
 
9
9
  No unreleased changes.
10
10
 
11
+ ## [5.26.5] - 2026-09-23
12
+
13
+ ### Bug Fixes
14
+
15
+ - Fixed package-owned route injection in nested pnpm workspace consumers. Published route sources are staged under the project root so the build shadow can resolve the generated 404, robots, and docs routes (848264b9c).
16
+
11
17
  ## [5.26.4] - 2026-09-22
12
18
 
13
19
  ### Bug Fixes
@@ -1,6 +1,6 @@
1
1
  import { prepareHomeIntros } from "../home-intro/prepare.js";
2
2
  import { createRequire } from "node:module";
3
- import { existsSync, statSync, readFileSync } from "node:fs";
3
+ import { existsSync, statSync, readFileSync, cpSync, mkdirSync, rmSync } from "node:fs";
4
4
  import { dirname, basename, join } from "node:path";
5
5
  import { definePlugin } from "@takazudo/zfb/plugins";
6
6
  import { loadThemePackRegistry } from "../theme-packs-registry/load-registry.js";
@@ -326,6 +326,16 @@ const plugin = definePlugin({
326
326
  }
327
327
  }
328
328
  const require2 = createRequire(import.meta.url);
329
+ let stagedRoutesDir;
330
+ const stageRoutes = (routesSrcDir) => {
331
+ if (stagedRoutesDir) return stagedRoutesDir;
332
+ const dest = join(ctx.projectRoot, ".zudo-doc", "routes-src");
333
+ rmSync(dest, { recursive: true, force: true });
334
+ mkdirSync(dirname(dest), { recursive: true });
335
+ cpSync(routesSrcDir, dest, { recursive: true });
336
+ stagedRoutesDir = dest;
337
+ return dest;
338
+ };
329
339
  for (const route of derivedRoutes) {
330
340
  let resolvedEntrypoint;
331
341
  try {
@@ -338,7 +348,7 @@ const plugin = definePlugin({
338
348
  const routesSrcPath = join(routesSrcDir, tsxName);
339
349
  const srcPath = compiledPath.replace(/[\\/]dist[\\/]/, "/src/").replace(/\.js$/, ".tsx");
340
350
  if (existsSync(routesSrcPath)) {
341
- resolvedEntrypoint = routesSrcPath;
351
+ resolvedEntrypoint = /[\\/]node_modules[\\/]/.test(routesSrcPath) ? join(stageRoutes(routesSrcDir), tsxName) : routesSrcPath;
342
352
  } else if (existsSync(srcPath)) {
343
353
  resolvedEntrypoint = srcPath;
344
354
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takazudo/zudo-doc",
3
- "version": "5.26.4",
3
+ "version": "5.26.5",
4
4
  "type": "module",
5
5
  "description": "zudo-doc framework primitives layer that sits on top of zfb's engine — sidebar, theme, TOC, breadcrumb, layouts, head injection, View Transitions, SSR-skip wrappers (per ADR-003).",
6
6
  "license": "MIT",
@@ -771,7 +771,7 @@
771
771
  "typescript": "^5.0.0",
772
772
  "vitest": "^4.1.0",
773
773
  "zod": "^4.3.6",
774
- "@takazudo/zudo-doc-history-server": "5.26.4"
774
+ "@takazudo/zudo-doc-history-server": "5.26.5"
775
775
  },
776
776
  "scripts": {
777
777
  "gen:search-widget-script": "node scripts/gen-search-widget-script.mjs",