mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
build: Upgrade dependencies and pnpm (#11420)
* build: upgrade dependencies * build: upgrade pnpm * test: fix voice * build: regenerate file * fix: reports by ESLint * fix: docs errors * build: downgrades * build: no upstream bump * build: discord-api-types 0.38.40 * build: pnpm 10.30.1 * fix: ignore @typescript-eslint/no-duplicate-type-constituents * fix: jsdoc lint in api-extractor * build: update template for ESLint Co-authored-by: Almeida <github@almeidx.dev> * chore: explicit TODO Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com> * chore: revert typings lint change --------- Co-authored-by: Qjuh <76154676+Qjuh@users.noreply.github.com> Co-authored-by: Almeida <github@almeidx.dev>
This commit is contained in:
@@ -132,7 +132,7 @@ export class AstImport extends AstSyntheticEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* {@inheritdoc AstEntity.localName}
|
||||
*/
|
||||
public get localName(): string {
|
||||
// abstract
|
||||
|
||||
@@ -81,7 +81,7 @@ export class AstNamespaceImport extends AstSyntheticEntity {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* {@inheritdoc AstEntity.localName}
|
||||
*/
|
||||
public get localName(): string {
|
||||
// abstract
|
||||
|
||||
@@ -53,7 +53,7 @@ export interface IAstSymbolOptions {
|
||||
*/
|
||||
export class AstSymbol extends AstEntity {
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
* {@inheritdoc AstEntity.localName}
|
||||
*/
|
||||
public readonly localName: string; // abstract
|
||||
|
||||
|
||||
@@ -476,7 +476,7 @@ export class ExportAnalyzer {
|
||||
const followedSymbolNode: ts.ImportTypeNode | ts.Node | undefined =
|
||||
followedSymbol.declarations && (followedSymbol.declarations[0] as ts.Node | undefined);
|
||||
|
||||
if (followedSymbolNode && followedSymbolNode.kind === ts.SyntaxKind.ImportType) {
|
||||
if (followedSymbolNode?.kind === ts.SyntaxKind.ImportType) {
|
||||
return this.fetchReferencedAstEntityFromImportTypeNode(
|
||||
followedSymbolNode as ts.ImportTypeNode,
|
||||
referringModuleIsExternal,
|
||||
|
||||
@@ -85,7 +85,7 @@ export class TypeScriptHelpers {
|
||||
firstDeclaration,
|
||||
ts.SyntaxKind.ModuleDeclaration,
|
||||
);
|
||||
if (highestModuleDeclaration && highestModuleDeclaration.name.getText().trim() === 'global') {
|
||||
if (highestModuleDeclaration?.name.getText().trim() === 'global') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ export class TypeScriptInternals {
|
||||
checker: ts.TypeChecker,
|
||||
): ts.Symbol | undefined {
|
||||
let symbol: ts.Symbol | undefined = (declaration as any).symbol;
|
||||
if (symbol && symbol.escapedName === ts.InternalSymbolName.Computed) {
|
||||
if (symbol?.escapedName === ts.InternalSymbolName.Computed) {
|
||||
const name: ts.DeclarationName | undefined = ts.getNameOfDeclaration(declaration);
|
||||
symbol = (name && checker.getSymbolAtLocation(name)) || symbol;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export const enum ExtractorMessageId {
|
||||
* "The `@inheritDoc` tag needs a TSDoc declaration reference; signature matching is not supported yet."
|
||||
*
|
||||
* @privateRemarks
|
||||
* In the future, we will implement signature matching so that you can write `{@inheritDoc}` and API Extractor
|
||||
* In the future, we will implement signature matching so that you can write `@inheritDoc` and API Extractor
|
||||
* will find a corresponding member from a base class (or implemented interface). Until then, the tag
|
||||
* always needs an explicit declaration reference such as `{@inhertDoc MyBaseClass.sameMethod}`.
|
||||
*/
|
||||
|
||||
@@ -493,7 +493,7 @@ export class Collector {
|
||||
private _createCollectorEntity(
|
||||
astEntity: AstEntity,
|
||||
entryPoint: IWorkingPackageEntryPoint,
|
||||
exportName?: string | undefined,
|
||||
exportName?: string,
|
||||
parent?: CollectorEntity,
|
||||
): void {
|
||||
let entity: CollectorEntity | undefined = this._entitiesByAstEntity.get(astEntity);
|
||||
|
||||
@@ -1707,7 +1707,7 @@ export class ApiModelGenerator {
|
||||
private _captureParameters(
|
||||
nodesToCapture: IExcerptBuilderNodeToCapture[],
|
||||
parameterNodes: ts.NodeArray<ts.ParameterDeclaration>,
|
||||
jsDoc?: DocgenParamJson[] | undefined,
|
||||
jsDoc?: DocgenParamJson[],
|
||||
): IApiParameterOptions[] {
|
||||
const parameters: IApiParameterOptions[] = [];
|
||||
for (const parameter of parameterNodes) {
|
||||
|
||||
@@ -328,7 +328,7 @@ export class ApiReportGenerator {
|
||||
replacedModifiers = 'export ' + replacedModifiers;
|
||||
}
|
||||
|
||||
if (previousSpan && previousSpan.kind === ts.SyntaxKind.SyntaxList) {
|
||||
if (previousSpan?.kind === ts.SyntaxKind.SyntaxList) {
|
||||
// If there is a previous span of type SyntaxList, then apply it before any other modifiers
|
||||
// (e.g. "abstract") that appear there.
|
||||
previousSpan.modification.prefix = replacedModifiers + previousSpan.modification.prefix;
|
||||
|
||||
@@ -294,7 +294,7 @@ export class DtsRollupGenerator {
|
||||
replacedModifiers = 'export ' + replacedModifiers;
|
||||
}
|
||||
|
||||
if (previousSpan && previousSpan.kind === ts.SyntaxKind.SyntaxList) {
|
||||
if (previousSpan?.kind === ts.SyntaxKind.SyntaxList) {
|
||||
// If there is a previous span of type SyntaxList, then apply it before any other modifiers
|
||||
// (e.g. "abstract") that appear there.
|
||||
previousSpan.modification.prefix = replacedModifiers + previousSpan.modification.prefix;
|
||||
@@ -426,11 +426,9 @@ export class DtsRollupGenerator {
|
||||
modification.suffix = nodeToTrim.children[nodeToTrim.children.length - 1]!.separator;
|
||||
}
|
||||
|
||||
if (
|
||||
nodeToTrim.nextSibling && // If the thing we are trimming is followed by a comma, then trim the comma also.
|
||||
// An example would be an enum member.
|
||||
nodeToTrim.nextSibling.kind === ts.SyntaxKind.CommaToken
|
||||
) {
|
||||
// If the thing we are trimming is followed by a comma, then trim the comma also.
|
||||
// An example would be an enum member.
|
||||
if (nodeToTrim.nextSibling?.kind === ts.SyntaxKind.CommaToken) {
|
||||
// Keep its separator since it often has useful whitespace
|
||||
modification.suffix += nodeToTrim.nextSibling.separator;
|
||||
nodeToTrim.nextSibling.modification.skipAll();
|
||||
|
||||
@@ -301,8 +301,7 @@ export class ExcerptBuilder {
|
||||
// There are two types of merges that can occur. We only perform these merges if they are
|
||||
// compatible with all of our token ranges.
|
||||
if (
|
||||
prevPrevToken &&
|
||||
prevPrevToken.kind === ExcerptTokenKind.Reference &&
|
||||
prevPrevToken?.kind === ExcerptTokenKind.Reference &&
|
||||
prevToken.kind === ExcerptTokenKind.Content &&
|
||||
prevToken.text.trim() === '.' &&
|
||||
currentToken.kind === ExcerptTokenKind.Reference &&
|
||||
|
||||
Reference in New Issue
Block a user