From eb7510b26a2a4b18cfddb76bdd0fe0d1ed2702a2 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 27 Jan 2024 15:41:36 -0700 Subject: [PATCH 01/30] Correct custom theme docs, #2490 --- internal-docs/custom-themes.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/internal-docs/custom-themes.md b/internal-docs/custom-themes.md index fcbbd97a0..77249f6cb 100644 --- a/internal-docs/custom-themes.md +++ b/internal-docs/custom-themes.md @@ -19,7 +19,7 @@ TypeDoc's default analytics helper with one that uses [Open Web Analytics](https Google Analytics. This could be done with the following theme: ```tsx -import { Application, DefaultTheme, PageEvent, JSX } from "typedoc"; +import { Application, DefaultTheme, PageEvent, JSX, Reflection } from "typedoc"; const script = ` (function() { @@ -48,13 +48,8 @@ class MyThemeContext extends DefaultThemeRenderContext { } class MyTheme extends DefaultTheme { - private _contextCache?: MyThemeContext; - override getRenderContext() { - this._contextCache ||= new MyThemeContext( - this._markedPlugin, - this.application.options, - ); - return this._contextCache; + getRenderContext(pageEvent: PageEvent) { + return new MyThemeContext(this, pageEvent, this.application.options); } } From e76d59414c5d0570943cb4a0265f91cf428333ed Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 6 Feb 2024 20:12:37 -0700 Subject: [PATCH 02/30] Fix crash when class implements itself Resolves #2495 --- CHANGELOG.md | 1 + .../output/themes/default/templates/hierarchy.tsx | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b59d6069..4224c42f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Bug Fixes - Fixed an issue where a namespace would not be created for merged function-namespaces which are declared as variables, #2478. +- A class which implements itself will no longer cause a crash when rendering HTML, #2495. - Variable functions which have construct signatures will no longer be converted as functions, ignoring the construct signatures. - Fixed an issue where, if the index section was collapsed when loading the page, all content within it would be hidden until expanded, and a member visibility checkbox was changed. diff --git a/src/lib/output/themes/default/templates/hierarchy.tsx b/src/lib/output/themes/default/templates/hierarchy.tsx index ccc1fdf06..f741aeab8 100644 --- a/src/lib/output/themes/default/templates/hierarchy.tsx +++ b/src/lib/output/themes/default/templates/hierarchy.tsx @@ -3,7 +3,14 @@ import type { PageEvent } from "../../../events"; import { JSX } from "../../../../utils"; import { ReflectionKind, type ProjectReflection, DeclarationReflection } from "../../../../models"; -function fullHierarchy(context: DefaultThemeRenderContext, root: DeclarationReflection) { +function fullHierarchy( + context: DefaultThemeRenderContext, + root: DeclarationReflection, + seen = new Set(), +) { + if (seen.has(root)) return; + seen.add(root); + // Note: We don't use root.anchor for the anchor, because those are built on a per page basis. // And classes/interfaces get their own page, so all the anchors will be empty anyways. // Full name should be safe here, since this list only includes classes/interfaces. @@ -16,10 +23,10 @@ function fullHierarchy(context: DefaultThemeRenderContext, root: DeclarationRefl
    {root.implementedBy?.map((child) => { - return child.reflection && fullHierarchy(context, child.reflection as DeclarationReflection); + return child.reflection && fullHierarchy(context, child.reflection as DeclarationReflection, seen); })} {root.extendedBy?.map((child) => { - return child.reflection && fullHierarchy(context, child.reflection as DeclarationReflection); + return child.reflection && fullHierarchy(context, child.reflection as DeclarationReflection, seen); })}
From 285b537677335a4664ad702fe0a891ceef577afd Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 6 Feb 2024 20:18:42 -0700 Subject: [PATCH 03/30] Add a test --- src/test/converter2/issues/gh2495.ts | 9 +++++++++ src/test/issues.c2.test.ts | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 src/test/converter2/issues/gh2495.ts diff --git a/src/test/converter2/issues/gh2495.ts b/src/test/converter2/issues/gh2495.ts new file mode 100644 index 000000000..f143f5f63 --- /dev/null +++ b/src/test/converter2/issues/gh2495.ts @@ -0,0 +1,9 @@ +export interface IAnimal { + name: number; +} + +export interface IFish extends IAnimal { + maxDepth: number; +} + +export class IFish implements IFish {} diff --git a/src/test/issues.c2.test.ts b/src/test/issues.c2.test.ts index cb3a7b1a3..59f3d3b59 100644 --- a/src/test/issues.c2.test.ts +++ b/src/test/issues.c2.test.ts @@ -28,6 +28,7 @@ import { } from "./programs"; import { TestLogger } from "./TestLogger"; import { getComment, getLinks, query, querySig } from "./utils"; +import { DefaultTheme, PageEvent } from ".."; const base = getConverter2Base(); const app = getConverter2App(); @@ -1372,4 +1373,14 @@ describe("Issue Tests", () => { equal(project.children[0].children?.map((c) => c.name), ["Options"]); }); + + it("Does not crash when rendering recursive hierarchy, #2495", () => { + const project = convert(); + + const theme = new DefaultTheme(app.renderer); + const page = new PageEvent("hierarchy", project); + page.project = project; + const context = theme.getRenderContext(page); + context.hierarchyTemplate(page); + }); }); From d26f76f4f7c979479337bf9018a0e22326a7d4c0 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 9 Feb 2024 10:57:36 -0700 Subject: [PATCH 04/30] Add support for `@groupDescription` and `@categoryDescription` Resolves #2494. --- CHANGELOG.md | 4 + example/src/classes/CancellablePromise.ts | 6 ++ example/src/index.ts | 6 ++ src/index.ts | 7 ++ src/lib/converter/plugins/CategoryPlugin.ts | 31 ++++++- src/lib/converter/plugins/GroupPlugin.ts | 27 +++++- .../converter/plugins/LinkResolverPlugin.ts | 45 +++++++++- src/lib/models/ReflectionCategory.ts | 23 ++++- src/lib/models/ReflectionGroup.ts | 22 ++++- src/lib/models/comments/comment.ts | 57 +++++++++++- .../output/themes/default/partials/index.tsx | 13 ++- src/lib/serialization/schema.ts | 5 +- src/lib/utils/events.ts | 2 + src/lib/utils/options/tsdoc-defaults.ts | 4 +- src/test/behavior.c2.test.ts | 13 +++ src/test/converter/comment/comment.ts | 3 + src/test/converter/comment/specs.json | 22 +++-- .../behavior/categoryInheritance.ts | 4 + src/test/converter2/behavior/groupTag.ts | 10 +++ src/test/models/comment.test.ts | 86 +++++++++++++++++++ tsdoc.json | 10 +++ 21 files changed, 376 insertions(+), 24 deletions(-) create mode 100644 src/test/models/comment.test.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 4224c42f1..e1f65e0e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - Added support for the `@class` tag. When added to a comment on a variable or function, TypeDoc will convert the member as a class, #2479. Note: This should only be used on symbols which actually represent a class, but are not declared as a class for some reason. +## Features + +- Added support for `@groupDescription` and `@categoryDescription` to provide a description of groups and categories, #2494. + ## Bug Fixes - Fixed an issue where a namespace would not be created for merged function-namespaces which are declared as variables, #2478. diff --git a/example/src/classes/CancellablePromise.ts b/example/src/classes/CancellablePromise.ts index 53057b4ed..12427f9a5 100644 --- a/example/src/classes/CancellablePromise.ts +++ b/example/src/classes/CancellablePromise.ts @@ -42,6 +42,12 @@ function isPromiseWithCancel(value: unknown): value is PromiseWithCancel { * [real-cancellable-promise](https://github.com/srmagura/real-cancellable-promise). * * @typeParam T what the `CancellablePromise` resolves to + * + * @groupDescription Methods + * Descriptions can be added for groups with `@groupDescription`, which will show up in + * the index where groups are listed. This works for both manually created groups which + * are created with `@group`, and implicit groups like the `Methods` group that this + * description is attached to. */ export class CancellablePromise { /** diff --git a/example/src/index.ts b/example/src/index.ts index f1e900adb..9d7d76b88 100644 --- a/example/src/index.ts +++ b/example/src/index.ts @@ -1,3 +1,9 @@ +/** + * @packageDocumentation + * @categoryDescription Component + * React Components -- This description is added with the `@categoryDescription` tag + * on the entry point in src/index.ts + */ export * from "./functions"; export * from "./variables"; export * from "./types"; diff --git a/src/index.ts b/src/index.ts index 7bad26177..1cb656319 100644 --- a/src/index.ts +++ b/src/index.ts @@ -4,6 +4,13 @@ export { EventDispatcher, Event } from "./lib/utils/events"; export { resetReflectionID } from "./lib/models/reflections/abstract"; /** * All symbols documented under the Models namespace are also available in the root import. + * + * @categoryDescription Types + * Describes a TypeScript type. + * + * @categoryDescription Reflections + * Describes a documentation entry. The root entry is a {@link ProjectReflection} + * and contains {@link DeclarationReflection} instances. */ export * as Models from "./lib/models"; /** diff --git a/src/lib/converter/plugins/CategoryPlugin.ts b/src/lib/converter/plugins/CategoryPlugin.ts index d91de7dc0..106b053a6 100644 --- a/src/lib/converter/plugins/CategoryPlugin.ts +++ b/src/lib/converter/plugins/CategoryPlugin.ts @@ -7,7 +7,7 @@ import { ReflectionCategory } from "../../models"; import { Component, ConverterComponent } from "../components"; import { Converter } from "../converter"; import type { Context } from "../context"; -import { Option, getSortFunction } from "../../utils"; +import { Option, getSortFunction, removeIf } from "../../utils"; /** * A handler that sorts and categorizes the found reflections in the resolving phase. @@ -113,7 +113,10 @@ export class CategoryPlugin extends ConverterComponent { obj.groups.forEach((group) => { if (group.categories) return; - group.categories = this.getReflectionCategories(group.children); + group.categories = this.getReflectionCategories( + obj, + group.children, + ); if (group.categories && group.categories.length > 1) { group.categories.sort(CategoryPlugin.sortCatCallback); } else if ( @@ -130,7 +133,7 @@ export class CategoryPlugin extends ConverterComponent { if (!obj.children || obj.children.length === 0 || obj.categories) { return; } - obj.categories = this.getReflectionCategories(obj.children); + obj.categories = this.getReflectionCategories(obj, obj.children); if (obj.categories && obj.categories.length > 1) { obj.categories.sort(CategoryPlugin.sortCatCallback); } else if ( @@ -151,6 +154,7 @@ export class CategoryPlugin extends ConverterComponent { * @returns An array containing all children of the given reflection categorized */ private getReflectionCategories( + parent: ContainerReflection, reflections: DeclarationReflection[], ): ReflectionCategory[] { const categories = new Map(); @@ -174,6 +178,27 @@ export class CategoryPlugin extends ConverterComponent { } } + if (parent.comment) { + removeIf(parent.comment.blockTags, (tag) => { + if (tag.tag === "@categoryDescription") { + const { header, body } = Comment.splitPartsToHeaderAndBody( + tag.content, + ); + const cat = categories.get(header); + if (cat) { + cat.description = body; + } else { + this.application.logger.warn( + `Comment for ${parent.getFriendlyFullName()} includes @categoryDescription for "${header}", but no child is placed in that category.`, + ); + } + + return true; + } + return false; + }); + } + for (const cat of categories.values()) { this.sortFunction(cat.children); } diff --git a/src/lib/converter/plugins/GroupPlugin.ts b/src/lib/converter/plugins/GroupPlugin.ts index f92cefd32..b1e997987 100644 --- a/src/lib/converter/plugins/GroupPlugin.ts +++ b/src/lib/converter/plugins/GroupPlugin.ts @@ -101,7 +101,10 @@ export class GroupPlugin extends ConverterComponent { ) { this.sortFunction(reflection.children); } - reflection.groups = this.getReflectionGroups(reflection.children); + reflection.groups = this.getReflectionGroups( + reflection, + reflection.children, + ); } } @@ -162,6 +165,7 @@ export class GroupPlugin extends ConverterComponent { * @returns An array containing all children of the given reflection grouped by their kind. */ getReflectionGroups( + parent: ContainerReflection, reflections: DeclarationReflection[], ): ReflectionGroup[] { const groups = new Map(); @@ -178,6 +182,27 @@ export class GroupPlugin extends ConverterComponent { } }); + if (parent.comment) { + removeIf(parent.comment.blockTags, (tag) => { + if (tag.tag === "@groupDescription") { + const { header, body } = Comment.splitPartsToHeaderAndBody( + tag.content, + ); + const cat = groups.get(header); + if (cat) { + cat.description = body; + } else { + this.application.logger.warn( + `Comment for ${parent.getFriendlyFullName()} includes @groupDescription for "${header}", but no child is placed in that group.`, + ); + } + + return true; + } + return false; + }); + } + return Array.from(groups.values()).sort(GroupPlugin.sortGroupCallback); } diff --git a/src/lib/converter/plugins/LinkResolverPlugin.ts b/src/lib/converter/plugins/LinkResolverPlugin.ts index 148118161..85ba48b88 100644 --- a/src/lib/converter/plugins/LinkResolverPlugin.ts +++ b/src/lib/converter/plugins/LinkResolverPlugin.ts @@ -2,7 +2,13 @@ import { Component, ConverterComponent } from "../components"; import type { Context, ExternalResolveResult } from "../../converter"; import { ConverterEvents } from "../converter-events"; import { Option, ValidationOptions } from "../../utils"; -import { DeclarationReflection, ProjectReflection } from "../../models"; +import { + ContainerReflection, + DeclarationReflection, + ProjectReflection, + Reflection, + ReflectionCategory, +} from "../../models"; import { discoverAllReferenceTypes } from "../../utils/reflections"; import { ApplicationEvents } from "../../application-events"; @@ -45,6 +51,31 @@ export class LinkResolverPlugin extends ConverterComponent { reflection, ); } + + if (reflection instanceof ContainerReflection) { + if (reflection.groups) { + for (const group of reflection.groups) { + if (group.description) { + group.description = this.owner.resolveLinks( + group.description, + reflection, + ); + } + + if (group.categories) { + for (const cat of group.categories) { + this.resolveCategoryLinks(cat, reflection); + } + } + } + } + + if (reflection.categories) { + for (const cat of reflection.categories) { + this.resolveCategoryLinks(cat, reflection); + } + } + } } if (project.readme) { @@ -75,4 +106,16 @@ export class LinkResolverPlugin extends ConverterComponent { } } } + + private resolveCategoryLinks( + category: ReflectionCategory, + owner: Reflection, + ) { + if (category.description) { + category.description = this.owner.resolveLinks( + category.description, + owner, + ); + } + } } diff --git a/src/lib/models/ReflectionCategory.ts b/src/lib/models/ReflectionCategory.ts index 42351f60e..fea87de0d 100644 --- a/src/lib/models/ReflectionCategory.ts +++ b/src/lib/models/ReflectionCategory.ts @@ -1,4 +1,8 @@ -import type { DeclarationReflection } from "."; +import { + Comment, + type CommentDisplayPart, + type DeclarationReflection, +} from "."; import type { Serializer, JSONOutput, Deserializer } from "../serialization"; /** @@ -14,6 +18,11 @@ export class ReflectionCategory { */ title: string; + /** + * The user specified description, if any, set with `@categoryDescription` + */ + description?: CommentDisplayPart[]; + /** * All reflections of this category. */ @@ -35,9 +44,12 @@ export class ReflectionCategory { return this.children.every((child) => child.hasOwnDocument); } - toObject(_serializer: Serializer): JSONOutput.ReflectionCategory { + toObject(serializer: Serializer): JSONOutput.ReflectionCategory { return { title: this.title, + description: this.description + ? Comment.serializeDisplayParts(serializer, this.description) + : undefined, children: this.children.length > 0 ? this.children.map((child) => child.id) @@ -46,6 +58,13 @@ export class ReflectionCategory { } fromObject(de: Deserializer, obj: JSONOutput.ReflectionCategory) { + if (obj.description) { + this.description = Comment.deserializeDisplayParts( + de, + obj.description, + ); + } + if (obj.children) { de.defer((project) => { for (const childId of obj.children || []) { diff --git a/src/lib/models/ReflectionGroup.ts b/src/lib/models/ReflectionGroup.ts index eb3479b3e..300b13e32 100644 --- a/src/lib/models/ReflectionGroup.ts +++ b/src/lib/models/ReflectionGroup.ts @@ -1,5 +1,10 @@ import { ReflectionCategory } from "./ReflectionCategory"; -import type { DeclarationReflection, Reflection } from "."; +import { + Comment, + type CommentDisplayPart, + type DeclarationReflection, + type Reflection, +} from "."; import type { Serializer, JSONOutput, Deserializer } from "../serialization"; /** @@ -15,6 +20,11 @@ export class ReflectionGroup { */ title: string; + /** + * User specified description via `@groupDescription`, if specified. + */ + description?: CommentDisplayPart[]; + /** * All reflections of this group. */ @@ -48,6 +58,9 @@ export class ReflectionGroup { toObject(serializer: Serializer): JSONOutput.ReflectionGroup { return { title: this.title, + description: this.description + ? Comment.serializeDisplayParts(serializer, this.description) + : undefined, children: this.children.length > 0 ? this.children.map((child) => child.id) @@ -57,6 +70,13 @@ export class ReflectionGroup { } fromObject(de: Deserializer, obj: JSONOutput.ReflectionGroup) { + if (obj.description) { + this.description = Comment.deserializeDisplayParts( + de, + obj.description, + ); + } + if (obj.categories) { this.categories = obj.categories.map((catObj) => { const cat = new ReflectionCategory(catObj.title); diff --git a/src/lib/models/comments/comment.ts b/src/lib/models/comments/comment.ts index abefe74dd..26096448d 100644 --- a/src/lib/models/comments/comment.ts +++ b/src/lib/models/comments/comment.ts @@ -194,7 +194,7 @@ export class Comment { /** * Helper utility to clone {@link Comment.summary} or {@link CommentTag.content} */ - static cloneDisplayParts(parts: CommentDisplayPart[]) { + static cloneDisplayParts(parts: readonly CommentDisplayPart[]) { return parts.map((p) => ({ ...p })); } @@ -304,6 +304,61 @@ export class Comment { return result; } + /** + * Splits the provided parts into a header (first line, as a string) + * and body (remaining lines). If the header line contains inline tags + * they will be serialized to a string. + */ + static splitPartsToHeaderAndBody(parts: readonly CommentDisplayPart[]): { + header: string; + body: CommentDisplayPart[]; + } { + let index = parts.findIndex((part): boolean => { + switch (part.kind) { + case "text": + case "code": + return part.text.includes("\n"); + case "inline-tag": + return false; + } + }); + + if (index === -1) { + return { + header: Comment.combineDisplayParts(parts), + body: [], + }; + } + + // Do not split a code block, stop the header at the end of the previous block + if (parts[index].kind === "code") { + --index; + } + + if (index === -1) { + return { header: "", body: Comment.cloneDisplayParts(parts) }; + } + + let header = Comment.combineDisplayParts(parts.slice(0, index)); + const split = parts[index].text.indexOf("\n"); + + let body: CommentDisplayPart[]; + if (split === -1) { + header += parts[index].text; + body = Comment.cloneDisplayParts(parts.slice(index + 1)); + } else { + header += parts[index].text.substring(0, split); + body = Comment.cloneDisplayParts(parts.slice(index)); + body[0].text = body[0].text.substring(split + 1); + } + + if (!body[0].text) { + body.shift(); + } + + return { header: header.trim(), body }; + } + /** * The content of the comment which is not associated with a block tag. */ diff --git a/src/lib/output/themes/default/partials/index.tsx b/src/lib/output/themes/default/partials/index.tsx index 654ff27b9..a68058234 100644 --- a/src/lib/output/themes/default/partials/index.tsx +++ b/src/lib/output/themes/default/partials/index.tsx @@ -1,16 +1,21 @@ import { classNames, renderName } from "../../lib"; import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext"; -import { JSX } from "../../../../utils"; -import type { ContainerReflection, ReflectionCategory } from "../../../../models"; +import { JSX, Raw } from "../../../../utils"; +import type { ContainerReflection, ReflectionCategory, ReflectionGroup } from "../../../../models"; function renderCategory( - { urlTo, icons, getReflectionClasses }: DefaultThemeRenderContext, - item: ReflectionCategory, + { urlTo, icons, getReflectionClasses, markdown }: DefaultThemeRenderContext, + item: ReflectionCategory | ReflectionGroup, prependName = "", ) { return (

