Skip to content

Commit a915aa5

Browse files
committed
refactor(core): rename default router to "member"
1 parent 146855f commit a915aa5

File tree

9 files changed

+16
-13
lines changed

9 files changed

+16
-13
lines changed

commitlint.config.cjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
module.exports = {
22
extends: ['@commitlint/config-conventional'],
33
rules: {
4-
'type-enum': [2, 'always', ['chore', 'docs', 'feat', 'fix', 'test']],
4+
'type-enum': [
5+
2,
6+
'always',
7+
['chore', 'docs', 'feat', 'fix', 'test', 'refactor'],
8+
],
59
'scope-empty': [2, 'never'],
610
'scope-enum': [
711
2,

docs/content/docs/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ From a consumer perspective there should be no direct breaking change from the p
88

99
### Architectural Changes
1010

11-
- This plugin now utilizes TypeDoc's [router](https://typedoc.org/documents/Options.Output.html#router) feature. This implementation replaces the now deprecated `"outputFileStrategy"` option. `"outputFileStrategy"` is still supported for now, but will now point to the "kind-structure" and "module" router keys respectively. Further details are contained in the documentation website.
11+
- This plugin now utilizes TypeDoc's [router](https://typedoc.org/documents/Options.Output.html#router) feature. This implementation replaces the now deprecated `"outputFileStrategy"` option. `"outputFileStrategy"` is still supported for now, but will now point to the "member" and "module" router keys respectively. Further details are contained in the documentation website.
1212
- Please note that separate strategies for output generation in different packages (when entryPointStrategy=packages) is no longer possible with this new architecture.
1313

1414
### Structural Changes

docs/content/docs/output-file-structure.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ This plugin now utilises this mechanism for output file generation.
1212

1313
The plugin ships with the following custom built-in routers:
1414

15-
### "kind-structure" (default)
15+
### "member" (default)
1616

1717
```json filename="typedoc.json"
1818
{
19-
"router": "kind-structure"
19+
"router": "member"
2020
}
2121
```
2222

2323
_Note: This is equivalent to the deprecated `outputFileStrategy="members"`._
2424

2525
Generates an individual file for each exported module member kind. Pages are grouped by kind within their respective module hierarchy.
2626

27-
This mirrors a combination of TypeDoc's `kind` and `structure` routers hence the name.
27+
This mirrors a combination of TypeDoc's `kind` and `structure` routers.
2828

2929
This is the default router of the plugin.
3030

packages/typedoc-plugin-markdown/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ From a consumer perspective there should be no direct breaking change from the p
88

99
### Architectural Changes
1010

11-
- This plugin now utilizes TypeDoc's [router](https://typedoc.org/documents/Options.Output.html#router) feature. This implementation replaces the now deprecated `"outputFileStrategy"` option. `"outputFileStrategy"` is still supported for now, but will now point to the "kind-structure" and "module" router keys respectively. Further details are contained in the documentation website.
11+
- This plugin now utilizes TypeDoc's [router](https://typedoc.org/documents/Options.Output.html#router) feature. This implementation replaces the now deprecated `"outputFileStrategy"` option. `"outputFileStrategy"` is still supported for now, but will now point to the "member" and "module" router keys respectively. Further details are contained in the documentation website.
1212
- Please note that separate strategies for output generation in different packages (when entryPointStrategy=packages) is no longer possible with this new architecture.
1313

1414
### Structural Changes

packages/typedoc-plugin-markdown/src/renderer/render.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,9 @@ function prepareRouter(renderer: Renderer) {
120120
if (renderer.application.options.isSet('outputFileStrategy')) {
121121
const outputFileStrategy =
122122
renderer.application.options.getValue('outputFileStrategy');
123-
routerOption =
124-
outputFileStrategy === 'modules' ? 'module' : 'kind-structure';
123+
routerOption = outputFileStrategy === 'modules' ? 'module' : 'member';
125124
} else {
126-
routerOption = 'kind-structure';
125+
routerOption = 'member';
127126
}
128127
}
129128

@@ -134,7 +133,7 @@ function prepareRouter(renderer: Renderer) {
134133
renderer.application.logger.error(
135134
i18n.router_0_is_not_defined_available_are_1(
136135
routerOption,
137-
['kind-structure', 'module'].join(', '),
136+
['member', 'module'].join(', '),
138137
),
139138
);
140139
return false;

packages/typedoc-plugin-markdown/src/renderer/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export function setupRenderer(app: Application) {
2424

2525
Object.defineProperty(app.renderer, 'routers', {
2626
value: new Map<string, new (app: Application) => MarkdownRouter>([
27-
['kind-structure', KindStructureRouter],
27+
['member', KindStructureRouter],
2828
['module', ModuleRouter],
2929
]),
3030
});

packages/typedoc-plugin-markdown/src/router/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* @module
55
*/
66
export * from './markdown-router.js';
7-
export * from './routers/kind-structure-router.js';
7+
export * from './routers/member-router.js';
88
export * from './routers/module-router.js';

packages/typedoc-plugin-markdown/test/fixtures/config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const config = {
5959
tableColumnSettings: {
6060
leftAlignHeaders: true,
6161
},
62-
router: 'kind-structure',
62+
router: 'member',
6363
blockTagsPreserveOrder: ['@deprecated', '@see'],
6464
},
6565
options: [

0 commit comments

Comments
 (0)