typedoc-plugins
typedoc-plugins copied to clipboard
Implement hidden nodes blind
NOT READY FOR MERGE
Please merge https://github.com/KnodesCommunity/typedoc-plugins/pull/88 first
Some of this PR is actually from parent patch 88, and will disappear when it is merged
This is a blind attempt to implement HIDDEN nodes. It is highly suspect because the author could not build or test the result, and is new to this codebase.
A HIDDEN node is a node which will only render in the page tree if it's currently being viewed. (This behavior is known to currently be incorrect, and will be repaired before merge once buildable.)
The purpose of a HIDDEN node is to allow a category page to include hundreds of pages underneath, and not flood the index on the right. HIDDEN nodes must be found from a listing in another page, or through search.
My personal use case is for the documentation for a state machine library. I want to include more than 200 example state machines, each on their own page, which is prohibitive without a feature like this.
Please rebase your branch. You should be good to go now
@GerkinDev - I might be being dense, but, the repo doesn't show a push in the last couple weeks; maybe something didn't get pushed? Or maybe I'm not getting it
You're supposed to base features on the develop branch, not main. Main is for released code only.
oh you use git flow, ok, sorry
Sorry, no, the situation is unchanged, I believe.
Because I am noticably bad at things like rebasing and submodules, I established a new clean setup.
In this order, I:
- Created a new directory, and worked there
- Cloned your repo, instead of my own
- Updated submodules
- Initialized npm workspaces
- Switched to your repo's
developbranch, not my PR - Ran
npm install - Ran
npm run projects:build
The error is the same as previously, I believe.

john@DESKTOP-26H4050 MINGW64 /e/projects
$ mkdir tmp-host-copy
john@DESKTOP-26H4050 MINGW64 /e/projects
$ cd tmp-host-copy/
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy
$ git clone https://github.com/KnodesCommunity/typedoc-plugins.git
Cloning into 'typedoc-plugins'...
remote: Enumerating objects: 2026, done.
remote: Counting objects: 100% (470/470), done.
remote: Compressing objects: 100% (170/170), done.
Receiving objects: 100% (2026/2026), 1.22 MiB | 3.40 MiB/s, done.ed 1556
Resolving deltas: 100% (1316/1316), done.
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy
$ cd typedoc-plugins/
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy/typedoc-plugins (main)
$ git submodule update --init --recursive
Submodule 'typedoc' (https://github.com/TypeStrong/typedoc.git) registered for path 'typedoc'
Cloning into 'E:/projects/tmp-host-copy/typedoc-plugins/typedoc'...
Submodule path 'typedoc': checked out 'abed9a64d674c6c3b20284847c024abd5334547b'
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy/typedoc-plugins (main)
$ npm i --workspaces
> @knodes/[email protected] prepare
> npm run prepare:husky
> @knodes/[email protected] prepare:husky
> [ -d ./node_modules/husky ] && husky install || true
added 708 packages, and audited 714 packages in 40s
found 0 vulnerabilities
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy/typedoc-plugins (main)
$ git checkout develop
Switched to a new branch 'develop'
M typedoc
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy/typedoc-plugins (develop)
$ npm install
npm WARN deprecated @types/[email protected]: This is a stub types definition. concurrently provides its own type definitions, so you do not need this installed.
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: Moved to 'npm install @sideway/address'
npm WARN deprecated @hapi/[email protected]: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/[email protected]: Switch to 'npm install joi'
> @knodes/[email protected] prepare
> npm run prepare:husky
> @knodes/[email protected] prepare:husky
> [ -d ./node_modules/husky ] && husky install || true
husky - Git hooks installed
added 108 packages, removed 51 packages, changed 182 packages, and audited 771 packages in 32s
found 0 vulnerabilities
john@DESKTOP-26H4050 MINGW64 /e/projects/tmp-host-copy/typedoc-plugins (develop)
$ npm run projects:build
> @knodes/[email protected] projects:build
> npm run projects:patch -- apply && node ./tools/s-projects 'npm run build -- --pretty'
> @knodes/[email protected] projects:patch
> node ./tools/typedoc-patcher --no-stash "apply"
Applying patches from packages/plugin-pages/src/theme-plugins/search/default-pages-javascript-index-plugin.GENERATED.ts.patch
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert( match && match[1] )
at E:\projects\tmp-host-copy\typedoc-plugins\tools\typedoc-patcher.js:28:2
at async E:\projects\tmp-host-copy\typedoc-plugins\tools\typedoc-patcher.js:123:100
at async Promise.all (index 0)
at async E:\projects\tmp-host-copy\typedoc-plugins\tools\typedoc-patcher.js:123:31 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: true,
operator: '=='
}
Node.js v17.2.0
You've checked out typedoc before checking out the develop branch. So I'm not sure the typedoc submodule is at the expected commit to apply the patch.
So, I totally understand this "patch" thing is a hell. It is indeed. It should be simplified for a while when https://github.com/TypeStrong/typedoc/issues/1953 is resolved, until I need to follow the same pattern on another plugin (and I pray I won't)
You've checked out typedoc before checking out the develop branch. So I'm not sure the typedoc submodule is at the expected commit to apply the patch.
Wait, the ... the git submodules are different according to branches?
So, I totally understand this "patch" thing is a hell.
Honestly it's mostly the submodules that have been causing me trouble
no, the same build failure happens if i check out develop first
You've checked out typedoc before checking out the develop branch. So I'm not sure the typedoc submodule is at the expected commit to apply the patch.
Wait, the ... the git submodules are different according to branches?
Yes, it targets the latest typedoc stable release (currently 0.22.17) in order to avoid possibly regressing release as soon as typedoc updates one of the patched files.
Ok this is strange. I'll check on my windows tonight
ok, that fix appears to work
Hi there;
I'm finally looking for a way to implement this feature.