{prependName ? `${prependName} - ${item.title}` : item.title}

+ {item.description && ( +
+ +
+ )}
{item.children.map((item) => ( <> diff --git a/src/lib/serialization/schema.ts b/src/lib/serialization/schema.ts index 1cf7f34ee..ce4f19e83 100644 --- a/src/lib/serialization/schema.ts +++ b/src/lib/serialization/schema.ts @@ -103,11 +103,12 @@ export interface ReflectionSymbolId { } export interface ReflectionGroup - extends S { + extends S { children?: M.ReflectionGroup["children"][number]["id"][]; } -export interface ReflectionCategory extends S { +export interface ReflectionCategory + extends S { children?: M.ReflectionCategory["children"][number]["id"][]; } diff --git a/src/lib/utils/events.ts b/src/lib/utils/events.ts index d53d55099..102785738 100644 --- a/src/lib/utils/events.ts +++ b/src/lib/utils/events.ts @@ -7,6 +7,8 @@ // The Events object is a typesafe conversion of Backbones Events object: // https://github.com/jashkenas/backbone/blob/05fde9e201f7e2137796663081105cd6dad12a98/backbone.js#L119-L374 +// Priority: Higher number makes the listener be called earlier. + const uniqueId = (function () { const prefixes: Record = Object.create(null); return function (prefix: string) { diff --git a/src/lib/utils/options/tsdoc-defaults.ts b/src/lib/utils/options/tsdoc-defaults.ts index c562cf438..9ae30e874 100644 --- a/src/lib/utils/options/tsdoc-defaults.ts +++ b/src/lib/utils/options/tsdoc-defaults.ts @@ -1,4 +1,4 @@ -// If updating these lists, also see .config/typedoc-default.tsdoc.json +// If updating these lists, also update tsdoc.json export const tsdocBlockTags = [ "@deprecated", @@ -16,7 +16,9 @@ export const blockTags = [ "@module", "@inheritDoc", "@group", + "@groupDescription", "@category", + "@categoryDescription", // Alias for @typeParam "@template", // Because TypeScript is important! diff --git a/src/test/behavior.c2.test.ts b/src/test/behavior.c2.test.ts index c72cd45a8..9ce77f850 100644 --- a/src/test/behavior.c2.test.ts +++ b/src/test/behavior.c2.test.ts @@ -518,6 +518,13 @@ describe("Behavior Tests", () => { "With Spaces", ]); + equal( + project.groups?.map((g) => + Comment.combineDisplayParts(g.description), + ), + ["Variables desc", "A description", "", "With spaces desc"], + ); + equal( project.groups.map((g) => g.children), [[D], [A, B], [B], [C]], @@ -539,6 +546,12 @@ describe("Behavior Tests", () => { const project = convert("categoryInheritance"); const cls = query(project, "Cls"); equal(cls.categories?.map((g) => g.title), ["Cat", "Other"]); + equal( + cls.categories?.map((g) => + Comment.combineDisplayParts(g.description), + ), + ["Cat desc", ""], + ); equal( cls.categories.map((g) => g.children), [[query(project, "Cls.prop")], [query(project, "Cls.constructor")]], diff --git a/src/test/converter/comment/comment.ts b/src/test/converter/comment/comment.ts index c6a3d2d9a..8f84e9263 100644 --- a/src/test/converter/comment/comment.ts +++ b/src/test/converter/comment/comment.ts @@ -28,6 +28,9 @@ import "./comment2"; * @todo something * * @type {Data} will also be removed + * + * @groupDescription Methods + * Methods description! */ export class CommentedClass { /** diff --git a/src/test/converter/comment/specs.json b/src/test/converter/comment/specs.json index 67458dcbd..81789794b 100644 --- a/src/test/converter/comment/specs.json +++ b/src/test/converter/comment/specs.json @@ -85,9 +85,9 @@ "sources": [ { "fileName": "comment.ts", - "line": 36, + "line": 39, "character": 4, - "url": "typedoc://comment.ts#L36" + "url": "typedoc://comment.ts#L39" } ], "type": { @@ -104,9 +104,9 @@ "sources": [ { "fileName": "comment.ts", - "line": 76, + "line": 79, "character": 4, - "url": "typedoc://comment.ts#L76" + "url": "typedoc://comment.ts#L79" } ], "signatures": [ @@ -127,9 +127,9 @@ "sources": [ { "fileName": "comment.ts", - "line": 76, + "line": 79, "character": 4, - "url": "typedoc://comment.ts#L76" + "url": "typedoc://comment.ts#L79" } ], "parameters": [ @@ -179,6 +179,12 @@ }, { "title": "Methods", + "description": [ + { + "kind": "text", + "text": "Methods description!" + } + ], "children": [ 19 ] @@ -187,9 +193,9 @@ "sources": [ { "fileName": "comment.ts", - "line": 32, + "line": 35, "character": 13, - "url": "typedoc://comment.ts#L32" + "url": "typedoc://comment.ts#L35" } ] } diff --git a/src/test/converter2/behavior/categoryInheritance.ts b/src/test/converter2/behavior/categoryInheritance.ts index ad31e6272..c41431405 100644 --- a/src/test/converter2/behavior/categoryInheritance.ts +++ b/src/test/converter2/behavior/categoryInheritance.ts @@ -1,3 +1,7 @@ +/** + * @categoryDescription Cat + * Cat desc + */ export interface Int { /** @category Cat */ prop: string; diff --git a/src/test/converter2/behavior/groupTag.ts b/src/test/converter2/behavior/groupTag.ts index f6a636732..f698649b0 100644 --- a/src/test/converter2/behavior/groupTag.ts +++ b/src/test/converter2/behavior/groupTag.ts @@ -1,3 +1,13 @@ +/** + * @groupDescription Variables + * Variables desc + * @groupDescription A + * A description + * @groupDescription With Spaces + * With spaces desc + * @module + */ + /** * @group A */ diff --git a/src/test/models/comment.test.ts b/src/test/models/comment.test.ts new file mode 100644 index 000000000..3cbdb735a --- /dev/null +++ b/src/test/models/comment.test.ts @@ -0,0 +1,86 @@ +import { deepStrictEqual as equal } from "assert"; +import { Comment, CommentDisplayPart } from "../../index"; + +describe("Comment.combineDisplayParts", () => { + it("Handles text and code", () => { + const parts: CommentDisplayPart[] = [ + { kind: "text", text: "a" }, + { kind: "code", text: "`b`" }, + ]; + equal(Comment.combineDisplayParts(parts), "a`b`"); + }); + + it("Handles inline tags", () => { + const parts: CommentDisplayPart[] = [ + { kind: "inline-tag", text: "`b`", tag: "@test" }, + ]; + equal(Comment.combineDisplayParts(parts), "{@test `b`}"); + }); +}); + +describe("Comment.splitPartsToHeaderAndBody", () => { + it("Handles a simple case", () => { + const parts: CommentDisplayPart[] = [{ kind: "text", text: "a\nb" }]; + + equal(Comment.splitPartsToHeaderAndBody(parts), { + header: "a", + body: [{ kind: "text", text: "b" }], + }); + }); + + it("Refuses to split a code block", () => { + const parts: CommentDisplayPart[] = [{ kind: "code", text: "`a\nb`" }]; + + equal(Comment.splitPartsToHeaderAndBody(parts), { + header: "", + body: [{ kind: "code", text: "`a\nb`" }], + }); + }); + + it("Handles a newline in a code block after text", () => { + const parts: CommentDisplayPart[] = [ + { kind: "text", text: "Header" }, + { kind: "code", text: "`a\nb`" }, + ]; + + equal(Comment.splitPartsToHeaderAndBody(parts), { + header: "Header", + body: [{ kind: "code", text: "`a\nb`" }], + }); + }); + + it("Handles header consisting of multiple display parts", () => { + const parts: CommentDisplayPart[] = [ + { kind: "text", text: "Header" }, + { kind: "text", text: " more " }, + { kind: "text", text: "text\nbody" }, + ]; + + equal(Comment.splitPartsToHeaderAndBody(parts), { + header: "Header more text", + body: [{ kind: "text", text: "body" }], + }); + }); + + it("Handles empty body", () => { + const parts: CommentDisplayPart[] = [ + { kind: "text", text: "Header\n" }, + ]; + + equal(Comment.splitPartsToHeaderAndBody(parts), { + header: "Header", + body: [], + }); + }); + + it("Trims the header text", () => { + const parts: CommentDisplayPart[] = [ + { kind: "text", text: "Header \n" }, + ]; + + equal(Comment.splitPartsToHeaderAndBody(parts), { + header: "Header", + body: [], + }); + }); +}); diff --git a/tsdoc.json b/tsdoc.json index b9c6d049e..5e5590ec3 100644 --- a/tsdoc.json +++ b/tsdoc.json @@ -31,11 +31,21 @@ "syntaxKind": "block", "allowMultiple": true }, + { + "tagName": "@groupDescription", + "syntaxKind": "block", + "allowMultiple": true + }, { "tagName": "@category", "syntaxKind": "block", "allowMultiple": true }, + { + "tagName": "@categoryDescription", + "syntaxKind": "block", + "allowMultiple": true + }, { "tagName": "@hidden", "syntaxKind": "modifier" From f5f31b0b41e0e729b3dd59ce26398e2c991eb6e7 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 9 Feb 2024 14:57:24 -0700 Subject: [PATCH 05/30] Expose `Context.getNodeComment`, #2498 --- CHANGELOG.md | 4 +--- src/lib/converter/comments/discovery.ts | 23 +++++++++++++++++++++++ src/lib/converter/comments/index.ts | 18 ++++++++++++++++++ src/lib/converter/context.ts | 12 ++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1f65e0e4..a5c90bc74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,8 @@ - Added a new `--sitemapBaseUrl` option. When specified, TypeDoc will generate a `sitemap.xml` in your output folder that describes the site, #2480. - Added support for the `@class` tag. When added to a comment on a variable or function, TypeDoc will convert the member as a class, #2479. Note: This should only be used on symbols which actually represent a class, but are not declared as a class for some reason. - -## Features - - Added support for `@groupDescription` and `@categoryDescription` to provide a description of groups and categories, #2494. +- Exposed `Context.getNodeComment` for plugin use, #2498. ## Bug Fixes diff --git a/src/lib/converter/comments/discovery.ts b/src/lib/converter/comments/discovery.ts index 86ed6f234..2a15f4a99 100644 --- a/src/lib/converter/comments/discovery.ts +++ b/src/lib/converter/comments/discovery.ts @@ -133,6 +133,29 @@ export function discoverFileComment( } } +export function discoverNodeComment( + node: ts.Node, + commentStyle: CommentStyle, +): DiscoveredComment | undefined { + const text = node.getSourceFile().text; + const comments = collectCommentRanges( + ts.getLeadingCommentRanges(text, node.pos), + ); + comments.reverse(); + + const selectedDocComment = comments.find((ranges) => + permittedRange(text, ranges, commentStyle), + ); + + if (selectedDocComment) { + return { + file: node.getSourceFile(), + ranges: selectedDocComment, + jsDoc: findJsDocForComment(node, selectedDocComment), + }; + } +} + export function discoverComment( symbol: ts.Symbol, kind: ReflectionKind, diff --git a/src/lib/converter/comments/index.ts b/src/lib/converter/comments/index.ts index c162751af..da7b776db 100644 --- a/src/lib/converter/comments/index.ts +++ b/src/lib/converter/comments/index.ts @@ -10,6 +10,7 @@ import { DiscoveredComment, discoverComment, discoverFileComment, + discoverNodeComment, discoverSignatureComment, } from "./discovery"; import { lexLineComments } from "./lineLexer"; @@ -171,6 +172,23 @@ export function getComment( return comment; } +export function getNodeComment( + node: ts.Node, + kind: ReflectionKind, + config: CommentParserConfig, + logger: Logger, + commentStyle: CommentStyle, + checker: ts.TypeChecker | undefined, +) { + return getCommentImpl( + discoverNodeComment(node, commentStyle), + config, + logger, + kind === ReflectionKind.Module, + checker, + ); +} + export function getFileComment( file: ts.SourceFile, config: CommentParserConfig, diff --git a/src/lib/converter/context.ts b/src/lib/converter/context.ts index 63beb4be4..aa4c8f3b7 100644 --- a/src/lib/converter/context.ts +++ b/src/lib/converter/context.ts @@ -18,6 +18,7 @@ import { getComment, getFileComment, getJsDocComment, + getNodeComment, getSignatureComment, } from "./comments"; import { getHumanName } from "../utils/tsutils"; @@ -270,6 +271,17 @@ export class Context { ); } + getNodeComment(node: ts.Node, kind: ReflectionKind) { + return getNodeComment( + node, + kind, + this.converter.config, + this.logger, + this.converter.commentStyle, + this.converter.useTsLinkResolution ? this.checker : undefined, + ); + } + getFileComment(node: ts.SourceFile) { return getFileComment( node, From b6c5801be4a50dca1c5be0e9ddd3944f2ed94778 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 9 Feb 2024 15:05:17 -0700 Subject: [PATCH 06/30] Fix duplicate programs on context --- CHANGELOG.md | 1 + src/lib/converter/converter.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5c90bc74..dfb312213 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ - A class which implements itself will no longer cause a crash when rendering HTML, #2495. - Variable functions which have construct signatures will no longer be converted as functions, ignoring the construct signatures. - Fixed an issue where, if the index section was collapsed when loading the page, all content within it would be hidden until expanded, and a member visibility checkbox was changed. +- `Context.programs` will no longer contain duplicates, #2498. ## v0.25.7 (2024-01-08) diff --git a/src/lib/converter/converter.ts b/src/lib/converter/converter.ts index 445f3880c..08efaaeb9 100644 --- a/src/lib/converter/converter.ts +++ b/src/lib/converter/converter.ts @@ -13,7 +13,7 @@ import { import { Context } from "./context"; import { ConverterComponent } from "./components"; import { Component, ChildableComponent } from "../utils/component"; -import { Option, MinimalSourceFile, readFile } from "../utils"; +import { Option, MinimalSourceFile, readFile, unique } from "../utils"; import { convertType } from "./types"; import { ConverterEvents } from "./converter-events"; import { convertSymbol } from "./symbols"; @@ -222,7 +222,7 @@ export class Converter extends ChildableComponent< convert( entryPoints: readonly DocumentationEntryPoint[], ): ProjectReflection { - const programs = entryPoints.map((e) => e.program); + const programs = unique(entryPoints.map((e) => e.program)); this.externalPatternCache = void 0; const project = new ProjectReflection( From ece4f31e12c49dfad5aa1aa2b782f6ab5b092010 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 9 Feb 2024 15:21:39 -0700 Subject: [PATCH 07/30] Fix circular dep --- src/lib/models/ReflectionCategory.ts | 7 ++----- src/lib/models/ReflectionGroup.ts | 8 ++------ 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/lib/models/ReflectionCategory.ts b/src/lib/models/ReflectionCategory.ts index fea87de0d..ae07a5fe5 100644 --- a/src/lib/models/ReflectionCategory.ts +++ b/src/lib/models/ReflectionCategory.ts @@ -1,8 +1,5 @@ -import { - Comment, - type CommentDisplayPart, - type DeclarationReflection, -} from "."; +import { Comment } from "./comments"; +import type { CommentDisplayPart, DeclarationReflection } from "."; import type { Serializer, JSONOutput, Deserializer } from "../serialization"; /** diff --git a/src/lib/models/ReflectionGroup.ts b/src/lib/models/ReflectionGroup.ts index 300b13e32..2f56d164d 100644 --- a/src/lib/models/ReflectionGroup.ts +++ b/src/lib/models/ReflectionGroup.ts @@ -1,10 +1,6 @@ import { ReflectionCategory } from "./ReflectionCategory"; -import { - Comment, - type CommentDisplayPart, - type DeclarationReflection, - type Reflection, -} from "."; +import { Comment } from "./comments"; +import type { CommentDisplayPart, DeclarationReflection, Reflection } from "."; import type { Serializer, JSONOutput, Deserializer } from "../serialization"; /** From 23189493e36f8e134ae4d3ebd76191f65d15772c Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 9 Feb 2024 15:37:01 -0700 Subject: [PATCH 08/30] Include all base classes Resolves #2486 --- CHANGELOG.md | 5 +-- .../output/themes/default/DefaultTheme.tsx | 18 ++--------- .../themes/default/templates/hierarchy.tsx | 10 ++---- src/lib/output/themes/lib.tsx | 31 +++++++++++++++++++ 4 files changed, 39 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfb312213..f8f2d3469 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,16 @@ - Added support for the `@class` tag. When added to a comment on a variable or function, TypeDoc will convert the member as a class, #2479. Note: This should only be used on symbols which actually represent a class, but are not declared as a class for some reason. - Added support for `@groupDescription` and `@categoryDescription` to provide a description of groups and categories, #2494. -- Exposed `Context.getNodeComment` for plugin use, #2498. +- API: Exposed `Context.getNodeComment` for plugin use, #2498. ## Bug Fixes - Fixed an issue where a namespace would not be created for merged function-namespaces which are declared as variables, #2478. - A class which implements itself will no longer cause a crash when rendering HTML, #2495. - Variable functions which have construct signatures will no longer be converted as functions, ignoring the construct signatures. +- The class hierarchy page will now include classes whose base class is not included in the documentation, #2486. - Fixed an issue where, if the index section was collapsed when loading the page, all content within it would be hidden until expanded, and a member visibility checkbox was changed. -- `Context.programs` will no longer contain duplicates, #2498. +- API: `Context.programs` will no longer contain duplicates, #2498. ## v0.25.7 (2024-01-08) diff --git a/src/lib/output/themes/default/DefaultTheme.tsx b/src/lib/output/themes/default/DefaultTheme.tsx index 301f8d6cf..192ae6a13 100644 --- a/src/lib/output/themes/default/DefaultTheme.tsx +++ b/src/lib/output/themes/default/DefaultTheme.tsx @@ -16,7 +16,7 @@ import type { PageEvent } from "../../events"; import type { MarkedPlugin } from "../../plugins"; import { DefaultThemeRenderContext } from "./DefaultThemeRenderContext"; import { JSX } from "../../../utils"; -import { classNames, getDisplayName, toStyleClass } from "../lib"; +import { classNames, getDisplayName, getHierarchyRoots, toStyleClass } from "../lib"; /** * Defines a mapping of a {@link Models.Kind} to a template file. @@ -155,7 +155,7 @@ export class DefaultTheme extends Theme { urls.push(new UrlMapping("index.html", project, this.indexTemplate)); } - if (includeHierarchyPage(project)) { + if (getHierarchyRoots(project).length) { urls.push(new UrlMapping("hierarchy.html", project, this.hierarchyTemplate)); } @@ -465,17 +465,3 @@ function shouldShowGroups(reflection: Reflection, opts: { includeCategories: boo } return reflection.comment?.hasModifier("@showGroups") === true; } - -function includeHierarchyPage(project: ProjectReflection) { - for (const id in project.reflections) { - const refl = project.reflections[id] as DeclarationReflection; - - if (refl.kindOf(ReflectionKind.ClassOrInterface)) { - // Keep this condition in sync with the one in hierarchy.tsx for determining roots - if (!(refl.implementedTypes || refl.extendedTypes) && (refl.implementedBy || refl.extendedBy)) { - return true; - } - } - } - return false; -} diff --git a/src/lib/output/themes/default/templates/hierarchy.tsx b/src/lib/output/themes/default/templates/hierarchy.tsx index f741aeab8..ee8fbcb1c 100644 --- a/src/lib/output/themes/default/templates/hierarchy.tsx +++ b/src/lib/output/themes/default/templates/hierarchy.tsx @@ -1,7 +1,8 @@ import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext"; import type { PageEvent } from "../../../events"; import { JSX } from "../../../../utils"; -import { ReflectionKind, type ProjectReflection, DeclarationReflection } from "../../../../models"; +import { getHierarchyRoots } from "../../lib"; +import type { DeclarationReflection, ProjectReflection } from "../../../../models"; function fullHierarchy( context: DefaultThemeRenderContext, @@ -34,15 +35,10 @@ function fullHierarchy( } export function hierarchyTemplate(context: DefaultThemeRenderContext, props: PageEvent) { - // Keep this condition in sync with the one in DefaultTheme.tsx - const roots = (props.project.getReflectionsByKind(ReflectionKind.ClassOrInterface) as DeclarationReflection[]) - .filter((refl) => !(refl.implementedTypes || refl.extendedTypes) && (refl.implementedBy || refl.extendedBy)) - .sort((a, b) => a.name.localeCompare(b.name)); - return ( <>

Class Hierarchy

- {roots.map((root) => ( + {getHierarchyRoots(props.project).map((root) => (
    {fullHierarchy(context, root)}
))} diff --git a/src/lib/output/themes/lib.tsx b/src/lib/output/themes/lib.tsx index ec7dbb12a..4c1605521 100644 --- a/src/lib/output/themes/lib.tsx +++ b/src/lib/output/themes/lib.tsx @@ -157,3 +157,34 @@ export function renderName(refl: Reflection) { return wbr(refl.name); } + +export function getHierarchyRoots(project: ProjectReflection): DeclarationReflection[] { + const allClasses = project.getReflectionsByKind(ReflectionKind.ClassOrInterface) as DeclarationReflection[]; + + const roots = allClasses.filter((refl) => { + // If nobody extends this class, there's no possible hierarchy to display. + if (!refl.implementedBy && !refl.extendedBy) { + return false; + } + + // If we don't extend anything, then we are a root + if (!refl.implementedTypes && !refl.extendedTypes) { + return true; + } + + // We might still be a root, if our extended/implemented types are not included + // in the documentation. + const types = [...(refl.implementedTypes || []), ...(refl.extendedTypes || [])]; + + return types.every( + (type) => + !type.visit({ + reference(ref) { + return ref.reflection !== undefined; + }, + }), + ); + }); + + return roots.sort((a, b) => a.name.localeCompare(b.name)); +} From 20b98dbe0b1cd7455723da1edf6834ddc8d2b777 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 9 Feb 2024 15:41:00 -0700 Subject: [PATCH 09/30] Bump version to 0.25.8 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 71585aeab..cdcfb8a28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typedoc", - "version": "0.25.7", + "version": "0.25.8", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "typedoc", - "version": "0.25.7", + "version": "0.25.8", "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", diff --git a/package.json b/package.json index 9c48a90ca..f2a30d66e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.25.7", + "version": "0.25.8", "homepage": "https://typedoc.org", "exports": { ".": "./dist/index.js", From 33db59c052ccbfeeffab1b637689c05723a65710 Mon Sep 17 00:00:00 2001 From: TypeDoc Bot Date: Fri, 9 Feb 2024 22:47:08 +0000 Subject: [PATCH 10/30] Update changelog for release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8f2d3469..28408b88e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +## v0.25.8 (2024-02-09) + ## Features - Added a new `--sitemapBaseUrl` option. When specified, TypeDoc will generate a `sitemap.xml` in your output folder that describes the site, #2480. From de4d813005e8f5dc86a1f9e40b426858be3f8ec3 Mon Sep 17 00:00:00 2001 From: John Beresford Date: Sat, 10 Feb 2024 20:58:51 -0800 Subject: [PATCH 11/30] Add module readmes to json output (#2500) * Add module readmes to json output Resolves #2499 * deserialize readme unconditionally --- src/lib/models/reflections/declaration.ts | 8 +++++--- src/lib/serialization/schema.ts | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/models/reflections/declaration.ts b/src/lib/models/reflections/declaration.ts index ea316449a..a3fd3105e 100644 --- a/src/lib/models/reflections/declaration.ts +++ b/src/lib/models/reflections/declaration.ts @@ -311,6 +311,7 @@ export class DeclarationReflection extends ContainerReflection { this.implementedTypes, ), implementedBy: serializer.toObjectsOptional(this.implementedBy), + readme: Comment.serializeDisplayParts(serializer, this.readme), }; } @@ -320,14 +321,15 @@ export class DeclarationReflection extends ContainerReflection { ): void { super.fromObject(de, obj); + if (obj.readme) { + this.readme = Comment.deserializeDisplayParts(de, obj.readme); + } + // This happens when merging multiple projects together. // If updating this, also check ProjectReflection.fromObject. if (obj.variant === "project") { this.kind = ReflectionKind.Module; this.packageVersion = obj.packageVersion; - if (obj.readme) { - this.readme = Comment.deserializeDisplayParts(de, obj.readme); - } de.defer(() => { for (const [id, sid] of Object.entries(obj.symbolIdMap || {})) { diff --git a/src/lib/serialization/schema.ts b/src/lib/serialization/schema.ts index ce4f19e83..3709a6d49 100644 --- a/src/lib/serialization/schema.ts +++ b/src/lib/serialization/schema.ts @@ -177,6 +177,7 @@ export interface DeclarationReflection | "getSignature" | "setSignature" | "typeParameters" + | "readme" > {} /** @category Reflections */ From f92f5a84263e784866c2edeea0cadf8b2bfc5a88 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Fri, 23 Feb 2024 11:54:37 -0700 Subject: [PATCH 12/30] Fix removeReflection when no symbol is registered Resolves #2496 --- CHANGELOG.md | 1 + src/lib/models/reflections/project.ts | 10 +++++----- src/test/converter2/issues/gh2496.ts | 6 ++++++ src/test/issues.c2.test.ts | 5 +++++ 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 src/test/converter2/issues/gh2496.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 28408b88e..8558f80cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ## Bug Fixes +- Fixed crash when `--excludeNotDocumented` was used and the project contained a reference to a removed signature, #2496. - Fixed an issue where a namespace would not be created for merged function-namespaces which are declared as variables, #2478. - A class which implements itself will no longer cause a crash when rendering HTML, #2495. - Variable functions which have construct signatures will no longer be converted as functions, ignoring the construct signatures. diff --git a/src/lib/models/reflections/project.ts b/src/lib/models/reflections/project.ts index 0485141e9..584df0a9e 100644 --- a/src/lib/models/reflections/project.ts +++ b/src/lib/models/reflections/project.ts @@ -236,17 +236,17 @@ export class ProjectReflection extends ContainerReflection { this.reflectionChildren.delete(reflection.id); // Remove references from the TS symbol to this reflection. - const symbol = this.reflectionIdToSymbolMap.get(reflection.id); - if (symbol) { - const id = new ReflectionSymbolId(symbol); - const saved = this.symbolToReflectionIdMap.get(id); + const symbolId = this.reflectionIdToSymbolIdMap.get(reflection.id); + if (symbolId) { + const saved = this.symbolToReflectionIdMap.get(symbolId); if (saved === reflection.id) { - this.symbolToReflectionIdMap.delete(id); + this.symbolToReflectionIdMap.delete(symbolId); } else if (typeof saved === "object") { removeIfPresent(saved, reflection.id); } } + this.reflectionIdToSymbolMap.delete(reflection.id); this.reflectionIdToSymbolIdMap.delete(reflection.id); delete this.reflections[reflection.id]; } diff --git a/src/test/converter2/issues/gh2496.ts b/src/test/converter2/issues/gh2496.ts new file mode 100644 index 000000000..8528f8b65 --- /dev/null +++ b/src/test/converter2/issues/gh2496.ts @@ -0,0 +1,6 @@ +export function f() { + return 1; +} + +/** doc */ +export type ReturnOfF = ReturnType; diff --git a/src/test/issues.c2.test.ts b/src/test/issues.c2.test.ts index 59f3d3b59..ada622638 100644 --- a/src/test/issues.c2.test.ts +++ b/src/test/issues.c2.test.ts @@ -1383,4 +1383,9 @@ describe("Issue Tests", () => { const context = theme.getRenderContext(page); context.hierarchyTemplate(page); }); + + it("Correctly cleans up references to functions #2496", () => { + app.options.setValue("excludeNotDocumented", true); + convert(); + }); }); From 626d844d085a1cfc196b284fdf82db81be5b40a2 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 25 Feb 2024 21:10:40 -0700 Subject: [PATCH 13/30] Fix crash with infinitely recursive type Fixes #2507 --- CHANGELOG.md | 16 +++++++++++++--- src/lib/converter/converter.ts | 4 ++++ src/lib/converter/types.ts | 13 ++++++++++++- src/lib/models/reflections/abstract.ts | 12 +++--------- .../default/partials/member.signature.body.tsx | 4 ++-- .../themes/default/partials/typeParameters.tsx | 4 ++-- src/lib/utils/options/declaration.ts | 1 + src/lib/utils/options/sources/typedoc.ts | 6 ++++++ src/test/converter2/issues/gh2507.ts | 11 +++++++++++ src/test/issues.c2.test.ts | 18 ++++++++++++++++++ 10 files changed, 72 insertions(+), 17 deletions(-) create mode 100644 src/test/converter2/issues/gh2507.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 8558f80cf..49bb86f75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,19 @@ # Unreleased +### Bug Fixes + +- Module readmes will now be included in JSON output, #2500. +- Fixed crash when `--excludeNotDocumented` was used and the project contained a reference to a removed signature, #2496. +- Fixed crash when converting an infinitely recursive type via a new `--maxTypeConversionDepth` option, #2507. +- Type links in "Parameters" and "Type Parameters" sections of the page will now be correctly colored. + +### Thanks! + +- @JMBeresford + ## v0.25.8 (2024-02-09) -## Features +### Features - Added a new `--sitemapBaseUrl` option. When specified, TypeDoc will generate a `sitemap.xml` in your output folder that describes the site, #2480. - Added support for the `@class` tag. When added to a comment on a variable or function, TypeDoc will convert the member as a class, #2479. @@ -10,9 +21,8 @@ - Added support for `@groupDescription` and `@categoryDescription` to provide a description of groups and categories, #2494. - API: Exposed `Context.getNodeComment` for plugin use, #2498. -## Bug Fixes +### Bug Fixes -- Fixed crash when `--excludeNotDocumented` was used and the project contained a reference to a removed signature, #2496. - Fixed an issue where a namespace would not be created for merged function-namespaces which are declared as variables, #2478. - A class which implements itself will no longer cause a crash when rendering HTML, #2495. - Variable functions which have construct signatures will no longer be converted as functions, ignoring the construct signatures. diff --git a/src/lib/converter/converter.ts b/src/lib/converter/converter.ts index 08efaaeb9..39641f073 100644 --- a/src/lib/converter/converter.ts +++ b/src/lib/converter/converter.ts @@ -97,6 +97,10 @@ export class Converter extends ChildableComponent< @Option("preserveLinkText") accessor preserveLinkText!: boolean; + /** @internal */ + @Option("maxTypeConversionDepth") + accessor maxTypeConversionDepth!: number; + private _config?: CommentParserConfig; private _externalSymbolResolvers: Array = []; diff --git a/src/lib/converter/types.ts b/src/lib/converter/types.ts index 2c8f589a8..991d26143 100644 --- a/src/lib/converter/types.ts +++ b/src/lib/converter/types.ts @@ -115,6 +115,7 @@ function maybeConvertType( return convertType(context, typeOrNode); } +let typeConversionDepth = 0; export function convertType( context: Context, typeOrNode: ts.Type | ts.TypeNode | undefined, @@ -123,11 +124,18 @@ export function convertType( return new IntrinsicType("any"); } + if (typeConversionDepth > context.converter.maxTypeConversionDepth) { + return new UnknownType("..."); + } + loadConverters(); if ("kind" in typeOrNode) { const converter = converters.get(typeOrNode.kind); if (converter) { - return converter.convert(context, typeOrNode); + ++typeConversionDepth; + const result = converter.convert(context, typeOrNode); + --typeConversionDepth; + return result; } return requestBugReport(context, typeOrNode); } @@ -137,6 +145,7 @@ export function convertType( // will use the origin when serializing // aliasSymbol check is important - #2468 if (typeOrNode.isUnion() && typeOrNode.origin && !typeOrNode.aliasSymbol) { + // Don't increment typeConversionDepth as this is a transparent step to the user. return convertType(context, typeOrNode.origin); } @@ -167,7 +176,9 @@ export function convertType( } seenTypes.add(typeOrNode.id); + ++typeConversionDepth; const result = converter.convertType(context, typeOrNode, node); + --typeConversionDepth; seenTypes.delete(typeOrNode.id); return result; } diff --git a/src/lib/models/reflections/abstract.ts b/src/lib/models/reflections/abstract.ts index 00a9f6357..5f027b0ea 100644 --- a/src/lib/models/reflections/abstract.ts +++ b/src/lib/models/reflections/abstract.ts @@ -1,4 +1,3 @@ -import { ok } from "assert"; import { Comment } from "../comments/comment"; import { splitUnquotedString } from "./utils"; import type { ProjectReflection } from "./project"; @@ -278,14 +277,8 @@ export abstract class Reflection { @NonEnumerable // So that it doesn't show up in console.log parent?: Reflection; - get project(): ProjectReflection { - if (this.isProject()) return this; - ok( - this.parent, - "Tried to get the project on a reflection not in a project", - ); - return this.parent.project; - } + @NonEnumerable + project: ProjectReflection; /** * The parsed documentation comment attached to this reflection. @@ -322,6 +315,7 @@ export abstract class Reflection { constructor(name: string, kind: ReflectionKind, parent?: Reflection) { this.id = REFLECTION_ID++; this.parent = parent; + this.project = parent?.project || (this as any as ProjectReflection); this.name = name; this.kind = kind; diff --git a/src/lib/output/themes/default/partials/member.signature.body.tsx b/src/lib/output/themes/default/partials/member.signature.body.tsx index 5d8b22331..e62efeb72 100644 --- a/src/lib/output/themes/default/partials/member.signature.body.tsx +++ b/src/lib/output/themes/default/partials/member.signature.body.tsx @@ -23,7 +23,7 @@ export function memberSignatureBody(
    {props.parameters.map((item) => (
  • -
    + {context.reflectionFlags(item)} {!!item.flags.isRest && ...} {item.name} @@ -35,7 +35,7 @@ export function memberSignatureBody( {item.defaultValue} )} -
    + {context.commentSummary(item)} {context.commentTags(item)} {item.type instanceof ReflectionType && context.parameter(item.type.declaration)} diff --git a/src/lib/output/themes/default/partials/typeParameters.tsx b/src/lib/output/themes/default/partials/typeParameters.tsx index 3b663d00c..9617f1b39 100644 --- a/src/lib/output/themes/default/partials/typeParameters.tsx +++ b/src/lib/output/themes/default/partials/typeParameters.tsx @@ -10,7 +10,7 @@ export function typeParameters(context: DefaultThemeRenderContext, typeParameter
      {typeParameters?.map((item) => (
    • -

      + {item.flags.isConst && const } {item.varianceModifier && ( @@ -29,7 +29,7 @@ export function typeParameters(context: DefaultThemeRenderContext, typeParameter {context.type(item.default)} )} -

      + {context.commentSummary(item)} {context.commentTags(item)}
    • diff --git a/src/lib/utils/options/declaration.ts b/src/lib/utils/options/declaration.ts index 8317c2340..8646e7948 100644 --- a/src/lib/utils/options/declaration.ts +++ b/src/lib/utils/options/declaration.ts @@ -106,6 +106,7 @@ export interface TypeDocOptionMap { excludeProtected: boolean; excludeReferences: boolean; excludeCategories: string[]; + maxTypeConversionDepth: number; name: string; includeVersion: boolean; disableSources: boolean; diff --git a/src/lib/utils/options/sources/typedoc.ts b/src/lib/utils/options/sources/typedoc.ts index 90260a687..261d5402a 100644 --- a/src/lib/utils/options/sources/typedoc.ts +++ b/src/lib/utils/options/sources/typedoc.ts @@ -291,6 +291,12 @@ export function addTypeDocOptions(options: Pick) { } }, }); + options.addDeclaration({ + name: "maxTypeConversionDepth", + help: "Set the maximum depth of types to be converted.", + defaultValue: 10, + type: ParameterType.Number, + }); options.addDeclaration({ name: "name", help: "Set the name of the project that will be used in the header of the template.", diff --git a/src/test/converter2/issues/gh2507.ts b/src/test/converter2/issues/gh2507.ts new file mode 100644 index 000000000..6c73c49fe --- /dev/null +++ b/src/test/converter2/issues/gh2507.ts @@ -0,0 +1,11 @@ +export interface Value { + values: Value[]; +} + +export function fromPartial>(object: I): void { + throw 1; +} + +export type Exact = P extends P + ? P & { [K in keyof P]: Exact } + : never; diff --git a/src/test/issues.c2.test.ts b/src/test/issues.c2.test.ts index ada622638..7b8a9da77 100644 --- a/src/test/issues.c2.test.ts +++ b/src/test/issues.c2.test.ts @@ -1388,4 +1388,22 @@ describe("Issue Tests", () => { app.options.setValue("excludeNotDocumented", true); convert(); }); + + it("Handles an infinitely recursive type, #2507", () => { + const project = convert(); + const type = querySig(project, "fromPartial").typeParameters![0].type; + + // function fromPartial(object: I): void + equal(type?.toString(), "Value & Object"); + }); }); From 474875e1e0d56a6e823ae146408b5dfd277460f7 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 25 Feb 2024 21:32:50 -0700 Subject: [PATCH 14/30] Add support for sorting literal numeric unions Resolves #2502 --- CHANGELOG.md | 4 ++++ src/lib/converter/types.ts | 22 +++++++++++++++++++--- src/test/converter2/issues/gh2502.ts | 7 +++++++ src/test/issues.c2.test.ts | 6 ++++++ 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 src/test/converter2/issues/gh2502.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 49bb86f75..7335e0048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +### Features + +- Literal numeric unions will now be sorted during conversion, #2502. + ### Bug Fixes - Module readmes will now be included in JSON output, #2500. diff --git a/src/lib/converter/types.ts b/src/lib/converter/types.ts index 991d26143..7ffe2e183 100644 --- a/src/lib/converter/types.ts +++ b/src/lib/converter/types.ts @@ -1045,9 +1045,10 @@ const unionConverter: TypeConverter = { ); }, convertType(context, type) { - return new UnionType( - type.types.map((type) => convertType(context, type)), - ); + const types = type.types.map((type) => convertType(context, type)); + sortLiteralUnion(types); + + return new UnionType(types); }, }; @@ -1115,3 +1116,18 @@ function kindToModifier( return undefined; } } + +function sortLiteralUnion(types: SomeType[]) { + if ( + types.some((t) => t.type !== "literal" || typeof t.value !== "number") + ) { + return; + } + + types.sort((a, b) => { + const aLit = a as LiteralType; + const bLit = b as LiteralType; + + return (aLit.value as number) - (bLit.value as number); + }); +} diff --git a/src/test/converter2/issues/gh2502.ts b/src/test/converter2/issues/gh2502.ts new file mode 100644 index 000000000..84f4298c0 --- /dev/null +++ b/src/test/converter2/issues/gh2502.ts @@ -0,0 +1,7 @@ +// A future TS version might change this so that numbers are hardcoded +// to show up in a specific order. As of TS 5.3.3, this makes the union display +// as 3 | 1 | 2. +type WeirdOrder = [1, 2, 3][number]; +// ^? + +export const Test = null! as WeirdOrder; diff --git a/src/test/issues.c2.test.ts b/src/test/issues.c2.test.ts index 7b8a9da77..24c1b9b84 100644 --- a/src/test/issues.c2.test.ts +++ b/src/test/issues.c2.test.ts @@ -1389,6 +1389,12 @@ describe("Issue Tests", () => { convert(); }); + it("Sorts literal numeric unions when converting a type, #2502", () => { + const project = convert(); + const refl = query(project, "Test"); + equal(refl.type?.toString(), "1 | 2 | 3"); + }); + it("Handles an infinitely recursive type, #2507", () => { const project = convert(); const type = querySig(project, "fromPartial").typeParameters![0].type; From c65d44c336ee9f4842880c06a275ecd020d8b644 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 25 Feb 2024 21:35:33 -0700 Subject: [PATCH 15/30] Bump version to 0.25.9 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index cdcfb8a28..3121fcb18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typedoc", - "version": "0.25.8", + "version": "0.25.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "typedoc", - "version": "0.25.8", + "version": "0.25.9", "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", diff --git a/package.json b/package.json index f2a30d66e..f4f3c5c8d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.25.8", + "version": "0.25.9", "homepage": "https://typedoc.org", "exports": { ".": "./dist/index.js", From 9999d549ea3289199c405328c127488908b96ab3 Mon Sep 17 00:00:00 2001 From: TypeDoc Bot Date: Mon, 26 Feb 2024 04:36:20 +0000 Subject: [PATCH 16/30] Update changelog for release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7335e0048..0b82041e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +## v0.25.9 (2024-02-26) + ### Features - Literal numeric unions will now be sorted during conversion, #2502. From 88d787c4ab9101ad7f2e2705f7ec781c98582fa5 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sat, 2 Mar 2024 18:31:49 -0700 Subject: [PATCH 17/30] Fix links to constructed enum references Resolves #2508 --- CHANGELOG.md | 4 ++++ src/lib/converter/types.ts | 8 ++++++-- src/test/converter2/issues/gh2508.ts | 16 ++++++++++++++++ src/test/issues.c2.test.ts | 8 ++++++++ 4 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 src/test/converter2/issues/gh2508.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b82041e0..aaf4a5418 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +### Bug Fixes + +- Constructed references to enum types will be properly linked with `@interface`, #2508. + ## v0.25.9 (2024-02-26) ### Features diff --git a/src/lib/converter/types.ts b/src/lib/converter/types.ts index 7ffe2e183..d1d19ee49 100644 --- a/src/lib/converter/types.ts +++ b/src/lib/converter/types.ts @@ -724,8 +724,12 @@ const referenceConverter: TypeConverter< ); return type; }, - convertType(context, type) { - const symbol = type.aliasSymbol ?? type.getSymbol(); + convertType(context, type, node) { + // typeName.symbol handles the case where this is a union which happens to refer + // to an enumeration. TS doesn't put the symbol on the type for some reason, but + // does add it to the constructed type node. + const symbol = + type.aliasSymbol ?? type.getSymbol() ?? node.typeName.symbol; if (!symbol) { // This happens when we get a reference to a type parameter // created within a mapped type, `K` in: `{ [K in T]: string }` diff --git a/src/test/converter2/issues/gh2508.ts b/src/test/converter2/issues/gh2508.ts new file mode 100644 index 000000000..2cce64437 --- /dev/null +++ b/src/test/converter2/issues/gh2508.ts @@ -0,0 +1,16 @@ +export enum Color { + BLUE = "Blue", + RED = "Red", +} + +type TypeOf = { + [K in keyof T]: T[K][keyof T[K]]; +}; + +type Foo = { + color: typeof Color; +}; + +/** @interface */ +export type Bar = TypeOf; +// ^? diff --git a/src/test/issues.c2.test.ts b/src/test/issues.c2.test.ts index 24c1b9b84..99e4021f5 100644 --- a/src/test/issues.c2.test.ts +++ b/src/test/issues.c2.test.ts @@ -1412,4 +1412,12 @@ describe("Issue Tests", () => { // }>(object: I): void equal(type?.toString(), "Value & Object"); }); + + it("Handles constructed references to enumeration types, #2508", () => { + const project = convert(); + const refl = query(project, "Bar.color"); + equal(refl.type?.type, "reference"); + equal(refl.type.toString(), "Color"); + equal(refl.type.reflection?.id, query(project, "Color").id); + }); }); From 9751e312789c9fae01a9b9f799a576ca5a07d372 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 3 Mar 2024 13:53:28 -0700 Subject: [PATCH 18/30] Improve doc HTML output Closes #2491 Closes #2505 This technically contains a breaking change as icons can no longer be overwritten via DefaultThemeRenderContext, but no published theme uses this, so I've decided not to care. --- CHANGELOG.md | 4 ++ src/lib/output/plugins/IconsPlugin.tsx | 60 +++++++++++++++++++ src/lib/output/plugins/index.ts | 1 + .../output/themes/default/DefaultTheme.tsx | 16 +++++ .../default/DefaultThemeRenderContext.ts | 24 ++++---- .../default/assets/typedoc/Application.ts | 30 ++++++++-- .../default/assets/typedoc/Navigation.ts | 3 +- .../output/themes/default/layouts/default.tsx | 11 +++- .../output/themes/default/partials/icon.tsx | 15 +++-- .../themes/default/partials/navigation.tsx | 57 +----------------- 10 files changed, 136 insertions(+), 85 deletions(-) create mode 100644 src/lib/output/plugins/IconsPlugin.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index aaf4a5418..3ae93df9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ ### Bug Fixes - Constructed references to enum types will be properly linked with `@interface`, #2508. +- Reduced rendered docs size by writing icons to a referenced SVG asset, #2505. + For TypeDoc's docs, this reduced the rendered documentation size by ~30%. +- The HTML docs now attempt to reduce repaints caused by dynamically loading the navigation, #2491. +- When navigating to a link that contains an anchor, the page will now be properly highlighted in the page navigation. ## v0.25.9 (2024-02-26) diff --git a/src/lib/output/plugins/IconsPlugin.tsx b/src/lib/output/plugins/IconsPlugin.tsx new file mode 100644 index 000000000..93fe66674 --- /dev/null +++ b/src/lib/output/plugins/IconsPlugin.tsx @@ -0,0 +1,60 @@ +import { Component, RendererComponent } from "../components"; +import { RendererEvent } from "../events"; +import { writeFile } from "../../utils/fs"; +import { DefaultTheme } from "../themes/default/DefaultTheme"; +import { join } from "path"; +import { JSX, renderElement } from "../../utils"; + +/** + * Plugin which is responsible for creating an icons.js file that embeds the icon SVGs + * within the page on page load to reduce page sizes. + */ +@Component({ name: "icons" }) +export class IconsPlugin extends RendererComponent { + iconHtml?: string; + + override initialize() { + this.listenTo(this.owner, { + [RendererEvent.BEGIN]: this.onBeginRender, + }); + } + + private onBeginRender(_event: RendererEvent) { + if (this.owner.theme instanceof DefaultTheme) { + this.owner.postRenderAsyncJobs.push((event) => this.onRenderEnd(event)); + } + } + + private async onRenderEnd(event: RendererEvent) { + const children: JSX.Element[] = []; + const icons = (this.owner.theme as DefaultTheme).icons; + + for (const [name, icon] of Object.entries(icons)) { + children.push({icon.call(icons).children}); + } + + const svg = renderElement({children}); + const js = [ + "(function(svg) {", + " svg.innerHTML = `" + renderElement(<>{children}).replaceAll("`", "\\`") + "`;", + " svg.style.display = 'none';", + " if (location.protocol === 'file:') {", + " if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', updateUseElements);", + " else updateUseElements()", + " function updateUseElements() {", + " document.querySelectorAll('use').forEach(el => {", + " if (el.getAttribute('href').includes('#icon-')) {", + " el.setAttribute('href', el.getAttribute('href').replace(/.*#/, '#'));", + " }", + " });", + " }", + " }", + "})(document.body.appendChild(document.createElementNS('http://www.w3.org/2000/svg', 'svg')))", + ].join("\n"); + + const svgPath = join(event.outputDirectory, "assets/icons.svg"); + const jsPath = join(event.outputDirectory, "assets/icons.js"); + + await Promise.all([writeFile(svgPath, svg), writeFile(jsPath, js)]); + } +} diff --git a/src/lib/output/plugins/index.ts b/src/lib/output/plugins/index.ts index 62a995442..b2435aaaa 100644 --- a/src/lib/output/plugins/index.ts +++ b/src/lib/output/plugins/index.ts @@ -1,5 +1,6 @@ export { MarkedPlugin } from "../themes/MarkedPlugin"; export { AssetsPlugin } from "./AssetsPlugin"; +export { IconsPlugin } from "./IconsPlugin"; export { JavascriptIndexPlugin } from "./JavascriptIndexPlugin"; export { NavigationPlugin } from "./NavigationPlugin"; export { SitemapPlugin } from "./SitemapPlugin"; diff --git a/src/lib/output/themes/default/DefaultTheme.tsx b/src/lib/output/themes/default/DefaultTheme.tsx index 192ae6a13..972fa19a5 100644 --- a/src/lib/output/themes/default/DefaultTheme.tsx +++ b/src/lib/output/themes/default/DefaultTheme.tsx @@ -17,6 +17,7 @@ import type { MarkedPlugin } from "../../plugins"; import { DefaultThemeRenderContext } from "./DefaultThemeRenderContext"; import { JSX } from "../../../utils"; import { classNames, getDisplayName, getHierarchyRoots, toStyleClass } from "../lib"; +import { icons } from "./partials/icon"; /** * Defines a mapping of a {@link Models.Kind} to a template file. @@ -56,6 +57,21 @@ export class DefaultTheme extends Theme { /** @internal */ markedPlugin: MarkedPlugin; + /** + * The icons which will actually be rendered. The source of truth lives on the theme, and + * the {@link DefaultThemeRenderContext.icons} member will produce references to these. + * + * These icons will be written twice. Once to an `icons.svg` file in the assets directory + * which will be referenced by icons on the context, and once to an `icons.js` file so that + * references to the icons can be dynamically embedded within the page for use by the search + * dropdown and when loading the page on `file://` urls. + * + * Custom themes may overwrite this entire object or individual properties on it to customize + * the icons used within the page, however TypeDoc currently assumes that all icons are svg + * elements, so custom themes must also use svg elements. + */ + icons = { ...icons }; + getRenderContext(pageEvent: PageEvent) { return new DefaultThemeRenderContext(this, pageEvent, this.application.options); } diff --git a/src/lib/output/themes/default/DefaultThemeRenderContext.ts b/src/lib/output/themes/default/DefaultThemeRenderContext.ts index 347815930..0e663f377 100644 --- a/src/lib/output/themes/default/DefaultThemeRenderContext.ts +++ b/src/lib/output/themes/default/DefaultThemeRenderContext.ts @@ -5,7 +5,7 @@ import { DeclarationReflection, Reflection, } from "../../../models"; -import type { JSX, NeverIfInternal, Options } from "../../../utils"; +import { JSX, NeverIfInternal, Options } from "../../../utils"; import type { DefaultTheme } from "./DefaultTheme"; import { defaultLayout } from "./layouts/default"; import { index } from "./partials"; @@ -53,7 +53,6 @@ function bind(fn: (f: F, ...a: L) => R, first: F) { } export class DefaultThemeRenderContext { - private _iconsCache: JSX.Element; private _refIcons: typeof icons; options: Options; @@ -63,24 +62,25 @@ export class DefaultThemeRenderContext { options: Options, ) { this.options = options; - - const { refs, cache } = buildRefIcons(icons); - this._refIcons = refs; - this._iconsCache = cache; + this._refIcons = buildRefIcons(icons, this); } + /** + * @deprecated Will be removed in 0.26, no longer required. + */ iconsCache(): JSX.Element { - return this._iconsCache; + return JSX.createElement(JSX.Fragment, null); } + /** + * Icons available for use within the page. + * + * Note: This creates a reference to icons declared by {@link DefaultTheme.icons}, + * to customize icons, that object must be modified instead. + */ get icons(): Readonly { return this._refIcons; } - set icons(value: Readonly) { - const { refs, cache } = buildRefIcons(value); - this._refIcons = refs; - this._iconsCache = cache; - } hook = (name: keyof RendererHooks) => this.theme.owner.hooks.emit(name, this); diff --git a/src/lib/output/themes/default/assets/typedoc/Application.ts b/src/lib/output/themes/default/assets/typedoc/Application.ts index 0c53725b4..498029c52 100644 --- a/src/lib/output/themes/default/assets/typedoc/Application.ts +++ b/src/lib/output/themes/default/assets/typedoc/Application.ts @@ -31,18 +31,18 @@ export function registerComponent( */ export class Application { alwaysVisibleMember: HTMLElement | null = null; - - /** - * Create a new Application instance. - */ constructor() { this.createComponents(document.body); - this.ensureActivePageVisible(); this.ensureFocusedElementVisible(); this.listenForCodeCopies(); window.addEventListener("hashchange", () => this.ensureFocusedElementVisible(), ); + + // We're on a *really* slow network connection. + if (!document.body.style.display) { + this.scrollToHash(); + } } /** @@ -63,6 +63,24 @@ export class Application { this.ensureFocusedElementVisible(); } + public showPage() { + if (!document.body.style.display) return; + document.body.style.removeProperty("display"); + this.scrollToHash(); + } + + public scrollToHash() { + // Because we hid the entire page until the navigation loaded or we hit a timeout, + // we have to manually resolve the url hash here. + if (location.hash) { + const reflAnchor = document.getElementById( + location.hash.substring(1), + ); + if (!reflAnchor) return; + reflAnchor.scrollIntoView({ behavior: "instant", block: "start" }); + } + } + public ensureActivePageVisible() { const pageLink = document.querySelector(".tsd-navigation .current"); let iter = pageLink?.parentElement; @@ -74,7 +92,7 @@ export class Application { iter = iter.parentElement; } - if (pageLink) { + if (pageLink && !pageLink.checkVisibility()) { const top = pageLink.getBoundingClientRect().top - document.documentElement.clientHeight / 4; diff --git a/src/lib/output/themes/default/assets/typedoc/Navigation.ts b/src/lib/output/themes/default/assets/typedoc/Navigation.ts index 9d93fe7f6..87eae39df 100644 --- a/src/lib/output/themes/default/assets/typedoc/Navigation.ts +++ b/src/lib/output/themes/default/assets/typedoc/Navigation.ts @@ -41,6 +41,7 @@ async function buildNav() { } window.app.createComponents(container); + window.app.showPage(); window.app.ensureActivePageVisible(); } @@ -93,7 +94,7 @@ function addNavText( if (classes) { a.className = classes; } - if (location.href === a.href) { + if (location.pathname === a.pathname) { a.classList.add("current"); } if (el.kind) { diff --git a/src/lib/output/themes/default/layouts/default.tsx b/src/lib/output/themes/default/layouts/default.tsx index b7dedee11..c87d4c7df 100644 --- a/src/lib/output/themes/default/layouts/default.tsx +++ b/src/lib/output/themes/default/layouts/default.tsx @@ -29,6 +29,7 @@ export const defaultLayout = ( )} + {context.hook("head.end")} @@ -36,7 +37,14 @@ export const defaultLayout = ( {context.hook("body.begin")} {context.toolbar(props)} @@ -66,7 +74,6 @@ export const defaultLayout = (
      {context.analytics()} - {context.iconsCache()} {context.hook("body.end")} diff --git a/src/lib/output/themes/default/partials/icon.tsx b/src/lib/output/themes/default/partials/icon.tsx index dc26cec98..c899cf5cb 100644 --- a/src/lib/output/themes/default/partials/icon.tsx +++ b/src/lib/output/themes/default/partials/icon.tsx @@ -1,6 +1,7 @@ import assert from "assert"; import { ReflectionKind } from "../../../../models"; import { JSX } from "../../../../utils"; +import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext"; const kindIcon = (letterPath: JSX.Element, color: string, circular = false) => ( @@ -18,9 +19,11 @@ const kindIcon = (letterPath: JSX.Element, color: string, circular = false) => ( ); -export function buildRefIcons JSX.Element>>(icons: T): { refs: T; cache: JSX.Element } { +export function buildRefIcons JSX.Element>>( + icons: T, + context: DefaultThemeRenderContext, +): T { const refs: Record JSX.Element> = {}; - const children: JSX.Element[] = []; for (const [name, builder] of Object.entries(icons)) { const jsx = builder.call(icons); @@ -32,19 +35,15 @@ export function buildRefIcons JSX.Element>>(icons continue; } - children.push({jsx.children}); const ref = ( - + ); refs[name] = () => ref; } - return { - refs: refs as T, - cache: {children}, - }; + return refs as T; } export const icons: Record< diff --git a/src/lib/output/themes/default/partials/navigation.tsx b/src/lib/output/themes/default/partials/navigation.tsx index edac2d18a..8e47f22ed 100644 --- a/src/lib/output/themes/default/partials/navigation.tsx +++ b/src/lib/output/themes/default/partials/navigation.tsx @@ -2,11 +2,8 @@ import { Reflection, ReflectionKind } from "../../../../models"; import { JSX } from "../../../../utils"; import type { PageEvent } from "../../../events"; import { camelToTitleCase, classNames, getDisplayName, wbr } from "../../lib"; -import type { NavigationElement } from "../DefaultTheme"; import type { DefaultThemeRenderContext } from "../DefaultThemeRenderContext"; -const MAX_EMBEDDED_NAV_SIZE = 20; - export function sidebar(context: DefaultThemeRenderContext, props: PageEvent) { return ( <> @@ -100,57 +97,6 @@ export function settings(context: DefaultThemeRenderContext) { } export const navigation = function navigation(context: DefaultThemeRenderContext, props: PageEvent) { - const nav = context.getNavigation(); - - let elements = 0; - function link(el: NavigationElement, path: string[] = []) { - if (elements > MAX_EMBEDDED_NAV_SIZE) { - return <>; - } - - if (el.path) { - ++elements; - return ( -
    • - - {el.kind && context.icons[el.kind]()} - {el.text} - -
    • - ); - } - - // Top level element is a group/category, recurse so that we don't have a half-broken - // navigation tree for people with JS turned off. - if (el.children) { - ++elements; - const fullPath = [...path, el.text]; - - return ( -
      - - {context.icons.chevronDown()} - {el.text} - -
      -
        {el.children.map((c) => link(c, fullPath))}
      -
      -
      - ); - } - - return ( -
    • - {el.text} -
    • - ); - } - - const navEl = nav.map((el) => link(el)); - return ( ); From 657045ccb7b54a67b6cf546cfd1a32a8b2237397 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 3 Mar 2024 14:42:20 -0700 Subject: [PATCH 19/30] Fix duplicate comments caused by signatures Resolves #2509 --- CHANGELOG.md | 1 + src/lib/converter/plugins/CommentPlugin.ts | 24 +++++++++++++--------- src/lib/output/components.ts | 4 +++- src/lib/validation/documentation.ts | 15 +++++++++----- src/test/converter2/issues/gh2509.ts | 9 ++++++++ src/test/issues.c2.test.ts | 24 +++++++++++++++------- 6 files changed, 54 insertions(+), 23 deletions(-) create mode 100644 src/test/converter2/issues/gh2509.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ae93df9d..645a1b196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Bug Fixes - Constructed references to enum types will be properly linked with `@interface`, #2508. +- Comments on property-methods will no longer be duplicated in generated documentation, #2509. - Reduced rendered docs size by writing icons to a referenced SVG asset, #2505. For TypeDoc's docs, this reduced the rendered documentation size by ~30%. - The HTML docs now attempt to reduce repaints caused by dynamically loading the navigation, #2491. diff --git a/src/lib/converter/plugins/CommentPlugin.ts b/src/lib/converter/plugins/CommentPlugin.ts index 997b0024f..2af60f371 100644 --- a/src/lib/converter/plugins/CommentPlugin.ts +++ b/src/lib/converter/plugins/CommentPlugin.ts @@ -453,23 +453,27 @@ export class CommentPlugin extends ConverterComponent { } // Since this reflection has signatures, we need to remove the comment from the non-primary - // declaration location. For functions, this means removing it from the Function reflection. - // For type aliases, this means removing it from reflection.type.declaration. + // declaration location. For functions/methods/constructors, this means removing it from + // the wrapping reflection. For type aliases, classes, and interfaces, this means removing + // it from the contained signatures... if it's the same as what is on the signature. // This is important so that in type aliases we don't end up with a comment rendered twice. - if ( - reflection.kindOf( - ReflectionKind.FunctionOrMethod | ReflectionKind.Constructor, - ) - ) { + if (reflection.kindOf(ReflectionKind.SignatureContainer)) { delete reflection.comment; - } - if (reflection.kindOf(ReflectionKind.TypeAlias)) { + } else { reflection.comment?.removeTags("@param"); reflection.comment?.removeTags("@typeParam"); reflection.comment?.removeTags("@template"); + const parentComment = Comment.combineDisplayParts( + reflection.comment?.summary, + ); for (const sig of signatures) { - delete sig.comment; + if ( + Comment.combineDisplayParts(sig.comment?.summary) === + parentComment + ) { + delete sig.comment; + } } } } diff --git a/src/lib/output/components.ts b/src/lib/output/components.ts index ee1a29ea9..d69087a44 100644 --- a/src/lib/output/components.ts +++ b/src/lib/output/components.ts @@ -29,8 +29,10 @@ export abstract class ContextAwareRendererComponent extends RendererComponent { /** * The url of the document that is being currently generated. * Set when a page begins rendering. + * + * Defaulted to '.' so that tests don't have to set up events. */ - private location!: string; + private location = "."; /** * Regular expression to test if a string looks like an external url. diff --git a/src/lib/validation/documentation.ts b/src/lib/validation/documentation.ts index a40a73e68..29e7fcdda 100644 --- a/src/lib/validation/documentation.ts +++ b/src/lib/validation/documentation.ts @@ -61,12 +61,13 @@ export function validateDocumentation( toProcess.push(ref.parent); continue; } - // Ditto for signatures on type aliases. + // Call signatures are considered documented if they have a comment directly, or their + // container has a comment and they are directly within a type literal belonging to that container. if ( ref.kindOf(ReflectionKind.CallSignature) && - ref.parent?.parent?.kindOf(ReflectionKind.TypeAlias) + ref.parent?.kindOf(ReflectionKind.TypeLiteral) ) { - toProcess.push(ref.parent.parent); + toProcess.push(ref.parent.parent!); continue; } @@ -78,9 +79,13 @@ export function validateDocumentation( if (signatures.length) { // We've been asked to validate this reflection, so we should validate that - // signatures all have comments, but we'll still have a comment here because - // type aliases always have their own comment. + // signatures all have comments toProcess.push(...signatures); + + if (ref.kindOf(ReflectionKind.SignatureContainer)) { + // Comments belong to each signature, and will not be included on this object. + continue; + } } } diff --git a/src/test/converter2/issues/gh2509.ts b/src/test/converter2/issues/gh2509.ts new file mode 100644 index 000000000..ad525d613 --- /dev/null +++ b/src/test/converter2/issues/gh2509.ts @@ -0,0 +1,9 @@ +export interface Int { + /** Cb */ + cb: () => Promise; + + nested: { + /** Cb2 */ + cb: () => any; + }; +} diff --git a/src/test/issues.c2.test.ts b/src/test/issues.c2.test.ts index 99e4021f5..7c2c69425 100644 --- a/src/test/issues.c2.test.ts +++ b/src/test/issues.c2.test.ts @@ -373,7 +373,7 @@ describe("Issue Tests", () => { equal( Comment.combineDisplayParts( - query(project, "Foo.baz").signatures?.[0]?.comment?.summary, + query(project, "Foo.baz").comment?.summary, ), "Some property style doc.", "Property methods declared in interface should still allow comment inheritance", @@ -944,12 +944,7 @@ describe("Issue Tests", () => { const project = convert(); const hook = query(project, "Camera.useCameraPermissions"); equal(hook.type?.type, "reflection" as const); - equal( - Comment.combineDisplayParts( - hook.type.declaration.signatures![0].comment?.summary, - ), - "One", - ); + equal(Comment.combineDisplayParts(hook.comment?.summary), "One"); }); it("#2150", () => { @@ -1420,4 +1415,19 @@ describe("Issue Tests", () => { equal(refl.type.toString(), "Color"); equal(refl.type.reflection?.id, query(project, "Color").id); }); + + it("Does not duplicate comments due to signatures being present, #2509", () => { + const project = convert(); + const cb = query(project, "Int.cb"); + equal(Comment.combineDisplayParts(cb.comment?.summary), "Cb"); + equal(cb.type?.type, "reflection"); + equal(cb.type.declaration.signatures![0].comment, undefined); + + const nested = query(project, "Int.nested"); + equal(nested.type?.type, "reflection"); + const cb2 = nested.type.declaration.children![0]; + equal(Comment.combineDisplayParts(cb2.comment?.summary), "Cb2"); + equal(cb2.type?.type, "reflection"); + equal(cb2.type.declaration.signatures![0].comment, undefined); + }); }); From e16a23677cd8f98223f8db9a3a8c2b2e363f03ca Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 3 Mar 2024 14:51:31 -0700 Subject: [PATCH 20/30] Bump version to 0.25.10 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3121fcb18..43bc8c335 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typedoc", - "version": "0.25.9", + "version": "0.25.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "typedoc", - "version": "0.25.9", + "version": "0.25.10", "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", diff --git a/package.json b/package.json index f4f3c5c8d..0e36e3219 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.25.9", + "version": "0.25.10", "homepage": "https://typedoc.org", "exports": { ".": "./dist/index.js", From b0796cbf86a5e57cc085f884635bf887a24704dd Mon Sep 17 00:00:00 2001 From: TypeDoc Bot Date: Sun, 3 Mar 2024 21:52:23 +0000 Subject: [PATCH 21/30] Update changelog for release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 645a1b196..5e0d6410f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +## v0.25.10 (2024-03-03) + ### Bug Fixes - Constructed references to enum types will be properly linked with `@interface`, #2508. From 91242542eb583d99a8ba17c7c7985f4b1edc2c94 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 5 Mar 2024 19:54:34 -0700 Subject: [PATCH 22/30] Fix empty index Resolves #2514 --- CHANGELOG.md | 4 +++ .../default/assets/typedoc/Application.ts | 31 ++++++++++++++++++- .../assets/typedoc/components/Filter.ts | 30 ++---------------- .../output/themes/default/layouts/default.tsx | 2 +- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e0d6410f..761696069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Unreleased +### Bug Fixes + +- Fixed an issue introduced with 0.25.10 which causes the page index to initially render empty, #2514. + ## v0.25.10 (2024-03-03) ### Bug Fixes diff --git a/src/lib/output/themes/default/assets/typedoc/Application.ts b/src/lib/output/themes/default/assets/typedoc/Application.ts index 498029c52..4d1e4a1d8 100644 --- a/src/lib/output/themes/default/assets/typedoc/Application.ts +++ b/src/lib/output/themes/default/assets/typedoc/Application.ts @@ -39,9 +39,11 @@ export class Application { this.ensureFocusedElementVisible(), ); - // We're on a *really* slow network connection. + // We're on a *really* slow network connection and the inline JS + // has already made the page display. if (!document.body.style.display) { this.scrollToHash(); + this.updateIndexVisibility(); } } @@ -67,6 +69,7 @@ export class Application { if (!document.body.style.display) return; document.body.style.removeProperty("display"); this.scrollToHash(); + this.updateIndexVisibility(); } public scrollToHash() { @@ -102,6 +105,32 @@ export class Application { } } + public updateIndexVisibility() { + const indexAccordion = + document.querySelector(".tsd-index-content"); + const oldOpen = indexAccordion?.open; + if (indexAccordion) { + indexAccordion.open = true; + } + + // Hide index headings where all index items are hidden. + // offsetParent == null checks for display: none + document + .querySelectorAll(".tsd-index-section") + .forEach((el) => { + el.style.display = "block"; + const allChildrenHidden = Array.from( + el.querySelectorAll(".tsd-index-link"), + ).every((child) => child.offsetParent == null); + + el.style.display = allChildrenHidden ? "none" : "block"; + }); + + if (indexAccordion) { + indexAccordion.open = oldOpen!; + } + } + /** * Ensures that if a user was linked to a reflection which is hidden because of filter * settings, that reflection is still shown. diff --git a/src/lib/output/themes/default/assets/typedoc/components/Filter.ts b/src/lib/output/themes/default/assets/typedoc/components/Filter.ts index 7e62e6d57..cfda54cc1 100644 --- a/src/lib/output/themes/default/assets/typedoc/components/Filter.ts +++ b/src/lib/output/themes/default/assets/typedoc/components/Filter.ts @@ -30,7 +30,7 @@ export class Filter extends Component { this.setLocalStorage(this.fromLocalStorage()); style.innerHTML += `html:not(.${this.key}) .tsd-is-${this.el.name} { display: none; }\n`; - this.updateIndexHeadingVisibility(); + this.app.updateIndexVisibility(); } /** @@ -60,32 +60,6 @@ export class Filter extends Component { document.documentElement.classList.toggle(this.key, this.value); this.app.filterChanged(); - this.updateIndexHeadingVisibility(); - } - - private updateIndexHeadingVisibility() { - const indexAccordion = - document.querySelector(".tsd-index-content"); - const oldOpen = indexAccordion?.open; - if (indexAccordion) { - indexAccordion.open = true; - } - - // Hide index headings where all index items are hidden. - // offsetParent == null checks for display: none - document - .querySelectorAll(".tsd-index-section") - .forEach((el) => { - el.style.display = "block"; - const allChildrenHidden = Array.from( - el.querySelectorAll(".tsd-index-link"), - ).every((child) => child.offsetParent == null); - - el.style.display = allChildrenHidden ? "none" : "block"; - }); - - if (indexAccordion) { - indexAccordion.open = oldOpen!; - } + this.app.updateIndexVisibility(); } } diff --git a/src/lib/output/themes/default/layouts/default.tsx b/src/lib/output/themes/default/layouts/default.tsx index c87d4c7df..c513e99ec 100644 --- a/src/lib/output/themes/default/layouts/default.tsx +++ b/src/lib/output/themes/default/layouts/default.tsx @@ -44,7 +44,7 @@ export const defaultLayout = ( {/* settings, this appears to be a reasonable tradeoff between displaying page content without the */} {/* navigation on exceptionally slow connections and not having the navigation obviously repaint. */} - + {context.toolbar(props)} From edd6b6b5ecd3a7ef3d4dcea6ab1eab7ab6e2b33a Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 5 Mar 2024 20:22:59 -0700 Subject: [PATCH 23/30] Improve weird header handling Resolves #2515 --- CHANGELOG.md | 1 + .../themes/default/partials/navigation.tsx | 27 ++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 761696069..1bd5abcb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Bug Fixes - Fixed an issue introduced with 0.25.10 which causes the page index to initially render empty, #2514. +- "On This Page" section is now smarter when handling page headings which do not follow the normal `h1>h2>h3` process, #2515. ## v0.25.10 (2024-03-03) diff --git a/src/lib/output/themes/default/partials/navigation.tsx b/src/lib/output/themes/default/partials/navigation.tsx index 8e47f22ed..6622fa70d 100644 --- a/src/lib/output/themes/default/partials/navigation.tsx +++ b/src/lib/output/themes/default/partials/navigation.tsx @@ -122,10 +122,16 @@ export function pageSidebar(context: DefaultThemeRenderContext, props: PageEvent export function pageNavigation(context: DefaultThemeRenderContext, props: PageEvent) { const levels: JSX.Element[][] = [[]]; - function finalizeLevel() { + function finalizeLevel(finishedHandlingHeadings: boolean) { + const level = levels.pop()!; + if (levels[levels.length - 1].length === 0 && finishedHandlingHeadings) { + levels[levels.length - 1] = level; + return; + } + const built = (
        - {levels.pop()!.map((l) => ( + {level.map((l) => (
      • {l}
      • ))}
      @@ -136,9 +142,9 @@ export function pageNavigation(context: DefaultThemeRenderContext, props: PageEv for (const heading of props.pageHeadings) { const inferredLevel = heading.level ? heading.level + 1 : 1; while (inferredLevel < levels.length) { - finalizeLevel(); + finalizeLevel(false); } - if (inferredLevel > levels.length) { + while (inferredLevel > levels.length) { // Lower level than before levels.push([]); } @@ -152,13 +158,16 @@ export function pageNavigation(context: DefaultThemeRenderContext, props: PageEv } while (levels.length > 1) { - finalizeLevel(); + finalizeLevel(true); } if (!levels[0].length) { return <>; } + levels.unshift([]); + finalizeLevel(true); + return (
      @@ -167,13 +176,7 @@ export function pageNavigation(context: DefaultThemeRenderContext, props: PageEv On This Page -
      -
        - {levels[0].map((l) => ( -
      • {l}
      • - ))} -
      -
      +
      {levels[0]}
      ); } From 649c1fe5f544e86f9cd77c50c58fab6f5335e8e5 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 5 Mar 2024 20:26:19 -0700 Subject: [PATCH 24/30] Disable sitemap for base config to make comparisons easier --- .config/typedoc.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.config/typedoc.json b/.config/typedoc.json index 55582c697..d0186774a 100644 --- a/.config/typedoc.json +++ b/.config/typedoc.json @@ -21,7 +21,6 @@ "treatWarningsAsErrors": false, "categorizeByGroup": false, "categoryOrder": ["Reflections", "Types", "Comments", "*"], - "sitemapBaseUrl": "https://typedoc.org/api/", "validation": { "notExported": true, "invalidLink": true, From c72c6218d2f95af841dfa4a8cc1fe34c416fdb60 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Tue, 5 Mar 2024 20:31:13 -0700 Subject: [PATCH 25/30] Bump version to 0.25.11 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 43bc8c335..162eeef17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typedoc", - "version": "0.25.10", + "version": "0.25.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "typedoc", - "version": "0.25.10", + "version": "0.25.11", "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", diff --git a/package.json b/package.json index 0e36e3219..b7f1775bd 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.25.10", + "version": "0.25.11", "homepage": "https://typedoc.org", "exports": { ".": "./dist/index.js", From 9a1a5afe44937c65150435b16eb6af97c5e86952 Mon Sep 17 00:00:00 2001 From: TypeDoc Bot Date: Wed, 6 Mar 2024 03:32:07 +0000 Subject: [PATCH 26/30] Update changelog for release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1bd5abcb1..900a7ca14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +## v0.25.11 (2024-03-06) + ### Bug Fixes - Fixed an issue introduced with 0.25.10 which causes the page index to initially render empty, #2514. From c3ae6ec96aed65a1cafc3c4b6039a6820547e298 Mon Sep 17 00:00:00 2001 From: Matt Palermo Date: Sun, 10 Mar 2024 12:41:14 -0400 Subject: [PATCH 27/30] Change default font to be compatible with Mac (#2520) * Set default font to Open Sans web font Segoe UI causes some text rendering issues on Mac. Use Open Sans as a close replacement. * Update font-family * Make prettier happy --------- Co-authored-by: Gerrit Birkeland --- CHANGELOG.md | 8 ++++++++ static/style.css | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 900a7ca14..40d241f7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Unreleased +### Bug Fixes + +- Updated page font to work around issues with Mac rendering, #2518 + +### Thanks! + +- @docmattman + ## v0.25.11 (2024-03-06) ### Bug Fixes diff --git a/static/style.css b/static/style.css index 98a437794..072daed85 100644 --- a/static/style.css +++ b/static/style.css @@ -405,7 +405,8 @@ dd { } body { background: var(--color-background); - font-family: "Segoe UI", sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", + Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; font-size: 16px; color: var(--color-text); } From e718b091ac207877ec2d0321547bd78ca7b2bbec Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 10 Mar 2024 11:21:09 -0600 Subject: [PATCH 28/30] Support TypeScript 5.4 Resolves #2517 Closes #2519 --- example/package-lock.json | 464 ++++++++-------- package-lock.json | 693 +++++++++++++----------- package.json | 20 +- src/lib/converter/types.ts | 4 +- src/lib/utils/options/declaration.ts | 8 +- src/test/behavior.c2.test.ts | 8 + src/test/capture-screenshots.ts | 2 +- src/test/converter2/behavior/noInfer.ts | 7 + 8 files changed, 635 insertions(+), 571 deletions(-) create mode 100644 src/test/converter2/behavior/noInfer.ts diff --git a/example/package-lock.json b/example/package-lock.json index 216c4bec6..b67af742e 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -1,235 +1,235 @@ { - "name": "typedoc-example", - "version": "0.0.0", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "typedoc-example", - "version": "0.0.0", - "license": "Apache-2.0", - "dependencies": { - "@types/lodash": "^4.14.177", - "@types/react": "^17.0.37", - "@types/react-dom": "^17.0.11", - "lodash": "^4.17.21", - "react": "^17.0.2", - "react-dom": "^17.0.2" - }, - "devDependencies": { - "typescript": "^5.3.2" - } - }, - "node_modules/@types/lodash": { - "version": "4.14.177", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz", - "integrity": "sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==" - }, - "node_modules/@types/prop-types": { - "version": "15.7.4", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", - "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" - }, - "node_modules/@types/react": { - "version": "17.0.37", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", - "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz", - "integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==", - "dependencies": { - "@types/react": "*" - } - }, - "node_modules/@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" - }, - "node_modules/csstype": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", - "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" - }, - "peerDependencies": { - "react": "17.0.2" - } - }, - "node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - } - }, - "dependencies": { - "@types/lodash": { - "version": "4.14.177", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz", - "integrity": "sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==" - }, - "@types/prop-types": { - "version": "15.7.4", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", - "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" - }, - "@types/react": { - "version": "17.0.37", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", - "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", - "requires": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "@types/react-dom": { - "version": "17.0.11", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz", - "integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==", - "requires": { - "@types/react": "*" - } - }, - "@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" - }, - "csstype": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", - "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" - }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" - } - }, - "scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "requires": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "typescript": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", - "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", - "dev": true + "name": "typedoc-example", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "typedoc-example", + "version": "0.0.0", + "license": "Apache-2.0", + "dependencies": { + "@types/lodash": "^4.14.177", + "@types/react": "^17.0.37", + "@types/react-dom": "^17.0.11", + "lodash": "^4.17.21", + "react": "^17.0.2", + "react-dom": "^17.0.2" + }, + "devDependencies": { + "typescript": "^5.3.2" + } + }, + "node_modules/@types/lodash": { + "version": "4.14.177", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz", + "integrity": "sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==" + }, + "node_modules/@types/prop-types": { + "version": "15.7.4", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" + }, + "node_modules/@types/react": { + "version": "17.0.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", + "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "17.0.11", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz", + "integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==", + "dependencies": { + "@types/react": "*" + } + }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, + "node_modules/csstype": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", + "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "peerDependencies": { + "react": "17.0.2" + } + }, + "node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/typescript": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + } + }, + "dependencies": { + "@types/lodash": { + "version": "4.14.177", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz", + "integrity": "sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==" + }, + "@types/prop-types": { + "version": "15.7.4", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz", + "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ==" + }, + "@types/react": { + "version": "17.0.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", + "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-dom": { + "version": "17.0.11", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.11.tgz", + "integrity": "sha512-f96K3k+24RaLGVu/Y2Ng3e1EbZ8/cVJvypZWd7cy0ofCBaf2lcM46xNhycMZ2xGwbBjRql7hOlZ+e2WlJ5MH3Q==", + "requires": { + "@types/react": "*" + } + }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, + "csstype": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", + "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "react-dom": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", + "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + } + }, + "scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "requires": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "typescript": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "dev": true + } } - } } diff --git a/package-lock.json b/package-lock.json index 162eeef17..f6d54f9d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,27 +18,27 @@ "typedoc": "bin/typedoc" }, "devDependencies": { - "@types/lunr": "^2.3.5", + "@types/lunr": "^2.3.7", "@types/marked": "^4.0.8", - "@types/mocha": "^10.0.2", + "@types/mocha": "^10.0.6", "@types/node": "16", - "@typescript-eslint/eslint-plugin": "^6.16.0", - "@typescript-eslint/parser": "^6.16.0", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", "@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#8abd1494280116ff5318dde2c50ad01e1663790c", - "c8": "^8.0.1", - "esbuild": "^0.19.11", - "eslint": "^8.56.0", - "mocha": "^10.2.0", + "c8": "^9.1.0", + "esbuild": "^0.20.1", + "eslint": "^8.57.0", + "mocha": "^10.3.0", "prettier": "3.0.3", "puppeteer": "^13.5.2", "ts-node": "^10.9.2", - "typescript": "5.3.3" + "typescript": "5.4.2" }, "engines": { "node": ">= 16" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -69,9 +69,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.11.tgz", - "integrity": "sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.1.tgz", + "integrity": "sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==", "cpu": [ "ppc64" ], @@ -85,9 +85,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.11.tgz", - "integrity": "sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.20.1.tgz", + "integrity": "sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==", "cpu": [ "arm" ], @@ -101,9 +101,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.11.tgz", - "integrity": "sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.20.1.tgz", + "integrity": "sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==", "cpu": [ "arm64" ], @@ -117,9 +117,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.11.tgz", - "integrity": "sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.20.1.tgz", + "integrity": "sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==", "cpu": [ "x64" ], @@ -133,9 +133,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.11.tgz", - "integrity": "sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.20.1.tgz", + "integrity": "sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==", "cpu": [ "arm64" ], @@ -149,9 +149,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.11.tgz", - "integrity": "sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.20.1.tgz", + "integrity": "sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==", "cpu": [ "x64" ], @@ -165,9 +165,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.11.tgz", - "integrity": "sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.1.tgz", + "integrity": "sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==", "cpu": [ "arm64" ], @@ -181,9 +181,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.11.tgz", - "integrity": "sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.20.1.tgz", + "integrity": "sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==", "cpu": [ "x64" ], @@ -197,9 +197,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.11.tgz", - "integrity": "sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.20.1.tgz", + "integrity": "sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==", "cpu": [ "arm" ], @@ -213,9 +213,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.11.tgz", - "integrity": "sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.20.1.tgz", + "integrity": "sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==", "cpu": [ "arm64" ], @@ -229,9 +229,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.11.tgz", - "integrity": "sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.20.1.tgz", + "integrity": "sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==", "cpu": [ "ia32" ], @@ -245,9 +245,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.11.tgz", - "integrity": "sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.20.1.tgz", + "integrity": "sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==", "cpu": [ "loong64" ], @@ -261,9 +261,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.11.tgz", - "integrity": "sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.20.1.tgz", + "integrity": "sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==", "cpu": [ "mips64el" ], @@ -277,9 +277,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.11.tgz", - "integrity": "sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.20.1.tgz", + "integrity": "sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==", "cpu": [ "ppc64" ], @@ -293,9 +293,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.11.tgz", - "integrity": "sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.20.1.tgz", + "integrity": "sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==", "cpu": [ "riscv64" ], @@ -309,9 +309,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.11.tgz", - "integrity": "sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.20.1.tgz", + "integrity": "sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==", "cpu": [ "s390x" ], @@ -325,9 +325,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.11.tgz", - "integrity": "sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.20.1.tgz", + "integrity": "sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==", "cpu": [ "x64" ], @@ -341,9 +341,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.11.tgz", - "integrity": "sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.20.1.tgz", + "integrity": "sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==", "cpu": [ "x64" ], @@ -357,9 +357,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.11.tgz", - "integrity": "sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.20.1.tgz", + "integrity": "sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==", "cpu": [ "x64" ], @@ -373,9 +373,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.11.tgz", - "integrity": "sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.20.1.tgz", + "integrity": "sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==", "cpu": [ "x64" ], @@ -389,9 +389,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.11.tgz", - "integrity": "sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.20.1.tgz", + "integrity": "sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==", "cpu": [ "arm64" ], @@ -405,9 +405,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.11.tgz", - "integrity": "sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.20.1.tgz", + "integrity": "sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==", "cpu": [ "ia32" ], @@ -421,9 +421,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.11.tgz", - "integrity": "sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.20.1.tgz", + "integrity": "sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==", "cpu": [ "x64" ], @@ -452,9 +452,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -506,22 +506,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -564,9 +564,9 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", "dev": true }, "node_modules/@istanbuljs/schema": { @@ -579,9 +579,9 @@ } }, "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", - "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "engines": { "node": ">=6.0.0" @@ -663,9 +663,9 @@ "dev": true }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", - "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/json-schema": { @@ -675,39 +675,39 @@ "dev": true }, "node_modules/@types/lunr": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/lunr/-/lunr-2.3.5.tgz", - "integrity": "sha512-C4xYh7A4FRKg70AWJCe27oJYVPhUlEY5MQ4dKbRR7G6Xsb2HiqO672yWHRvWxl8/h7IuISvwDjv88ECHUEsV2A==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/@types/lunr/-/lunr-2.3.7.tgz", + "integrity": "sha512-Tb/kUm38e8gmjahQzdCKhbdsvQ9/ppzHFfsJ0dMs3ckqQsRj+P5IkSAwFTBrBxdyr3E/LoMUUrZngjDYAjiE3A==", "dev": true }, "node_modules/@types/marked": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.3.1.tgz", - "integrity": "sha512-vSSbKZFbNktrQ15v7o1EaH78EbWV+sPQbPjHG+Cp8CaNcPFUEfjZ0Iml/V0bFDwsTlYe8o6XC5Hfdp91cqPV2g==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-4.3.2.tgz", + "integrity": "sha512-a79Yc3TOk6dGdituy8hmTTJXjOkZ7zsFYV10L337ttq/rec8lRMDBpV7fL3uLx6TgbFCa5DU/h8FmIBQPSbU0w==", "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", + "version": "10.0.6", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.6.tgz", + "integrity": "sha512-dJvrYWxP/UcXm36Qn36fxhUKu8A/xMRXVT2cliFF1Z7UA9liG5Psj3ezNSZw+5puH2czDXRLcXQxf8JbJt0ejg==", "dev": true }, "node_modules/@types/node": { - "version": "16.18.40", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.40.tgz", - "integrity": "sha512-+yno3ItTEwGxXiS/75Q/aHaa5srkpnJaH+kdkTVJ3DtJEwv92itpKbxU+FjPoh2m/5G9zmUQfrL4A4C13c+iGA==", + "version": "16.18.87", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.87.tgz", + "integrity": "sha512-+IzfhNirR/MDbXz6Om5eHV54D9mQlEMGag6AgEzlju0xH3M8baCXYwqQ6RKgGMpn9wSTx6Ltya/0y4Z8eSfdLw==", "dev": true }, "node_modules/@types/semver": { - "version": "7.5.6", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz", - "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==", + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", "dev": true }, "node_modules/@types/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==", + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.10.3.tgz", + "integrity": "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==", "dev": true, "optional": true, "dependencies": { @@ -715,16 +715,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz", - "integrity": "sha512-O5f7Kv5o4dLWQtPX4ywPPa+v9G+1q1x8mz0Kr0pXUtKsevo+gIJHLkGc8RxaZWtP8RrhwhSNIWThnW42K9/0rQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.1.1.tgz", + "integrity": "sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/type-utils": "6.16.0", - "@typescript-eslint/utils": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/type-utils": "7.1.1", + "@typescript-eslint/utils": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -740,8 +740,8 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", - "eslint": "^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^7.0.0", + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -750,15 +750,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.16.0.tgz", - "integrity": "sha512-H2GM3eUo12HpKZU9njig3DF5zJ58ja6ahj1GoHEHOgQvYxzoFJJEvC1MQ7T2l9Ha+69ZSOn7RTxOdpC/y3ikMw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.1.1.tgz", + "integrity": "sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4" }, "engines": { @@ -769,7 +769,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -778,13 +778,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.16.0.tgz", - "integrity": "sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.1.1.tgz", + "integrity": "sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0" + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -795,13 +795,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.16.0.tgz", - "integrity": "sha512-ThmrEOcARmOnoyQfYkHw/DX2SEYBalVECmoldVuH6qagKROp/jMnfXpAU/pAIWub9c4YTxga+XwgAkoA0pxfmg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.1.1.tgz", + "integrity": "sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "6.16.0", - "@typescript-eslint/utils": "6.16.0", + "@typescript-eslint/typescript-estree": "7.1.1", + "@typescript-eslint/utils": "7.1.1", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -813,7 +813,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" }, "peerDependenciesMeta": { "typescript": { @@ -822,9 +822,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.16.0.tgz", - "integrity": "sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.1.1.tgz", + "integrity": "sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==", "dev": true, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -835,13 +835,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.16.0.tgz", - "integrity": "sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.1.1.tgz", + "integrity": "sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/visitor-keys": "6.16.0", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/visitor-keys": "7.1.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -863,17 +863,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.16.0.tgz", - "integrity": "sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.1.1.tgz", + "integrity": "sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.16.0", - "@typescript-eslint/types": "6.16.0", - "@typescript-eslint/typescript-estree": "6.16.0", + "@typescript-eslint/scope-manager": "7.1.1", + "@typescript-eslint/types": "7.1.1", + "@typescript-eslint/typescript-estree": "7.1.1", "semver": "^7.5.4" }, "engines": { @@ -884,16 +884,16 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^8.56.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.16.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.16.0.tgz", - "integrity": "sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.1.1.tgz", + "integrity": "sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "6.16.0", + "@typescript-eslint/types": "7.1.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { @@ -921,9 +921,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -942,9 +942,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, "engines": { "node": ">=0.4.0" @@ -1155,19 +1155,18 @@ } }, "node_modules/c8": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.1.tgz", - "integrity": "sha512-EINpopxZNH1mETuI0DzRA4MZpAUH+IFiRhnmFD3vFr3vdrgxqi3VfE3KL0AIL+zDq8rC9bZqwM/VDmmoe04y7w==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-9.1.0.tgz", + "integrity": "sha512-mBWcT5iqNir1zIkzSPyI3NCR9EZCVI3WUD+AVO17MVWTSFNyUueXE82qTeampNtTr+ilN/5Ua3j24LgbCKjDVg==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", "@istanbuljs/schema": "^0.1.3", "find-up": "^5.0.0", - "foreground-child": "^2.0.0", + "foreground-child": "^3.1.1", "istanbul-lib-coverage": "^3.2.0", "istanbul-lib-report": "^3.0.1", "istanbul-reports": "^3.1.6", - "rimraf": "^3.0.2", "test-exclude": "^6.0.0", "v8-to-istanbul": "^9.0.0", "yargs": "^17.7.2", @@ -1177,7 +1176,7 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=12" + "node": ">=14.14.0" } }, "node_modules/callsites": { @@ -1301,9 +1300,9 @@ "dev": true }, "node_modules/convert-source-map": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, "node_modules/create-require": { @@ -1425,9 +1424,9 @@ } }, "node_modules/esbuild": { - "version": "0.19.11", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.11.tgz", - "integrity": "sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==", + "version": "0.20.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.20.1.tgz", + "integrity": "sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==", "dev": true, "hasInstallScript": true, "bin": { @@ -1437,35 +1436,35 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.19.11", - "@esbuild/android-arm": "0.19.11", - "@esbuild/android-arm64": "0.19.11", - "@esbuild/android-x64": "0.19.11", - "@esbuild/darwin-arm64": "0.19.11", - "@esbuild/darwin-x64": "0.19.11", - "@esbuild/freebsd-arm64": "0.19.11", - "@esbuild/freebsd-x64": "0.19.11", - "@esbuild/linux-arm": "0.19.11", - "@esbuild/linux-arm64": "0.19.11", - "@esbuild/linux-ia32": "0.19.11", - "@esbuild/linux-loong64": "0.19.11", - "@esbuild/linux-mips64el": "0.19.11", - "@esbuild/linux-ppc64": "0.19.11", - "@esbuild/linux-riscv64": "0.19.11", - "@esbuild/linux-s390x": "0.19.11", - "@esbuild/linux-x64": "0.19.11", - "@esbuild/netbsd-x64": "0.19.11", - "@esbuild/openbsd-x64": "0.19.11", - "@esbuild/sunos-x64": "0.19.11", - "@esbuild/win32-arm64": "0.19.11", - "@esbuild/win32-ia32": "0.19.11", - "@esbuild/win32-x64": "0.19.11" + "@esbuild/aix-ppc64": "0.20.1", + "@esbuild/android-arm": "0.20.1", + "@esbuild/android-arm64": "0.20.1", + "@esbuild/android-x64": "0.20.1", + "@esbuild/darwin-arm64": "0.20.1", + "@esbuild/darwin-x64": "0.20.1", + "@esbuild/freebsd-arm64": "0.20.1", + "@esbuild/freebsd-x64": "0.20.1", + "@esbuild/linux-arm": "0.20.1", + "@esbuild/linux-arm64": "0.20.1", + "@esbuild/linux-ia32": "0.20.1", + "@esbuild/linux-loong64": "0.20.1", + "@esbuild/linux-mips64el": "0.20.1", + "@esbuild/linux-ppc64": "0.20.1", + "@esbuild/linux-riscv64": "0.20.1", + "@esbuild/linux-s390x": "0.20.1", + "@esbuild/linux-x64": "0.20.1", + "@esbuild/netbsd-x64": "0.20.1", + "@esbuild/openbsd-x64": "0.20.1", + "@esbuild/sunos-x64": "0.20.1", + "@esbuild/win32-arm64": "0.20.1", + "@esbuild/win32-ia32": "0.20.1", + "@esbuild/win32-x64": "0.20.1" } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", "dev": true, "engines": { "node": ">=6" @@ -1484,16 +1483,16 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -1714,9 +1713,9 @@ "dev": true }, "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dev": true, "dependencies": { "reusify": "^1.0.4" @@ -1781,12 +1780,13 @@ } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { - "flatted": "^3.1.0", + "flatted": "^3.2.9", + "keyv": "^4.5.3", "rimraf": "^3.0.2" }, "engines": { @@ -1794,22 +1794,25 @@ } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", + "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true }, "node_modules/foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" + "signal-exit": "^4.0.1" }, "engines": { - "node": ">=8.0.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/fs-constants": { @@ -1825,9 +1828,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -1863,20 +1866,19 @@ } }, "node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" + "minimatch": "^5.0.1", + "once": "^1.3.0" }, "engines": { - "node": "*" + "node": ">=12" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -1894,26 +1896,16 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, "node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/globals": { @@ -2015,9 +2007,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true, "engines": { "node": ">= 4" @@ -2152,9 +2144,9 @@ "dev": true }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" @@ -2175,9 +2167,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", - "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.7.tgz", + "integrity": "sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -2199,6 +2191,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -2212,9 +2210,18 @@ "dev": true }, "node_modules/jsonc-parser": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", - "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==" + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "dependencies": { + "json-buffer": "3.0.1" + } }, "node_modules/levn": { "version": "0.4.1", @@ -2358,9 +2365,9 @@ "dev": true }, "node_modules/mocha": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", - "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.3.0.tgz", + "integrity": "sha512-uF2XJs+7xSLsrmIvn37i/wnc91nw7XjOQB8ccyx5aEgdnohr7n+rEiZP23WkCYHjilR6+EboEnbq/ZQDz4LSbg==", "dev": true, "dependencies": { "ansi-colors": "4.1.1", @@ -2370,13 +2377,12 @@ "diff": "5.0.0", "escape-string-regexp": "4.0.0", "find-up": "5.0.0", - "glob": "7.2.0", + "glob": "8.1.0", "he": "1.2.0", "js-yaml": "4.1.0", "log-symbols": "4.1.0", "minimatch": "5.0.1", "ms": "2.1.3", - "nanoid": "3.3.3", "serialize-javascript": "6.0.0", "strip-json-comments": "3.1.1", "supports-color": "8.1.1", @@ -2391,10 +2397,6 @@ }, "engines": { "node": ">= 14.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/mochajs" } }, "node_modules/mocha/node_modules/cliui": { @@ -2474,18 +2476,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "node_modules/nanoid": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", - "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -2778,7 +2768,7 @@ "version": "13.7.0", "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-13.7.0.tgz", "integrity": "sha512-U1uufzBjz3+PkpCxFrWzh4OrMIdIb2ztzCu0YEPfRHjHswcSwHZswnK+WdsOQJsRV8WeTg3jLhJR4D867+fjsA==", - "deprecated": "< 19.4.0 is no longer supported", + "deprecated": "< 21.5.0 is no longer supported", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2897,6 +2887,48 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -2941,9 +2973,9 @@ ] }, "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", + "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -2997,10 +3029,16 @@ } }, "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/slash": { "version": "3.0.0", @@ -3122,6 +3160,26 @@ "concat-map": "0.0.1" } }, + "node_modules/test-exclude/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/test-exclude/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3165,12 +3223,12 @@ "dev": true }, "node_modules/ts-api-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", - "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", "dev": true, "engines": { - "node": ">=16.13.0" + "node": ">=16" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -3253,9 +3311,9 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.2.tgz", + "integrity": "sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -3297,42 +3355,27 @@ "dev": true }, "node_modules/v8-to-istanbul": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz", - "integrity": "sha512-6z3GW9x8G1gd+JIIgQQQxXuiJtCXeAjp6RaPEPLv62mH3iPHPxV6W3robxtCzNErRo6ZwTmzWhsbNvjyEBKzKA==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", "@types/istanbul-lib-coverage": "^2.0.1", - "convert-source-map": "^1.6.0" + "convert-source-map": "^2.0.0" }, "engines": { "node": ">=10.12.0" } }, - "node_modules/v8-to-istanbul/node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/v8-to-istanbul/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true - }, "node_modules/v8-to-istanbul/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/vscode-oniguruma": { diff --git a/package.json b/package.json index b7f1775bd..313d3aad3 100644 --- a/package.json +++ b/package.json @@ -30,24 +30,24 @@ "shiki": "^0.14.7" }, "peerDependencies": { - "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x" }, "devDependencies": { - "@types/lunr": "^2.3.5", + "@types/lunr": "^2.3.7", "@types/marked": "^4.0.8", - "@types/mocha": "^10.0.2", + "@types/mocha": "^10.0.6", "@types/node": "16", - "@typescript-eslint/eslint-plugin": "^6.16.0", - "@typescript-eslint/parser": "^6.16.0", + "@typescript-eslint/eslint-plugin": "^7.1.1", + "@typescript-eslint/parser": "^7.1.1", "@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#8abd1494280116ff5318dde2c50ad01e1663790c", - "c8": "^8.0.1", - "esbuild": "^0.19.11", - "eslint": "^8.56.0", - "mocha": "^10.2.0", + "c8": "^9.1.0", + "esbuild": "^0.20.1", + "eslint": "^8.57.0", + "mocha": "^10.3.0", "prettier": "3.0.3", "puppeteer": "^13.5.2", "ts-node": "^10.9.2", - "typescript": "5.3.3" + "typescript": "5.4.2" }, "files": [ "/bin", diff --git a/src/lib/converter/types.ts b/src/lib/converter/types.ts index d1d19ee49..e7d0c284e 100644 --- a/src/lib/converter/types.ts +++ b/src/lib/converter/types.ts @@ -676,8 +676,10 @@ const queryConverter: TypeConverter = { return new QueryType(ref); }, convertType(context, type, node) { + // Order matters here - check the node location first so that if the typeof is targeting + // an instantiation expression we get the user's exprName. const symbol = - type.getSymbol() || context.getSymbolAtLocation(node.exprName); + context.getSymbolAtLocation(node.exprName) || type.getSymbol(); assert( symbol, `Query type failed to get a symbol for: ${context.checker.typeToString( diff --git a/src/lib/utils/options/declaration.ts b/src/lib/utils/options/declaration.ts index 8646e7948..2a9b4861b 100644 --- a/src/lib/utils/options/declaration.ts +++ b/src/lib/utils/options/declaration.ts @@ -261,8 +261,12 @@ export type KeyToDeclaration = ? MixedDeclarationOption | ObjectDeclarationOption : TypeDocOptionMap[K] extends ManuallyValidatedOption ? - | (MixedDeclarationOption & { validate(value: unknown): void }) - | (ObjectDeclarationOption & { validate(value: unknown): void }) + | (MixedDeclarationOption & { + validate(value: unknown): void; + }) + | (ObjectDeclarationOption & { + validate(value: unknown): void; + }) : TypeDocOptionMap[K] extends Record ? FlagsDeclarationOption : TypeDocOptionMap[K] extends Record diff --git a/src/test/behavior.c2.test.ts b/src/test/behavior.c2.test.ts index 9ce77f850..44085dc8d 100644 --- a/src/test/behavior.c2.test.ts +++ b/src/test/behavior.c2.test.ts @@ -1171,4 +1171,12 @@ describe("Behavior Tests", () => { logger.expectNoMessage("debug: Refusing to recurse*"); }); + + it("Handles NoInfer intrinsic type", () => { + const project = convert("noInfer"); + const sig = querySig(project, "createStreetLight"); + equal(sig.parameters?.length, 2); + equal(sig.parameters[0].type?.toString(), "C[]"); + equal(sig.parameters[1].type?.toString(), "NoInfer"); + }); }); diff --git a/src/test/capture-screenshots.ts b/src/test/capture-screenshots.ts index ca0db17e9..e46b4e0b8 100644 --- a/src/test/capture-screenshots.ts +++ b/src/test/capture-screenshots.ts @@ -37,7 +37,7 @@ class PQueue { const nextPromise = Promise.resolve().then(next); queue.push(nextPromise); nextPromise.then(() => { - queue.splice(queue.indexOf(nextPromise), 1); + void queue.splice(queue.indexOf(nextPromise), 1); tick(); }, doReject); } else { diff --git a/src/test/converter2/behavior/noInfer.ts b/src/test/converter2/behavior/noInfer.ts new file mode 100644 index 000000000..fd3872fa9 --- /dev/null +++ b/src/test/converter2/behavior/noInfer.ts @@ -0,0 +1,7 @@ +export function createStreetLight( + colors: C[], + defaultColor?: NoInfer, +) {} + +// @ts-expect-error +createStreetLight(["red", "yellow", "green"], "blue"); From e8cb1a9f00921b11bd57df687ed797c96701dcb0 Mon Sep 17 00:00:00 2001 From: Gerrit Birkeland Date: Sun, 10 Mar 2024 11:48:01 -0600 Subject: [PATCH 29/30] Bump version to 0.25.12 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f6d54f9d0..29bb38576 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "typedoc", - "version": "0.25.11", + "version": "0.25.12", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "typedoc", - "version": "0.25.11", + "version": "0.25.12", "license": "Apache-2.0", "dependencies": { "lunr": "^2.3.9", diff --git a/package.json b/package.json index 313d3aad3..6adc07a9c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "typedoc", "description": "Create api documentation for TypeScript projects.", - "version": "0.25.11", + "version": "0.25.12", "homepage": "https://typedoc.org", "exports": { ".": "./dist/index.js", From 52922142a6b4e5ccabbc1fb8707ba459174c0b88 Mon Sep 17 00:00:00 2001 From: TypeDoc Bot Date: Sun, 10 Mar 2024 17:48:58 +0000 Subject: [PATCH 30/30] Update changelog for release --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40d241f7a..bd810ae14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Unreleased +## v0.25.12 (2024-03-10) + ### Bug Fixes - Updated page font to work around issues with Mac rendering, #2518