Use explicit extensions for imports within src (#58421)

This commit is contained in:
Jake Bailey
2024-05-06 17:07:54 -07:00
committed by GitHub
parent 9598d35074
commit 16beff101a
582 changed files with 2583 additions and 2360 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.server.protocol namespace. */
export * from "../protocol";
export * from "../protocol.js";
+15 -15
View File
@@ -1,18 +1,18 @@
/* Generated file to emulate the ts.server namespace. */
export * from "../../jsTyping/_namespaces/ts.server";
export * from "../../typingsInstallerCore/_namespaces/ts.server";
export * from "../types";
export * from "../utilitiesPublic";
export * from "../utilities";
import * as protocol from "./ts.server.protocol";
export * from "../../jsTyping/_namespaces/ts.server.js";
export * from "../../typingsInstallerCore/_namespaces/ts.server.js";
export * from "../types.js";
export * from "../utilitiesPublic.js";
export * from "../utilities.js";
import * as protocol from "./ts.server.protocol.js";
export { protocol };
export * from "../scriptInfo";
export * from "../typingsCache";
export * from "../project";
export * from "../editorServices";
export * from "../moduleSpecifierCache";
export * from "../packageJsonCache";
export * from "../session";
export * from "../scriptVersionCache";
export * from "../typingInstallerAdapter";
export * from "../scriptInfo.js";
export * from "../typingsCache.js";
export * from "../project.js";
export * from "../editorServices.js";
export * from "../moduleSpecifierCache.js";
export * from "../packageJsonCache.js";
export * from "../session.js";
export * from "../scriptVersionCache.js";
export * from "../typingInstallerAdapter.js";
+5 -5
View File
@@ -1,9 +1,9 @@
/* Generated file to emulate the ts namespace. */
export * from "../../compiler/_namespaces/ts";
export * from "../../jsTyping/_namespaces/ts";
export * from "../../services/_namespaces/ts";
export * from "../../compiler/_namespaces/ts.js";
export * from "../../jsTyping/_namespaces/ts.js";
export * from "../../services/_namespaces/ts.js";
// Pull this in here so that plugins loaded by the server see compat wrappers.
export * from "../../deprecatedCompat/_namespaces/ts";
import * as server from "./ts.server";
export * from "../../deprecatedCompat/_namespaces/ts.js";
import * as server from "./ts.server.js";
export { server };
+3 -3
View File
@@ -136,7 +136,7 @@ import {
WatchOptions,
WatchType,
WildcardDirectoryWatcher,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
ActionInvalidate,
ActionSet,
@@ -186,8 +186,8 @@ import {
toNormalizedPath,
TypingsCache,
WatchTypingLocations,
} from "./_namespaces/ts.server";
import * as protocol from "./protocol";
} from "./_namespaces/ts.server.js";
import * as protocol from "./protocol.js";
export const maxProgramSizeForNonTsFiles = 20 * 1024 * 1024;
/** @internal */
+1 -1
View File
@@ -9,7 +9,7 @@ import {
Path,
ResolvedModuleSpecifierInfo,
UserPreferences,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
/** @internal */
export interface ModuleSpecifierResolutionCacheHost {
+2 -2
View File
@@ -8,8 +8,8 @@ import {
ProjectPackageJsonInfo,
Ternary,
tryFileExists,
} from "./_namespaces/ts";
import { ProjectService } from "./_namespaces/ts.server";
} from "./_namespaces/ts.js";
import { ProjectService } from "./_namespaces/ts.server.js";
/** @internal */
export interface PackageJsonCache {
+4 -4
View File
@@ -1,4 +1,4 @@
import * as ts from "./_namespaces/ts";
import * as ts from "./_namespaces/ts.js";
import {
addRange,
append,
@@ -133,7 +133,7 @@ import {
WatchDirectoryFlags,
WatchOptions,
WatchType,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
ActionInvalidate,
asNormalizedPath,
@@ -157,8 +157,8 @@ import {
toNormalizedPath,
TypingsCache,
updateProjectIfDirty,
} from "./_namespaces/ts.server";
import * as protocol from "./protocol";
} from "./_namespaces/ts.server.js";
import * as protocol from "./protocol.js";
export enum ProjectKind {
Inferred,
+3 -3
View File
@@ -1,4 +1,4 @@
import type * as ts from "./_namespaces/ts";
import type * as ts from "./_namespaces/ts.js";
import type {
ApplicableRefactorInfo,
CompilerOptionsValue,
@@ -21,13 +21,13 @@ import type {
TodoCommentDescriptor,
TypeAcquisition,
UserPreferences,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
ClassificationType,
CompletionTriggerKind,
OrganizeImportsMode,
SemicolonPreference,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
// These types/enums used to be defined in duplicate here and exported. They are re-exported to avoid breaking changes.
export { ApplicableRefactorInfo, ClassificationType, CompletionsTriggerCharacter, CompletionTriggerKind, OrganizeImportsMode, RefactorTriggerReason, RenameInfoFailure, SemicolonPreference, SignatureHelpTriggerReason, SymbolDisplayPart, UserPreferences };
+3 -3
View File
@@ -34,7 +34,7 @@ import {
SourceFile,
SourceFileLike,
TextSpan,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
AbsolutePositionAndLineText,
ConfiguredProject,
@@ -51,8 +51,8 @@ import {
Project,
ScriptVersionCache,
ServerHost,
} from "./_namespaces/ts.server";
import * as protocol from "./protocol";
} from "./_namespaces/ts.server.js";
import * as protocol from "./protocol.js";
/** @internal */
export class TextStorage {
+3 -3
View File
@@ -8,9 +8,9 @@ import {
TextChangeRange,
TextSpan,
unchangedTextChangeRange,
} from "./_namespaces/ts";
import { emptyArray } from "./_namespaces/ts.server";
import * as protocol from "./protocol";
} from "./_namespaces/ts.js";
import { emptyArray } from "./_namespaces/ts.server.js";
import * as protocol from "./protocol.js";
const lineCollectionCapacity = 4;
+3 -3
View File
@@ -136,7 +136,7 @@ import {
unmangleScopedPackageName,
version,
WithMetadata,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
AuxiliaryProject,
CloseFileWatcherEvent,
@@ -180,8 +180,8 @@ import {
stringifyIndented,
toNormalizedPath,
updateProjectIfDirty,
} from "./_namespaces/ts.server";
import * as protocol from "./protocol";
} from "./_namespaces/ts.server.js";
import * as protocol from "./protocol.js";
interface StackTraceError extends Error {
stack?: string;
+1 -1
View File
@@ -4,7 +4,7 @@ import {
FileWatcherCallback,
System,
WatchOptions,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
export interface CompressedData {
length: number;
+2 -2
View File
@@ -8,7 +8,7 @@ import {
server,
SortedReadonlyArray,
TypeAcquisition,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
ActionInvalidate,
ActionPackageInstalled,
@@ -39,7 +39,7 @@ import {
stringifyIndented,
TypesRegistryResponse,
TypingInstallerRequestUnion,
} from "./_namespaces/ts.server";
} from "./_namespaces/ts.server.js";
/** @internal */
export interface TypingsInstallerWorkerProcess {
+2 -2
View File
@@ -11,12 +11,12 @@ import {
sort,
SortedReadonlyArray,
TypeAcquisition,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
emptyArray,
Project,
ProjectService,
} from "./_namespaces/ts.server";
} from "./_namespaces/ts.server.js";
export interface InstallPackageOptionsWithProject extends InstallPackageOptions {
projectName: string;
+2 -2
View File
@@ -5,13 +5,13 @@ import {
identity,
perfLogger,
SortedArray,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
Logger,
LogLevel,
NormalizedPath,
ServerHost,
} from "./_namespaces/ts.server";
} from "./_namespaces/ts.server.js";
/** @internal */
export class ThrottledOperations {
+2 -2
View File
@@ -6,11 +6,11 @@ import {
SortedArray,
SortedReadonlyArray,
TypeAcquisition,
} from "./_namespaces/ts";
} from "./_namespaces/ts.js";
import {
DiscoverTypings,
Project,
} from "./_namespaces/ts.server";
} from "./_namespaces/ts.server.js";
export enum LogLevel {
terse,