chore: deps

This commit is contained in:
iCrawl
2024-02-06 01:53:30 +01:00
parent 3755e66d41
commit ae57d7facb
47 changed files with 4634 additions and 3664 deletions

View File

@@ -260,6 +260,7 @@ export class ExportAnalyzer {
: undefined;
const resolvedModule: ts.ResolvedModuleFull | undefined = TypeScriptInternals.getResolvedModule(
this._program,
importOrExportDeclaration.getSourceFile(),
moduleSpecifier,
mode,
@@ -856,6 +857,7 @@ export class ExportAnalyzer {
)
: undefined;
const resolvedModule: ts.ResolvedModuleFull | undefined = TypeScriptInternals.getResolvedModule(
this._program,
importOrExportDeclaration.getSourceFile(),
moduleSpecifier,
mode,

View File

@@ -369,7 +369,7 @@ export class Span {
* can make changes to Span.modification for each node.
*/
public forEach(callback: (span: Span) => void): void {
// eslint-disable-next-line n/callback-return, n/no-callback-literal
// eslint-disable-next-line n/callback-return
callback(this);
for (const child of this.children) {
// eslint-disable-next-line unicorn/no-array-for-each

View File

@@ -75,14 +75,19 @@ export class TypeScriptInternals {
* The compiler populates this cache as part of analyzing the source file.
*/
public static getResolvedModule(
program: ts.Program,
sourceFile: ts.SourceFile,
moduleNameText: string,
mode: ts.ModuleKind.CommonJS | ts.ModuleKind.ESNext | undefined,
): ts.ResolvedModuleFull | undefined {
// Compiler internal:
// https://github.com/microsoft/TypeScript/blob/v4.7.2/src/compiler/utilities.ts#L161
return (ts as any).getResolvedModule(sourceFile, moduleNameText, mode);
// https://github.com/microsoft/TypeScript/blob/v5.3.3/src/compiler/types.ts#L4698
const result: ts.ResolvedModuleWithFailedLookupLocations | undefined = (program as any).getResolvedModule(
sourceFile,
moduleNameText,
mode,
);
return result?.resolvedModule;
}
/**