chore: Update typedoc-plugin-markdown

This commit is contained in:
Sidharth Vinod
2025-02-21 16:02:03 +05:30
parent 78c1d97f0f
commit 2c22e80dba
57 changed files with 1999 additions and 1939 deletions

View File

@@ -123,8 +123,8 @@
"rimraf": "^5.0.5",
"start-server-and-test": "^2.0.3",
"type-fest": "^4.13.1",
"typedoc": "^0.27.0",
"typedoc-plugin-markdown": "^3.17.1",
"typedoc": "^0.27.7",
"typedoc-plugin-markdown": "^4.4.2",
"typescript": "~5.7.0",
"unist-util-flatmap": "^1.0.0",
"unist-util-visit": "^5.0.0",

View File

@@ -84,7 +84,7 @@ describe('when parsing a gitGraph', function () {
const commits = db.getCommits();
expect(commits.size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('a commit');
expect(db.getCurrentBranch()).toBe('main');
});
@@ -246,7 +246,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -263,7 +263,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -281,7 +281,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual(['test']);
@@ -299,7 +299,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -317,7 +317,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -335,7 +335,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -353,7 +353,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('test commit');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -371,7 +371,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('test commit');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual([]);
@@ -389,7 +389,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -407,7 +407,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -425,7 +425,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).not.toBeNull();
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -443,7 +443,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -461,7 +461,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('test msg');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -480,7 +480,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('test msg');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -498,7 +498,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('test msg');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);
@@ -516,7 +516,7 @@ describe('when parsing a gitGraph', function () {
expect(db.getCurrentBranch()).toBe('main');
expect(db.getDirection()).toBe('LR');
expect(db.getBranches().size).toBe(1);
const key = commits.keys().next().value;
const key = commits.keys().next().value!;
expect(commits.get(key)?.message).toBe('test msg');
expect(commits.get(key)?.id).toBe('1111');
expect(commits.get(key)?.tags).toStrictEqual(['test tag']);

View File

@@ -1,7 +1,7 @@
import type { InfoFields, InfoDB } from './infoTypes.js';
import { version } from '../../../package.json';
import packageJson from '../../../package.json' assert { type: 'json' };
export const DEFAULT_INFO_DB: InfoFields = { version } as const;
export const DEFAULT_INFO_DB: InfoFields = { version: packageJson.version } as const;
export const getVersion = (): string => DEFAULT_INFO_DB.version;

View File

@@ -1,6 +1,6 @@
import type { MarkdownOptions } from 'vitepress';
import { defineConfig } from 'vitepress';
import { version } from '../../../package.json';
import packageJson from '../../../package.json' assert { type: 'json' };
import MermaidExample from './mermaid-markdown-all.js';
const allMarkdownTransformers: MarkdownOptions = {
@@ -95,7 +95,7 @@ function nav() {
activeMatch: '/announcements',
},
{
text: version,
text: packageJson.version,
items: [
{
text: 'Changelog',

View File

@@ -8,7 +8,7 @@ import { compile, serialize, stringify } from 'stylis';
// @ts-ignore: TODO Fix ts errors
import DOMPurify from 'dompurify';
import isEmpty from 'lodash-es/isEmpty.js';
import { version } from '../package.json';
import packageJson from '../package.json' assert { type: 'json' };
import { addSVGa11yTitleDescription, setA11yDiagramInfo } from './accessibility.js';
import assignWithDepth from './assignWithDepth.js';
import * as configApi from './config.js';
@@ -422,12 +422,12 @@ const render = async function (
// -------------------------------------------------------------------------------
// Draw the diagram with the renderer
try {
await diag.renderer.draw(text, id, version, diag);
await diag.renderer.draw(text, id, packageJson.version, diag);
} catch (e) {
if (config.suppressErrorRendering) {
removeTempElements();
} else {
errorRenderer.draw(text, id, version);
errorRenderer.draw(text, id, packageJson.version);
}
throw e;
}

View File

@@ -1,4 +1,5 @@
{
"$schema": "https://typedoc.org/schema.json",
"plugin": ["typedoc-plugin-markdown"],
"readme": "none",
"githubPages": false,
@@ -6,6 +7,5 @@
"gitRevision": "master",
"out": "src/docs/config/setup",
"entryPointStrategy": "expand",
"hideBreadcrumbs": true,
"hideInPageTOC": true
"hideBreadcrumbs": true
}