create-zudo-doc 5.26.5 → 5.27.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 +11 -0
- package/dist/scaffold.d.ts +1 -1
- package/dist/scaffold.js +10 -5
- package/package.json +1 -1
- package/templates/base/scripts/check-links.js +3 -39
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,17 @@ 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.27.0] - 2026-09-24
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
- Generated projects now check links to headings with escaped punctuation or code spans correctly (59d47f68a).
|
|
16
|
+
- New projects use the zfb 2.20.2 toolchain, which fixes injected-route dependency staging in workspace packages (e22acafdf).
|
|
17
|
+
|
|
18
|
+
### Other Changes
|
|
19
|
+
|
|
20
|
+
- Generated projects now pin `@takazudo/zudo-doc` and `@takazudo/zudo-doc-history-server` to `^5.27.0`.
|
|
21
|
+
|
|
11
22
|
## [5.26.5] - 2026-09-23
|
|
12
23
|
|
|
13
24
|
### Bug Fixes
|
package/dist/scaffold.d.ts
CHANGED
|
@@ -31,5 +31,5 @@ export declare function deriveDocSkillName(projectName: string): string;
|
|
|
31
31
|
*
|
|
32
32
|
* Bumped in lockstep by scripts/release-create-zudo-doc.sh.
|
|
33
33
|
*/
|
|
34
|
-
export declare const ZUDO_DOC_PIN = "^5.
|
|
34
|
+
export declare const ZUDO_DOC_PIN = "^5.27.0";
|
|
35
35
|
export declare function scaffold(choices: UserChoices): Promise<void>;
|
package/dist/scaffold.js
CHANGED
|
@@ -47,7 +47,7 @@ export function deriveDocSkillName(projectName) {
|
|
|
47
47
|
*
|
|
48
48
|
* Bumped in lockstep by scripts/release-create-zudo-doc.sh.
|
|
49
49
|
*/
|
|
50
|
-
export const ZUDO_DOC_PIN = "^5.
|
|
50
|
+
export const ZUDO_DOC_PIN = "^5.27.0";
|
|
51
51
|
/**
|
|
52
52
|
* Files in `templates/base/**` that must not be copied by the unconditional
|
|
53
53
|
* base mirror. Each entry is matched against the path relative to
|
|
@@ -802,9 +802,14 @@ function generatePackageJson(choices, localePlan) {
|
|
|
802
802
|
// limited to each package's own version field plus the five platform-binary
|
|
803
803
|
// `optionalDependencies` pins. No public API, export, config default, or
|
|
804
804
|
// engine requirement moves, so a fresh scaffold needs no config migration.
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
805
|
+
// 2.20.2: zfb fixes injected-route dependency staging for npm/pnpm workspace
|
|
806
|
+
// packages and preserves explicit symlink resolution. The companion
|
|
807
|
+
// package changelogs report no package-specific changes; md-wasm's tarball
|
|
808
|
+
// also changes its four published WASM artifacts. No scaffold config
|
|
809
|
+
// migration is required.
|
|
810
|
+
"@takazudo/zfb": "2.20.2",
|
|
811
|
+
"@takazudo/zfb-runtime": "2.20.2",
|
|
812
|
+
"@takazudo/zfb-md-wasm": "2.20.2",
|
|
808
813
|
// @takazudo/zudo-doc — published from this monorepo via
|
|
809
814
|
// .github/workflows/publish-zudo-doc.yml. The pin here is bumped in
|
|
810
815
|
// lockstep by scripts/release-create-zudo-doc.sh whenever zudo-doc's
|
|
@@ -937,7 +942,7 @@ function generatePackageJson(choices, localePlan) {
|
|
|
937
942
|
// `/exclude` at module scope from the always-bundled chrome graph; #3110
|
|
938
943
|
// moved compileExclude into @takazudo/zudo-doc, so projects with both
|
|
939
944
|
// docHistory and assetViewer off no longer need the package at all.
|
|
940
|
-
deps["@takazudo/zudo-doc-history-server"] = "^5.
|
|
945
|
+
deps["@takazudo/zudo-doc-history-server"] = "^5.27.0";
|
|
941
946
|
// tsx is no longer needed here: the relocated package plugin imports the
|
|
942
947
|
// runner directly (no `tsx -e` spawn) since the package ships compiled
|
|
943
948
|
// dist/ — package-first migration #2321 (#2337).
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { access, readFile, readdir, stat } from "node:fs/promises";
|
|
12
12
|
import { dirname, extname, join, relative, resolve } from "node:path";
|
|
13
13
|
import { fileURLToPath } from "node:url";
|
|
14
|
-
import {
|
|
14
|
+
import { extractAllHeadingIds } from "@takazudo/zudo-doc/extract-headings";
|
|
15
15
|
|
|
16
16
|
const CLI_USAGE = `Usage: pnpm check:links -- [options]
|
|
17
17
|
|
|
@@ -602,45 +602,9 @@ export function extractMdxFragmentLinks(content) {
|
|
|
602
602
|
return links;
|
|
603
603
|
}
|
|
604
604
|
|
|
605
|
-
|
|
606
|
-
return raw
|
|
607
|
-
.replace(/\[([^\]]*)\]\([^)]*\)/g, "$1")
|
|
608
|
-
.replace(/`([^`]+)`/g, "$1")
|
|
609
|
-
.replace(/\*\*([^*]+)\*\*/g, "$1")
|
|
610
|
-
.replace(/(?<![\w])__([^_]+)__(?![\w])/g, "$1")
|
|
611
|
-
.replace(/\*([^*]+)\*/g, "$1")
|
|
612
|
-
.replace(/(?<![\w])_([^_]+)_(?![\w])/g, "$1")
|
|
613
|
-
.trim();
|
|
614
|
-
}
|
|
615
|
-
|
|
605
|
+
/** Include h5/h6 targets and use the same text extraction as rendered TOC IDs. */
|
|
616
606
|
function allHierarchicalHeadingIds(body) {
|
|
617
|
-
|
|
618
|
-
const seen = new Map();
|
|
619
|
-
const stack = [];
|
|
620
|
-
let codeFenceOpener = null;
|
|
621
|
-
for (const line of body.split("\n")) {
|
|
622
|
-
const fence = /^([`~]{3,})/.exec(line.trimStart())?.[1];
|
|
623
|
-
if (fence !== undefined) {
|
|
624
|
-
if (codeFenceOpener === null) codeFenceOpener = fence;
|
|
625
|
-
else if (fence[0] === codeFenceOpener[0] && fence.length >= codeFenceOpener.length) codeFenceOpener = null;
|
|
626
|
-
continue;
|
|
627
|
-
}
|
|
628
|
-
if (codeFenceOpener !== null) continue;
|
|
629
|
-
const match = /^(#{2,6})[ \t]+(.+)$/.exec(line.trim());
|
|
630
|
-
if (match === null) continue;
|
|
631
|
-
const depth = match[1].length;
|
|
632
|
-
const base = slugify(headingText(match[2]));
|
|
633
|
-
if (base === "") continue;
|
|
634
|
-
while ((stack.at(-1)?.depth ?? -1) >= depth) stack.pop();
|
|
635
|
-
const parent = stack.at(-1);
|
|
636
|
-
const candidate = parent === undefined ? base : `${parent.id}-${base}`;
|
|
637
|
-
const count = seen.get(candidate) ?? 0;
|
|
638
|
-
seen.set(candidate, count + 1);
|
|
639
|
-
const id = count === 0 ? candidate : `${candidate}-${count}`;
|
|
640
|
-
stack.push({ depth, id });
|
|
641
|
-
ids.add(id);
|
|
642
|
-
}
|
|
643
|
-
return ids;
|
|
607
|
+
return new Set(extractAllHeadingIds(body));
|
|
644
608
|
}
|
|
645
609
|
|
|
646
610
|
function extractStaticMdxIds(body) {
|