From 7788b74beb849536bce0a564a58ca6a274d100e3 Mon Sep 17 00:00:00 2001 From: Gerkin Date: Sat, 28 May 2022 19:47:17 +0200 Subject: [PATCH 1/3] ci(renovate): don't automerge typedoc updates --- renovate.json5 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/renovate.json5 b/renovate.json5 index dd551f4c..ec969a70 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -24,5 +24,9 @@ "matchDatasources": ["npm"], "stabilityDays": 3 }, + { // Prevent automerge for typedoc updates + "matchPackagePatterns": ["typedoc"], + "automerge": false + }, ] } From 154fb37210657e96d6bfbc2073e4d77249301621 Mon Sep 17 00:00:00 2001 From: John Haugeland Date: Wed, 15 Jun 2022 11:18:08 -0700 Subject: [PATCH 2/3] Attempt to install git submodules automatically, set up workspaces automatically, and build once on install. Also, stub the standard build call to point to project build. Currently untested due to KnodesCommunity/typedoc-plugins#82 --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a98ada11..304381cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@knodes/typedoc-plugins", - "version": "0.22.5", + "version": "0.22.6", "description": "A monorepo containing all knodes-published TypeDoc plugins", "license": "MIT", "private": true, @@ -24,6 +24,8 @@ "./packages/*" ], "scripts": { + "postinstall": "git submodule update --init --recursive && npm i --workspaces && npm run projects:build", + "build": "npm run projects:build", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s", "docs": "typedoc", "format:pkg": "format-package --write", From d3993cfb18acffd7760568c856b4439a993c92fa Mon Sep 17 00:00:00 2001 From: John Haugeland Date: Wed, 15 Jun 2022 11:23:18 -0700 Subject: [PATCH 3/3] Highly suspect draft implementation of HIDDEN nodes, written without the ability to try it due to KnodesCommunity/typedoc-plugins#82 --- package.json | 2 +- .../theme-plugins/page-tree/a-page-tree-builder.spec.ts | 7 +++++++ .../src/theme-plugins/page-tree/a-page-tree-builder.ts | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 304381cc..378591c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@knodes/typedoc-plugins", - "version": "0.22.6", + "version": "0.22.7", "description": "A monorepo containing all knodes-published TypeDoc plugins", "license": "MIT", "private": true, diff --git a/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.spec.ts b/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.spec.ts index e7dcd089..0f9b1cf7 100644 --- a/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.spec.ts +++ b/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.spec.ts @@ -121,6 +121,13 @@ describe( APageTreeBuilder.name, () => { matchReflection( PageReflection, { name: 'Baz', depth: 0, module: testHost.project, sourceFilePath: 'baz.md', content: 'Baz content', url: 'baz.html' } ), ] ); } ); + it( 'should map hidden item', () => { + setVirtualFs( { + 'foo.md': 'Foo content' + } ); + const out = testHost.mapPagesToReflections( [ { title: 'HIDDEN', source: 'foo.md' } ] ); + expect( out ).toHaveLength( 1 ); + } ); it( 'should map page with children', () => { setVirtualFs( { 'foo.md': 'Foo content', diff --git a/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.ts b/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.ts index ff6ce013..7b0ef497 100644 --- a/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.ts +++ b/packages/plugin-pages/src/theme-plugins/page-tree/a-page-tree-builder.ts @@ -145,6 +145,12 @@ export abstract class APageTreeBuilder implements IPageTreeBuilder { } this.project.registerReflection( nodeReflection ); this.addNodeToProjectAsChild( nodeReflection ); + // strip a hidden node, but *after* adding its source to the project as a child + if( node.title === 'HIDDEN' ){ + return node.children ? + this._mapPagesToReflections( node.children, parent, childrenIO ) : + []; + } const children = node.children ? this._mapPagesToReflections( node.children,