Comparing version 0.23.23 to 0.23.24
@@ -9,3 +9,3 @@ /** | ||
export declare const MeaningKeywords: readonly ["class", "interface", "type", "enum", "namespace", "function", "var", "constructor", "member", "event", "call", "new", "index", "complex", "getter", "setter"]; | ||
export type MeaningKeyword = typeof MeaningKeywords[number]; | ||
export type MeaningKeyword = (typeof MeaningKeywords)[number]; | ||
export interface DeclarationReference { | ||
@@ -12,0 +12,0 @@ resolutionStart: "global" | "local"; |
@@ -18,8 +18,14 @@ "use strict"; | ||
: context.scope.name, kind, context.scope); | ||
// If we are creating signatures for a variable and the variable has a comment associated with it | ||
// then we should prefer that variable's comment over any comment on the signature. The comment plugin | ||
// If we are creating signatures for a variable or property and it has a comment associated with it | ||
// then we should prefer that comment over any comment on the signature. The comment plugin | ||
// will copy the comment down if this signature doesn't have one, so don't set one. | ||
let parentReflection = context.scope; | ||
if (parentReflection.kindOf(models_1.ReflectionKind.TypeLiteral) && | ||
parentReflection.parent instanceof models_1.DeclarationReflection) { | ||
parentReflection = parentReflection.parent; | ||
} | ||
if (declaration && | ||
(!context.scope.comment || | ||
!(context.scope.conversionFlags & models_1.ConversionFlags.VariableSource))) { | ||
(!parentReflection.comment || | ||
!(parentReflection.conversionFlags & | ||
models_1.ConversionFlags.VariableOrPropertySource))) { | ||
sigRef.comment = (0, comments_1.getSignatureComment)(declaration, context.converter.config, context.logger, context.converter.commentStyle); | ||
@@ -26,0 +32,0 @@ } |
@@ -347,2 +347,3 @@ "use strict"; | ||
: models_1.ReflectionKind.Property, symbol, exportSymbol); | ||
reflection.conversionFlags |= models_1.ConversionFlags.VariableOrPropertySource; | ||
const declaration = symbol.getDeclarations()?.[0]; | ||
@@ -361,3 +362,3 @@ let parameterType; | ||
reflection.defaultValue = declaration && (0, convert_expression_1.convertDefaultValue)(declaration); | ||
reflection.type = context.converter.convertType(context, (context.isConvertingTypeNode() ? parameterType : void 0) ?? | ||
reflection.type = context.converter.convertType(context.withScope(reflection), (context.isConvertingTypeNode() ? parameterType : void 0) ?? | ||
context.checker.getTypeOfSymbol(symbol)); | ||
@@ -481,3 +482,3 @@ if (reflection.flags.isOptional) { | ||
setModifiers(symbol, accessDeclaration, reflection); | ||
reflection.conversionFlags |= models_1.ConversionFlags.VariableSource; | ||
reflection.conversionFlags |= models_1.ConversionFlags.VariableOrPropertySource; | ||
context.finalizeDeclarationReflection(reflection); | ||
@@ -484,0 +485,0 @@ const reflectionContext = context.withScope(reflection); |
@@ -33,3 +33,3 @@ import type * as ts from "typescript"; | ||
None = 0, | ||
VariableSource = 1 | ||
VariableOrPropertySource = 1 | ||
} | ||
@@ -36,0 +36,0 @@ /** |
@@ -13,3 +13,3 @@ "use strict"; | ||
ConversionFlags[ConversionFlags["None"] = 0] = "None"; | ||
ConversionFlags[ConversionFlags["VariableSource"] = 1] = "VariableSource"; | ||
ConversionFlags[ConversionFlags["VariableOrPropertySource"] = 1] = "VariableOrPropertySource"; | ||
})(ConversionFlags = exports.ConversionFlags || (exports.ConversionFlags = {})); | ||
@@ -16,0 +16,0 @@ /** |
@@ -14,3 +14,3 @@ import type { SomeType } from "../types"; | ||
}; | ||
export type VarianceModifier = typeof VarianceModifier[keyof typeof VarianceModifier]; | ||
export type VarianceModifier = (typeof VarianceModifier)[keyof typeof VarianceModifier]; | ||
export declare class TypeParameterReflection extends Reflection { | ||
@@ -17,0 +17,0 @@ parent?: DeclarationReflection; |
@@ -92,3 +92,3 @@ import type * as ts from "typescript"; | ||
}; | ||
export type TypeContext = typeof TypeContext[keyof typeof TypeContext]; | ||
export type TypeContext = (typeof TypeContext)[keyof typeof TypeContext]; | ||
/** | ||
@@ -95,0 +95,0 @@ * Represents an array type. |
@@ -25,3 +25,3 @@ import * as ts from "typescript"; | ||
}; | ||
export type EntryPointStrategy = typeof EntryPointStrategy[keyof typeof EntryPointStrategy]; | ||
export type EntryPointStrategy = (typeof EntryPointStrategy)[keyof typeof EntryPointStrategy]; | ||
export interface DocumentationEntryPoint { | ||
@@ -28,0 +28,0 @@ displayName: string; |
@@ -116,3 +116,3 @@ "use strict"; | ||
const base = (0, fs_1.getCommonDirectory)(inputFiles); | ||
const result = inputFiles.flatMap((entry) => (0, fs_1.glob)(entry, base, { includeDirectories: true })); | ||
const result = inputFiles.flatMap((entry) => (0, fs_1.glob)(entry, base, { includeDirectories: true, followSymlinks: true })); | ||
return result; | ||
@@ -119,0 +119,0 @@ } |
@@ -47,2 +47,3 @@ /** | ||
includeDirectories?: boolean; | ||
followSymlinks?: boolean; | ||
}): string[]; |
@@ -134,9 +134,63 @@ "use strict"; | ||
*/ | ||
function glob(pattern, root, options) { | ||
function glob(pattern, root, options = {}) { | ||
const result = []; | ||
const mini = new minimatch_1.Minimatch(normalizePath(pattern)); | ||
const dirs = [normalizePath(root).split("/")]; | ||
do { | ||
const dir = dirs.shift(); | ||
if (options?.includeDirectories && mini.match(dir.join("/"))) { | ||
// cache of real paths to avoid infinite recursion | ||
const symlinkTargetsSeen = new Set(); | ||
// cache of fs.realpathSync results to avoid extra I/O | ||
const realpathCache = new Map(); | ||
const { includeDirectories = false, followSymlinks = false } = options; | ||
let dir = dirs.shift(); | ||
const handleFile = (path) => { | ||
const childPath = [...dir, path].join("/"); | ||
if (mini.match(childPath)) { | ||
result.push(childPath); | ||
} | ||
}; | ||
const handleDirectory = (path) => { | ||
const childPath = [...dir, path]; | ||
if (mini.set.some((row) => mini.matchOne(childPath, row, /* partial */ true))) { | ||
dirs.push(childPath); | ||
} | ||
}; | ||
const handleSymlink = (path) => { | ||
const childPath = [...dir, path].join("/"); | ||
let realpath; | ||
try { | ||
realpath = | ||
realpathCache.get(childPath) ?? fs.realpathSync(childPath); | ||
realpathCache.set(childPath, realpath); | ||
} | ||
catch { | ||
return; | ||
} | ||
if (symlinkTargetsSeen.has(realpath)) { | ||
return; | ||
} | ||
symlinkTargetsSeen.add(realpath); | ||
try { | ||
const stats = fs.statSync(realpath); | ||
if (stats.isDirectory()) { | ||
handleDirectory(path); | ||
} | ||
else if (stats.isFile()) { | ||
handleFile(path); | ||
} | ||
else if (stats.isSymbolicLink()) { | ||
const dirpath = dir.join("/"); | ||
if (dirpath === realpath) { | ||
// special case: real path of symlink is the directory we're currently traversing | ||
return; | ||
} | ||
const targetPath = (0, path_1.relative)(dirpath, realpath); | ||
handleSymlink(targetPath); | ||
} // everything else should be ignored | ||
} | ||
catch (e) { | ||
// invalid symbolic link; ignore | ||
} | ||
}; | ||
while (dir) { | ||
if (includeDirectories && mini.match(dir.join("/"))) { | ||
result.push(dir.join("/")); | ||
@@ -148,17 +202,15 @@ } | ||
if (child.isFile()) { | ||
const childPath = [...dir, child.name].join("/"); | ||
if (mini.match(childPath)) { | ||
result.push(childPath); | ||
} | ||
handleFile(child.name); | ||
} | ||
if (child.isDirectory() && child.name !== "node_modules") { | ||
const childPath = dir.concat(child.name); | ||
if (mini.set.some((row) => mini.matchOne(childPath, row, /* partial */ true))) { | ||
dirs.push(childPath); | ||
} | ||
else if (child.isDirectory() && child.name !== "node_modules") { | ||
handleDirectory(child.name); | ||
} | ||
else if (followSymlinks && child.isSymbolicLink()) { | ||
handleSymlink(child.name); | ||
} | ||
} | ||
} while (dirs.length); | ||
dir = dirs.shift(); | ||
} | ||
return result; | ||
} | ||
exports.glob = glob; |
@@ -13,3 +13,3 @@ import type { Theme as ShikiTheme } from "shiki"; | ||
/** @hidden */ | ||
export type EmitStrategy = typeof EmitStrategy[keyof typeof EmitStrategy]; | ||
export type EmitStrategy = (typeof EmitStrategy)[keyof typeof EmitStrategy]; | ||
/** | ||
@@ -25,3 +25,3 @@ * Determines how TypeDoc searches for comments. | ||
}; | ||
export type CommentStyle = typeof CommentStyle[keyof typeof CommentStyle]; | ||
export type CommentStyle = (typeof CommentStyle)[keyof typeof CommentStyle]; | ||
/** | ||
@@ -28,0 +28,0 @@ * An interface describing all TypeDoc specific options. Generated from a |
@@ -8,3 +8,3 @@ /** | ||
export declare const SORT_STRATEGIES: readonly ["source-order", "alphabetical", "enum-value-ascending", "enum-value-descending", "static-first", "instance-first", "visibility", "required-first", "kind"]; | ||
export type SortStrategy = typeof SORT_STRATEGIES[number]; | ||
export type SortStrategy = (typeof SORT_STRATEGIES)[number]; | ||
export declare function getSortFunction(opts: Options): (reflections: DeclarationReflection[]) => void; |
{ | ||
"name": "typedoc", | ||
"description": "Create api documentation for TypeScript projects.", | ||
"version": "0.23.23", | ||
"version": "0.23.24", | ||
"homepage": "https://typedoc.org", | ||
@@ -28,5 +28,5 @@ "main": "./dist/index.js", | ||
"lunr": "^2.3.9", | ||
"marked": "^4.2.4", | ||
"minimatch": "^5.1.1", | ||
"shiki": "^0.11.1" | ||
"marked": "^4.2.5", | ||
"minimatch": "^5.1.2", | ||
"shiki": "^0.12.1" | ||
}, | ||
@@ -40,12 +40,12 @@ "peerDependencies": { | ||
"@types/minimatch": "5.1.2", | ||
"@types/mocha": "^9.1.1", | ||
"@types/mocha": "^10.0.1", | ||
"@types/node": "14", | ||
"@typescript-eslint/eslint-plugin": "^5.46.1", | ||
"@typescript-eslint/parser": "^5.46.1", | ||
"@typescript-eslint/eslint-plugin": "^5.48.0", | ||
"@typescript-eslint/parser": "^5.48.0", | ||
"@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#5a9486bc66f6e36988106685768396281f6cbc10", | ||
"c8": "^7.12.0", | ||
"esbuild": "^0.16.8", | ||
"eslint": "^8.30.0", | ||
"esbuild": "^0.16.15", | ||
"eslint": "^8.31.0", | ||
"mocha": "^10.2.0", | ||
"prettier": "2.8.1", | ||
"prettier": "2.8.2", | ||
"puppeteer": "^13.5.2", | ||
@@ -67,7 +67,7 @@ "ts-node": "^10.9.1", | ||
"scripts": { | ||
"test": "mocha -r ts-node/register --config .config/mocha.fast.json", | ||
"test:cov": "c8 mocha -r ts-node/register --config .config/mocha.fast.json", | ||
"test": "mocha --config .config/mocha.fast.json", | ||
"test:cov": "c8 mocha --config .config/mocha.fast.json", | ||
"doc:c": "node bin/typedoc --tsconfig src/test/converter/tsconfig.json", | ||
"doc:c2": "node bin/typedoc --tsconfig src/test/converter2/tsconfig.json", | ||
"test:full": "c8 mocha -r ts-node/register --config .config/mocha.full.json", | ||
"test:full": "c8 mocha --config .config/mocha.full.json", | ||
"test:visual": "ts-node ./src/test/capture-screenshots.ts && ./scripts/compare_screenshots.sh", | ||
@@ -74,0 +74,0 @@ "test:visual:accept": "node scripts/accept_visual_regression.js", |
@@ -5,1 +5,55 @@ "use strict"; | ||
`}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.checked}setLocalStorage(n){Q.setItem(this.key,n.toString()),this.value=n,this.handleValueChange()}handleValueChange(){this.el.checked=this.value,document.documentElement.classList.toggle(this.key,this.value),this.app.filterChanged(),document.querySelectorAll(".tsd-index-section").forEach(n=>{n.style.display="block";let r=Array.from(n.querySelectorAll(".tsd-index-link")).every(i=>i.offsetParent==null);n.style.display=r?"none":"block"})}};var te=class extends I{constructor(n){super(n);this.calculateHeights(),this.summary=this.el.querySelector(".tsd-accordion-summary"),this.icon=this.summary.querySelector("svg"),this.key=`tsd-accordion-${this.summary.textContent.replace(/\s+/g,"-").toLowerCase()}`,this.setLocalStorage(this.fromLocalStorage(),!0),this.summary.addEventListener("click",r=>this.toggleVisibility(r)),this.icon.style.transform=this.getIconRotation()}getIconRotation(n=this.el.open){return`rotate(${n?0:-90}deg)`}calculateHeights(){let n=this.el.open,{position:r,left:i}=this.el.style;this.el.style.position="fixed",this.el.style.left="-9999px",this.el.open=!0,this.expandedHeight=this.el.offsetHeight+"px",this.el.open=!1,this.collapsedHeight=this.el.offsetHeight+"px",this.el.open=n,this.el.style.height=n?this.expandedHeight:this.collapsedHeight,this.el.style.position=r,this.el.style.left=i}toggleVisibility(n){n.preventDefault(),this.el.style.overflow="hidden",this.el.open?this.collapse():this.expand()}expand(n=!0){this.el.open=!0,this.animate(this.collapsedHeight,this.expandedHeight,{opening:!0,duration:n?300:0})}collapse(n=!0){this.animate(this.expandedHeight,this.collapsedHeight,{opening:!1,duration:n?300:0})}animate(n,r,{opening:i,duration:s=300}){if(this.animation)return;let o={duration:s,easing:"ease"};this.animation=this.el.animate({height:[n,r]},o),this.icon.animate({transform:[this.icon.style.transform||this.getIconRotation(!i),this.getIconRotation(i)]},o).addEventListener("finish",()=>{this.icon.style.transform=this.getIconRotation(i)}),this.animation.addEventListener("finish",()=>this.animationEnd(i))}animationEnd(n){this.el.open=n,this.animation=void 0,this.el.style.height="auto",this.el.style.overflow="visible",this.setLocalStorage(n)}fromLocalStorage(){let n=Q.getItem(this.key);return n?n==="true":this.el.open}setLocalStorage(n,r=!1){this.fromLocalStorage()===n&&!r||(Q.setItem(this.key,n.toString()),this.el.open=n,this.handleValueChange(r))}handleValueChange(n=!1){this.fromLocalStorage()===this.el.open&&!n||(this.fromLocalStorage()?this.expand(!1):this.collapse(!1))}};function be(t){let e=Q.getItem("tsd-theme")||"os";t.value=e,Ee(e),t.addEventListener("change",()=>{Q.setItem("tsd-theme",t.value),Ee(t.value)})}function Ee(t){document.documentElement.dataset.theme=t}ve();B(X,".menu-highlight");B(K,"a[data-toggle]");B(te,".tsd-index-accordion");B(ee,".tsd-filter-item input[type=checkbox]");var we=document.getElementById("theme");we&&be(we);var je=new Y;Object.defineProperty(window,"app",{value:je});})(); | ||
/*! Bundled license information: | ||
lunr/lunr.js: | ||
(** | ||
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 | ||
* Copyright (C) 2020 Oliver Nightingale | ||
* @license MIT | ||
*) | ||
(*! | ||
* lunr.utils | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.Set | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.tokenizer | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.Pipeline | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.Vector | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.stemmer | ||
* Copyright (C) 2020 Oliver Nightingale | ||
* Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt | ||
*) | ||
(*! | ||
* lunr.stopWordFilter | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.trimmer | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.TokenSet | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.Index | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
(*! | ||
* lunr.Builder | ||
* Copyright (C) 2020 Oliver Nightingale | ||
*) | ||
*/ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1036302
24480
+ Addedshiki@0.12.1(transitive)
+ Addedvscode-textmate@8.0.0(transitive)
- Removedshiki@0.11.1(transitive)
- Removedvscode-textmate@6.0.0(transitive)
Updatedmarked@^4.2.5
Updatedminimatch@^5.1.2
Updatedshiki@^0.12.1