diff --git a/.eslintrc.json b/.eslintrc.json
index 668bbad52298f..1c2de33bec6c9 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -144,7 +144,8 @@
"local/no-in-operator": "error",
"local/debug-assert": "error",
"local/no-keywords": "error",
- "local/jsdoc-format": "error"
+ "local/jsdoc-format": "error",
+ "local/js-extensions": "error"
},
"overrides": [
// By default, the ESLint CLI only looks at .js files. But, it will also look at
diff --git a/.vscode/settings.template.json b/.vscode/settings.template.json
index e918fd9577867..82315167674d9 100644
--- a/.vscode/settings.template.json
+++ b/.vscode/settings.template.json
@@ -18,6 +18,9 @@
".git-blame-ignore-revs"
],
+ "javascript.preferences.importModuleSpecifierEnding": "js",
+ "typescript.preferences.importModuleSpecifierEnding": "js",
+
// Match dprint in organize/auto-imports.
"typescript.unstable": {
"organizeImportsCollation": "unicode",
diff --git a/scripts/eslint/rules/js-extensions.cjs b/scripts/eslint/rules/js-extensions.cjs
new file mode 100644
index 0000000000000..7e435d1ada8ce
--- /dev/null
+++ b/scripts/eslint/rules/js-extensions.cjs
@@ -0,0 +1,70 @@
+const { createRule } = require("./utils.cjs");
+
+module.exports = createRule({
+ name: "js-extensions",
+ meta: {
+ docs: {
+ description: ``,
+ },
+ messages: {
+ missingJsExtension: `This relative module reference is missing a '.js' extension`,
+ },
+ schema: [],
+ type: "suggestion",
+ fixable: "code",
+ },
+ defaultOptions: [],
+
+ create(context) {
+ /** @type {(
+ * node:
+ * | import("@typescript-eslint/utils").TSESTree.ImportDeclaration
+ * | import("@typescript-eslint/utils").TSESTree.ExportAllDeclaration
+ * | import("@typescript-eslint/utils").TSESTree.ExportNamedDeclaration
+ * | import("@typescript-eslint/utils").TSESTree.TSImportEqualsDeclaration
+ * | import("@typescript-eslint/utils").TSESTree.TSModuleDeclaration
+ * ) => void}
+ */
+ const check = node => {
+ let source;
+ if (node.type === "TSImportEqualsDeclaration") {
+ const moduleReference = node.moduleReference;
+ if (
+ moduleReference.type === "TSExternalModuleReference"
+ && moduleReference.expression.type === "Literal"
+ && typeof moduleReference.expression.value === "string"
+ ) {
+ source = moduleReference.expression;
+ }
+ }
+ else if (node.type === "TSModuleDeclaration") {
+ if (node.kind === "module" && node.id.type === "Literal") {
+ source = node.id;
+ }
+ }
+ else {
+ source = node.source;
+ }
+
+ // This is not 100% accurate; this could point to a nested package, or to a directory
+ // containing an index.js file. But we don't have anything like that in our repo,
+ // so this check is good enough. Replicate this logic at your own risk.
+ if (source?.value.startsWith(".") && !/\.[cm]?js$/.test(source.value)) {
+ const quote = source.raw[0];
+ context.report({
+ messageId: "missingJsExtension",
+ node: source,
+ fix: fixer => fixer.replaceText(source, `${quote}${source.value}.js${quote}`),
+ });
+ }
+ };
+
+ return {
+ ImportDeclaration: check,
+ ExportAllDeclaration: check,
+ ExportNamedDeclaration: check,
+ TSImportEqualsDeclaration: check,
+ TSModuleDeclaration: check,
+ };
+ },
+});
diff --git a/scripts/eslint/tests/js-extensions.cjs b/scripts/eslint/tests/js-extensions.cjs
new file mode 100644
index 0000000000000..177070ab5f520
--- /dev/null
+++ b/scripts/eslint/tests/js-extensions.cjs
@@ -0,0 +1,149 @@
+const { RuleTester } = require("./support/RuleTester.cjs");
+const rule = require("../rules/js-extensions.cjs");
+
+const ruleTester = new RuleTester({
+ parserOptions: {
+ warnOnUnsupportedTypeScriptVersion: false,
+ },
+ parser: require.resolve("@typescript-eslint/parser"),
+});
+
+ruleTester.run("js-extensions", rule, {
+ valid: [
+ {
+ code: `
+import "some-library";
+import "./a.js";
+import "./a.mjs";
+import "./a.cjs";
+import "../foo/a.js";
+import "../foo/a.mjs";
+import "../foo/a.cjs";
+ `,
+ },
+ {
+ code: `
+import * as blah from "some-library";
+import * as blah from "./a.js";
+import * as blah from "./a.mjs";
+import * as blah from "./a.cjs";
+import * as blah from "../foo/a.js";
+import * as blah from "../foo/a.mjs";
+import * as blah from "../foo/a.cjs";
+ `,
+ },
+ {
+ code: `
+export * from "some-library";
+export * from "./a.js";
+export * from "./a.mjs";
+export * from "./a.cjs";
+export * from "../foo/a.js";
+export * from "../foo/a.mjs";
+export * from "../foo/a.cjs";
+ `,
+ },
+ {
+ code: `
+import blah = require("some-library");
+import blah = require("./a.js");
+import blah = require("./a.mjs");
+import blah = require("./a.cjs");
+import blah = require("../foo/a.js");
+import blah = require("../foo/a.mjs");
+import blah = require("../foo/a.cjs");
+ `,
+ },
+ ],
+
+ invalid: [
+ {
+ code: `
+import "./a";
+import "../foo/a";
+ `,
+ errors: [
+ {
+ messageId: "missingJsExtension",
+ line: 2,
+ column: 8,
+ },
+ {
+ messageId: "missingJsExtension",
+ line: 3,
+ column: 8,
+ },
+ ],
+ output: `
+import "./a.js";
+import "../foo/a.js";
+ `,
+ },
+ {
+ code: `
+import * as blah from "./a";
+import * as blah from "../foo/a";
+ `,
+ errors: [
+ {
+ messageId: "missingJsExtension",
+ line: 2,
+ column: 23,
+ },
+ {
+ messageId: "missingJsExtension",
+ line: 3,
+ column: 23,
+ },
+ ],
+ output: `
+import * as blah from "./a.js";
+import * as blah from "../foo/a.js";
+ `,
+ },
+ {
+ code: `
+export * from "./a";
+export * from "../foo/a";
+ `,
+ errors: [
+ {
+ messageId: "missingJsExtension",
+ line: 2,
+ column: 15,
+ },
+ {
+ messageId: "missingJsExtension",
+ line: 3,
+ column: 15,
+ },
+ ],
+ output: `
+export * from "./a.js";
+export * from "../foo/a.js";
+ `,
+ },
+ {
+ code: `
+import blah = require("./a");
+import blah = require("../foo/a");
+ `,
+ errors: [
+ {
+ messageId: "missingJsExtension",
+ line: 2,
+ column: 23,
+ },
+ {
+ messageId: "missingJsExtension",
+ line: 3,
+ column: 23,
+ },
+ ],
+ output: `
+import blah = require("./a.js");
+import blah = require("../foo/a.js");
+ `,
+ },
+ ],
+});
diff --git a/scripts/processDiagnosticMessages.mjs b/scripts/processDiagnosticMessages.mjs
index 069bd95aa4308..b3f398b802c18 100644
--- a/scripts/processDiagnosticMessages.mjs
+++ b/scripts/processDiagnosticMessages.mjs
@@ -86,7 +86,7 @@ function buildInfoFileOutput(messageTable, inputFilePathRel) {
"// ",
`// generated from '${inputFilePathRel}'`,
"",
- 'import { DiagnosticCategory, DiagnosticMessage } from "./types";',
+ 'import { DiagnosticCategory, DiagnosticMessage } from "./types.js";',
"",
"function diag(code: number, category: DiagnosticCategory, key: string, message: string, reportsUnnecessary?: {}, elidedInCompatabilityPyramid?: boolean, reportsDeprecated?: {}): DiagnosticMessage {",
" return { code, category, key, message, reportsUnnecessary, elidedInCompatabilityPyramid, reportsDeprecated };",
diff --git a/src/compiler/_namespaces/ts.moduleSpecifiers.ts b/src/compiler/_namespaces/ts.moduleSpecifiers.ts
index 47a204d4a72b9..445d749e07810 100644
--- a/src/compiler/_namespaces/ts.moduleSpecifiers.ts
+++ b/src/compiler/_namespaces/ts.moduleSpecifiers.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.moduleSpecifiers namespace. */
-export * from "../moduleSpecifiers";
+export * from "../moduleSpecifiers.js";
diff --git a/src/compiler/_namespaces/ts.performance.ts b/src/compiler/_namespaces/ts.performance.ts
index 707f8f85ef697..58639cdda87ad 100644
--- a/src/compiler/_namespaces/ts.performance.ts
+++ b/src/compiler/_namespaces/ts.performance.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.performance namespace. */
-export * from "../performance";
+export * from "../performance.js";
diff --git a/src/compiler/_namespaces/ts.ts b/src/compiler/_namespaces/ts.ts
index 61f836b427b37..17b7bd7841238 100644
--- a/src/compiler/_namespaces/ts.ts
+++ b/src/compiler/_namespaces/ts.ts
@@ -1,79 +1,79 @@
/* Generated file to emulate the ts namespace. */
-export * from "../corePublic";
-export * from "../core";
-export * from "../debug";
-export * from "../semver";
-export * from "../performanceCore";
-export * from "../perfLogger";
-export * from "../tracing";
-export * from "../types";
-export * from "../sys";
-export * from "../path";
-export * from "../diagnosticInformationMap.generated";
-export * from "../scanner";
-export * from "../utilitiesPublic";
-export * from "../utilities";
-export * from "../factory/baseNodeFactory";
-export * from "../factory/parenthesizerRules";
-export * from "../factory/nodeConverters";
-export * from "../factory/nodeFactory";
-export * from "../factory/emitNode";
-export * from "../factory/emitHelpers";
-export * from "../factory/nodeTests";
-export * from "../factory/nodeChildren";
-export * from "../factory/utilities";
-export * from "../factory/utilitiesPublic";
-export * from "../parser";
-export * from "../commandLineParser";
-export * from "../moduleNameResolver";
-export * from "../binder";
-export * from "../symbolWalker";
-export * from "../checker";
-export * from "../visitorPublic";
-export * from "../sourcemap";
-export * from "../transformers/utilities";
-export * from "../transformers/destructuring";
-export * from "../transformers/classThis";
-export * from "../transformers/namedEvaluation";
-export * from "../transformers/taggedTemplate";
-export * from "../transformers/ts";
-export * from "../transformers/classFields";
-export * from "../transformers/typeSerializer";
-export * from "../transformers/legacyDecorators";
-export * from "../transformers/esDecorators";
-export * from "../transformers/es2017";
-export * from "../transformers/es2018";
-export * from "../transformers/es2019";
-export * from "../transformers/es2020";
-export * from "../transformers/es2021";
-export * from "../transformers/esnext";
-export * from "../transformers/jsx";
-export * from "../transformers/es2016";
-export * from "../transformers/es2015";
-export * from "../transformers/generators";
-export * from "../transformers/module/module";
-export * from "../transformers/module/system";
-export * from "../transformers/module/esnextAnd2015";
-export * from "../transformers/module/impliedNodeFormatDependent";
-export * from "../transformers/declarations/diagnostics";
-export * from "../transformers/declarations";
-export * from "../transformer";
-export * from "../emitter";
-export * from "../watchUtilities";
-export * from "../program";
-export * from "../builderStatePublic";
-export * from "../builderState";
-export * from "../builder";
-export * from "../builderPublic";
-export * from "../resolutionCache";
-export * from "../watch";
-export * from "../watchPublic";
-export * from "../tsbuild";
-export * from "../tsbuildPublic";
-export * from "../executeCommandLine";
-export * from "../expressionToTypeNode";
-import * as moduleSpecifiers from "./ts.moduleSpecifiers";
+export * from "../corePublic.js";
+export * from "../core.js";
+export * from "../debug.js";
+export * from "../semver.js";
+export * from "../performanceCore.js";
+export * from "../perfLogger.js";
+export * from "../tracing.js";
+export * from "../types.js";
+export * from "../sys.js";
+export * from "../path.js";
+export * from "../diagnosticInformationMap.generated.js";
+export * from "../scanner.js";
+export * from "../utilitiesPublic.js";
+export * from "../utilities.js";
+export * from "../factory/baseNodeFactory.js";
+export * from "../factory/parenthesizerRules.js";
+export * from "../factory/nodeConverters.js";
+export * from "../factory/nodeFactory.js";
+export * from "../factory/emitNode.js";
+export * from "../factory/emitHelpers.js";
+export * from "../factory/nodeTests.js";
+export * from "../factory/nodeChildren.js";
+export * from "../factory/utilities.js";
+export * from "../factory/utilitiesPublic.js";
+export * from "../parser.js";
+export * from "../commandLineParser.js";
+export * from "../moduleNameResolver.js";
+export * from "../binder.js";
+export * from "../symbolWalker.js";
+export * from "../checker.js";
+export * from "../visitorPublic.js";
+export * from "../sourcemap.js";
+export * from "../transformers/utilities.js";
+export * from "../transformers/destructuring.js";
+export * from "../transformers/classThis.js";
+export * from "../transformers/namedEvaluation.js";
+export * from "../transformers/taggedTemplate.js";
+export * from "../transformers/ts.js";
+export * from "../transformers/classFields.js";
+export * from "../transformers/typeSerializer.js";
+export * from "../transformers/legacyDecorators.js";
+export * from "../transformers/esDecorators.js";
+export * from "../transformers/es2017.js";
+export * from "../transformers/es2018.js";
+export * from "../transformers/es2019.js";
+export * from "../transformers/es2020.js";
+export * from "../transformers/es2021.js";
+export * from "../transformers/esnext.js";
+export * from "../transformers/jsx.js";
+export * from "../transformers/es2016.js";
+export * from "../transformers/es2015.js";
+export * from "../transformers/generators.js";
+export * from "../transformers/module/module.js";
+export * from "../transformers/module/system.js";
+export * from "../transformers/module/esnextAnd2015.js";
+export * from "../transformers/module/impliedNodeFormatDependent.js";
+export * from "../transformers/declarations/diagnostics.js";
+export * from "../transformers/declarations.js";
+export * from "../transformer.js";
+export * from "../emitter.js";
+export * from "../watchUtilities.js";
+export * from "../program.js";
+export * from "../builderStatePublic.js";
+export * from "../builderState.js";
+export * from "../builder.js";
+export * from "../builderPublic.js";
+export * from "../resolutionCache.js";
+export * from "../watch.js";
+export * from "../watchPublic.js";
+export * from "../tsbuild.js";
+export * from "../tsbuildPublic.js";
+export * from "../executeCommandLine.js";
+export * from "../expressionToTypeNode.js";
+import * as moduleSpecifiers from "./ts.moduleSpecifiers.js";
export { moduleSpecifiers };
-import * as performance from "./ts.performance";
+import * as performance from "./ts.performance.js";
export { performance };
diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts
index 59b1eb19d7323..ea263f471cbdc 100644
--- a/src/compiler/binder.ts
+++ b/src/compiler/binder.ts
@@ -320,8 +320,8 @@ import {
VariableDeclaration,
WhileStatement,
WithStatement,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
/** @internal */
export const enum ModuleInstanceState {
diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts
index d2f7b376ddd5b..eb0a9339dc9f8 100644
--- a/src/compiler/builder.ts
+++ b/src/compiler/builder.ts
@@ -81,7 +81,7 @@ import {
tryAddToSet,
WriteFileCallback,
WriteFileCallbackData,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export interface ReusableDiagnostic extends ReusableDiagnosticRelatedInformation {
diff --git a/src/compiler/builderPublic.ts b/src/compiler/builderPublic.ts
index 57f2124c9997f..eb2b9b9f4f6dc 100644
--- a/src/compiler/builderPublic.ts
+++ b/src/compiler/builderPublic.ts
@@ -16,7 +16,7 @@ import {
SavedBuildProgramEmitState,
SourceFile,
WriteFileCallback,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export type AffectedFileResult = { result: T; affected: SourceFile | Program; } | undefined;
diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts
index ded9436a279bd..0765f33549ab1 100644
--- a/src/compiler/builderState.ts
+++ b/src/compiler/builderState.ts
@@ -31,7 +31,7 @@ import {
Symbol,
toPath,
TypeChecker,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function getFileEmitOutput(
diff --git a/src/compiler/builderStatePublic.ts b/src/compiler/builderStatePublic.ts
index 9b3a302d2e547..50d08838d0f38 100644
--- a/src/compiler/builderStatePublic.ts
+++ b/src/compiler/builderStatePublic.ts
@@ -1,7 +1,7 @@
import {
Diagnostic,
WriteFileCallbackData,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface EmitOutput {
outputFiles: OutputFile[];
diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts
index 33e86be3a9ba9..ba5d3c903dcec 100644
--- a/src/compiler/checker.ts
+++ b/src/compiler/checker.ts
@@ -1105,9 +1105,9 @@ import {
WideningContext,
WithStatement,
YieldExpression,
-} from "./_namespaces/ts";
-import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as moduleSpecifiers from "./_namespaces/ts.moduleSpecifiers.js";
+import * as performance from "./_namespaces/ts.performance.js";
const ambientModuleSymbolRegex = /^".+"$/;
const anon = "(anonymous)" as __String & string;
diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts
index 757c0f7b041df..52db793b070a8 100644
--- a/src/compiler/commandLineParser.ts
+++ b/src/compiler/commandLineParser.ts
@@ -121,7 +121,7 @@ import {
WatchDirectoryKind,
WatchFileKind,
WatchOptions,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export const compileOnSaveCommandLineOption: CommandLineOption = {
diff --git a/src/compiler/core.ts b/src/compiler/core.ts
index 93772d05b2721..d7f6fe0580d5f 100644
--- a/src/compiler/core.ts
+++ b/src/compiler/core.ts
@@ -9,7 +9,7 @@ import {
SortedArray,
SortedReadonlyArray,
TextSpan,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export const emptyArray: never[] = [] as never[];
diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts
index 98fcde9847420..13f199b927174 100644
--- a/src/compiler/debug.ts
+++ b/src/compiler/debug.ts
@@ -1,4 +1,4 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
import {
AnyFunction,
AssertionLevel,
@@ -91,7 +91,7 @@ import {
unescapeLeadingUnderscores,
VarianceFlags,
zipWith,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export enum LogLevel {
diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts
index 5cec2d2f31411..03fe0e5e3859e 100644
--- a/src/compiler/emitter.ts
+++ b/src/compiler/emitter.ts
@@ -1,4 +1,4 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
import {
AccessorDeclaration,
ArrayBindingPattern,
@@ -420,8 +420,8 @@ import {
writeCommentRange,
writeFile,
YieldExpression,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
const brackets = createBracketsMap();
diff --git a/src/compiler/executeCommandLine.ts b/src/compiler/executeCommandLine.ts
index 4053523f3565b..f9b1400b4daad 100644
--- a/src/compiler/executeCommandLine.ts
+++ b/src/compiler/executeCommandLine.ts
@@ -86,8 +86,8 @@ import {
WatchCompilerHost,
WatchOfConfigFile,
WatchOptions,
-} from "./_namespaces/ts";
-import * as performance from "./performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./performance.js";
interface Statistic {
name: string;
diff --git a/src/compiler/expressionToTypeNode.ts b/src/compiler/expressionToTypeNode.ts
index a9f64a4919bc8..ddb3c4f6fbd37 100644
--- a/src/compiler/expressionToTypeNode.ts
+++ b/src/compiler/expressionToTypeNode.ts
@@ -64,7 +64,7 @@ import {
TypeParameterDeclaration,
UnionTypeNode,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function createSyntacticTypeNodeBuilder(options: CompilerOptions, resolver: SyntacticTypeNodeBuilderResolver) {
diff --git a/src/compiler/factory/baseNodeFactory.ts b/src/compiler/factory/baseNodeFactory.ts
index 9ea81cdf5632b..4043f1a8931a1 100644
--- a/src/compiler/factory/baseNodeFactory.ts
+++ b/src/compiler/factory/baseNodeFactory.ts
@@ -2,7 +2,7 @@ import {
Node,
objectAllocator,
SyntaxKind,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/**
* A `BaseNodeFactory` is an abstraction over an `ObjectAllocator` that handles caching `Node` constructors
diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts
index 0937915e75b16..530521f1ca763 100644
--- a/src/compiler/factory/emitHelpers.ts
+++ b/src/compiler/factory/emitHelpers.ts
@@ -35,7 +35,7 @@ import {
TextRange,
TransformationContext,
UnscopedEmitHelper,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export const enum PrivateIdentifierKind {
diff --git a/src/compiler/factory/emitNode.ts b/src/compiler/factory/emitNode.ts
index fba507d899ea7..9d649979b8f24 100644
--- a/src/compiler/factory/emitNode.ts
+++ b/src/compiler/factory/emitNode.ts
@@ -26,7 +26,7 @@ import {
TextRange,
TypeNode,
TypeParameterDeclaration,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/**
* Associates a node with the current transformation, initializing
diff --git a/src/compiler/factory/nodeChildren.ts b/src/compiler/factory/nodeChildren.ts
index aa41f5955fb69..79e8563f6f593 100644
--- a/src/compiler/factory/nodeChildren.ts
+++ b/src/compiler/factory/nodeChildren.ts
@@ -2,7 +2,7 @@ import {
emptyArray,
isNodeKind,
Node,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
const nodeChildren = new WeakMap();
diff --git a/src/compiler/factory/nodeConverters.ts b/src/compiler/factory/nodeConverters.ts
index 33ab7b4b598ad..14ef80f2ae379 100644
--- a/src/compiler/factory/nodeConverters.ts
+++ b/src/compiler/factory/nodeConverters.ts
@@ -35,7 +35,7 @@ import {
setStartsOnNewLine,
setTextRange,
SyntaxKind,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function createNodeConverters(factory: NodeFactory): NodeConverters {
diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts
index 78e3e3e5fd5ef..9fcd2a4acf7c1 100644
--- a/src/compiler/factory/nodeFactory.ts
+++ b/src/compiler/factory/nodeFactory.ts
@@ -456,7 +456,7 @@ import {
WhileStatement,
WithStatement,
YieldExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
let nextAutoGenerateId = 0;
diff --git a/src/compiler/factory/nodeTests.ts b/src/compiler/factory/nodeTests.ts
index 012616ac5dc70..cd31b63f81843 100644
--- a/src/compiler/factory/nodeTests.ts
+++ b/src/compiler/factory/nodeTests.ts
@@ -227,7 +227,7 @@ import {
WhileStatement,
WithStatement,
YieldExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
// Literals
diff --git a/src/compiler/factory/parenthesizerRules.ts b/src/compiler/factory/parenthesizerRules.ts
index b90cc220fb616..3a67604847438 100644
--- a/src/compiler/factory/parenthesizerRules.ts
+++ b/src/compiler/factory/parenthesizerRules.ts
@@ -48,7 +48,7 @@ import {
SyntaxKind,
TypeNode,
UnaryExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function createParenthesizerRules(factory: NodeFactory): ParenthesizerRules {
diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts
index 731c13d78ec60..502ffd17db5e0 100644
--- a/src/compiler/factory/utilities.ts
+++ b/src/compiler/factory/utilities.ts
@@ -180,7 +180,7 @@ import {
TransformFlags,
TypeNode,
WrappedExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
// Compound nodes
diff --git a/src/compiler/factory/utilitiesPublic.ts b/src/compiler/factory/utilitiesPublic.ts
index 5380a4a1604e0..be395a64523a4 100644
--- a/src/compiler/factory/utilitiesPublic.ts
+++ b/src/compiler/factory/utilitiesPublic.ts
@@ -5,7 +5,7 @@ import {
setTextRangePosEnd,
SyntaxKind,
TextRange,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
export function setTextRange(range: T, location: TextRange | undefined): T {
return location ? setTextRangePosEnd(range, location.pos, location.end) : range;
diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts
index 699e902dab5a6..9ede133aae270 100644
--- a/src/compiler/moduleNameResolver.ts
+++ b/src/compiler/moduleNameResolver.ts
@@ -108,7 +108,7 @@ import {
version,
versionMajorMinor,
VersionRange,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function trace(host: ModuleResolutionHost, message: DiagnosticMessage, ...args: any[]): void {
diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts
index cf3eeca0488f8..a36c21a414018 100644
--- a/src/compiler/moduleSpecifiers.ts
+++ b/src/compiler/moduleSpecifiers.ts
@@ -124,7 +124,7 @@ import {
tryParsePatterns,
TypeChecker,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
// Used by importFixes, getEditsForFileRename, and declaration emit to synthesize import module specifiers.
diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts
index 80c63bbe58964..a63735ad6bfa2 100644
--- a/src/compiler/parser.ts
+++ b/src/compiler/parser.ts
@@ -397,8 +397,8 @@ import {
WhileStatement,
WithStatement,
YieldExpression,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
const enum SignatureFlags {
None = 0,
diff --git a/src/compiler/path.ts b/src/compiler/path.ts
index 8c7f75f816a8b..cbafbb785147f 100644
--- a/src/compiler/path.ts
+++ b/src/compiler/path.ts
@@ -16,7 +16,7 @@ import {
Path,
some,
startsWith,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Internally, we represent paths as strings with '/' as the directory separator.
diff --git a/src/compiler/performance.ts b/src/compiler/performance.ts
index 40b333041e636..6784d1d0f7dce 100644
--- a/src/compiler/performance.ts
+++ b/src/compiler/performance.ts
@@ -7,7 +7,7 @@ import {
System,
timestamp,
tryGetNativePerformanceHooks,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** Performance measurements for the compiler. */
diff --git a/src/compiler/performanceCore.ts b/src/compiler/performanceCore.ts
index 9493115ea1ed3..abff50eb8aae6 100644
--- a/src/compiler/performanceCore.ts
+++ b/src/compiler/performanceCore.ts
@@ -1,4 +1,4 @@
-import { isNodeLikeSystem } from "./_namespaces/ts";
+import { isNodeLikeSystem } from "./_namespaces/ts.js";
// The following definitions provide the minimum compatible support for the Web Performance User Timings API
// between browsers and NodeJS:
diff --git a/src/compiler/program.ts b/src/compiler/program.ts
index 75f9a6b730798..2507802783f57 100644
--- a/src/compiler/program.ts
+++ b/src/compiler/program.ts
@@ -328,8 +328,8 @@ import {
WriteFileCallback,
WriteFileCallbackData,
writeFileEnsuringDirectories,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
export function findConfigFile(searchPath: string, fileExists: (fileName: string) => boolean, configName = "tsconfig.json"): string | undefined {
return forEachAncestorDirectory(searchPath, ancestor => {
diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts
index 5fd381cf84c39..cbfa95b27d537 100644
--- a/src/compiler/resolutionCache.ts
+++ b/src/compiler/resolutionCache.ts
@@ -76,7 +76,7 @@ import {
trace,
updateResolutionField,
WatchDirectoryFlags,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export interface HasInvalidatedFromResolutionCache {
diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts
index 7b7e8875c6711..463190d2f82d0 100644
--- a/src/compiler/scanner.ts
+++ b/src/compiler/scanner.ts
@@ -33,7 +33,7 @@ import {
SyntaxKind,
TextRange,
TokenFlags,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export type ErrorCallback = (message: DiagnosticMessage, length: number, arg0?: any) => void;
diff --git a/src/compiler/semver.ts b/src/compiler/semver.ts
index 23573253459d5..2e472e3af5af1 100644
--- a/src/compiler/semver.ts
+++ b/src/compiler/semver.ts
@@ -8,7 +8,7 @@ import {
isArray,
map,
some,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
// https://semver.org/#spec-item-2
// > A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative
diff --git a/src/compiler/sourcemap.ts b/src/compiler/sourcemap.ts
index d6240cf0aa2bf..fbc30ba0c6ddd 100644
--- a/src/compiler/sourcemap.ts
+++ b/src/compiler/sourcemap.ts
@@ -24,8 +24,8 @@ import {
sortAndDeduplicate,
SortedReadonlyArray,
SourceMapGenerator,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
/** @internal */
export interface SourceMapGeneratorOptions {
diff --git a/src/compiler/symbolWalker.ts b/src/compiler/symbolWalker.ts
index 3adeee07406e4..6942028d9af79 100644
--- a/src/compiler/symbolWalker.ts
+++ b/src/compiler/symbolWalker.ts
@@ -24,7 +24,7 @@ import {
TypeQueryNode,
TypeReference,
UnionOrIntersectionType,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function createGetSymbolWalker(
diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts
index 86e029c799494..a8fdd4d156822 100644
--- a/src/compiler/sys.ts
+++ b/src/compiler/sys.ts
@@ -46,7 +46,7 @@ import {
WatchFileKind,
WatchOptions,
writeFileEnsuringDirectories,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
declare function setTimeout(handler: (...args: any[]) => void, timeout: number): any;
declare function clearTimeout(handle: any): void;
diff --git a/src/compiler/tracing.ts b/src/compiler/tracing.ts
index a1431b5749ee2..94e9bd57c83b6 100644
--- a/src/compiler/tracing.ts
+++ b/src/compiler/tracing.ts
@@ -20,8 +20,8 @@ import {
TypeReference,
unescapeLeadingUnderscores,
UnionType,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
/* Tracing events for the compiler. */
diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts
index 607cf01e63deb..bd181e5f3c028 100644
--- a/src/compiler/transformer.ts
+++ b/src/compiler/transformer.ts
@@ -72,8 +72,8 @@ import {
transformSystemModule,
transformTypeScript,
VariableDeclaration,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
function getModuleTransformer(moduleKind: ModuleKind): TransformerFactory {
switch (moduleKind) {
diff --git a/src/compiler/transformers/classFields.ts b/src/compiler/transformers/classFields.ts
index ede44357f242d..2f32839d1bb86 100644
--- a/src/compiler/transformers/classFields.ts
+++ b/src/compiler/transformers/classFields.ts
@@ -225,7 +225,7 @@ import {
Visitor,
visitParameterList,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
const enum ClassPropertySubstitutionFlags {
/**
diff --git a/src/compiler/transformers/classThis.ts b/src/compiler/transformers/classThis.ts
index 48f51ea8477c4..d6678e6c082a2 100644
--- a/src/compiler/transformers/classThis.ts
+++ b/src/compiler/transformers/classThis.ts
@@ -21,7 +21,7 @@ import {
Statement,
SyntaxKind,
ThisExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/**
* Creates a class `static {}` block used to assign the static `this` to a `_classThis` (or similar) variable.
diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts
index c14408ad5ef7d..6bed55f943166 100644
--- a/src/compiler/transformers/declarations.ts
+++ b/src/compiler/transformers/declarations.ts
@@ -210,7 +210,7 @@ import {
visitNode,
visitNodes,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function getDeclarationDiagnostics(host: EmitHost, resolver: EmitResolver, file: SourceFile | undefined): DiagnosticWithLocation[] | undefined {
diff --git a/src/compiler/transformers/declarations/diagnostics.ts b/src/compiler/transformers/declarations/diagnostics.ts
index 7d0c9551e61bb..478eeb3aa26a7 100644
--- a/src/compiler/transformers/declarations/diagnostics.ts
+++ b/src/compiler/transformers/declarations/diagnostics.ts
@@ -87,7 +87,7 @@ import {
TypeAliasDeclaration,
TypeParameterDeclaration,
VariableDeclaration,
-} from "../../_namespaces/ts";
+} from "../../_namespaces/ts.js";
/** @internal */
export type GetSymbolAccessibilityDiagnostic = (symbolAccessibilityResult: SymbolAccessibilityResult) => SymbolAccessibilityDiagnostic | undefined;
diff --git a/src/compiler/transformers/destructuring.ts b/src/compiler/transformers/destructuring.ts
index 1a3b93e8b77fa..aa61d9f64787b 100644
--- a/src/compiler/transformers/destructuring.ts
+++ b/src/compiler/transformers/destructuring.ts
@@ -60,7 +60,7 @@ import {
VariableDeclaration,
visitNode,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
interface FlattenContext {
context: TransformationContext;
diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts
index f8849b8cb23f7..3b21f019f49e6 100644
--- a/src/compiler/transformers/es2015.ts
+++ b/src/compiler/transformers/es2015.ts
@@ -215,7 +215,7 @@ import {
VoidExpression,
WhileStatement,
YieldExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
const enum ES2015SubstitutionFlags {
/** Enables substitutions for captured `this` */
diff --git a/src/compiler/transformers/es2016.ts b/src/compiler/transformers/es2016.ts
index 39d3e05a27d65..27118ae2f1d9c 100644
--- a/src/compiler/transformers/es2016.ts
+++ b/src/compiler/transformers/es2016.ts
@@ -15,7 +15,7 @@ import {
visitEachChild,
visitNode,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function transformES2016(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/es2017.ts b/src/compiler/transformers/es2017.ts
index 7aeb18db18b54..df0a34c29209b 100644
--- a/src/compiler/transformers/es2017.ts
+++ b/src/compiler/transformers/es2017.ts
@@ -99,7 +99,7 @@ import {
visitNodes,
visitParameterList,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
type SuperContainer = ClassDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration;
diff --git a/src/compiler/transformers/es2018.ts b/src/compiler/transformers/es2018.ts
index 421bb548bf26f..9328d83b1a39b 100644
--- a/src/compiler/transformers/es2018.ts
+++ b/src/compiler/transformers/es2018.ts
@@ -110,7 +110,7 @@ import {
VisitResult,
VoidExpression,
YieldExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
const enum ESNextSubstitutionFlags {
/** Enables substitutions for async methods with `super` calls. */
diff --git a/src/compiler/transformers/es2019.ts b/src/compiler/transformers/es2019.ts
index 0435e4c352707..15c139078efe4 100644
--- a/src/compiler/transformers/es2019.ts
+++ b/src/compiler/transformers/es2019.ts
@@ -11,7 +11,7 @@ import {
visitEachChild,
visitNode,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function transformES2019(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/es2020.ts b/src/compiler/transformers/es2020.ts
index c3eb99351fde9..8d25281d799b7 100644
--- a/src/compiler/transformers/es2020.ts
+++ b/src/compiler/transformers/es2020.ts
@@ -36,7 +36,7 @@ import {
visitNode,
visitNodes,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function transformES2020(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/es2021.ts b/src/compiler/transformers/es2021.ts
index 08ab7af2a239b..026083fd5f5be 100644
--- a/src/compiler/transformers/es2021.ts
+++ b/src/compiler/transformers/es2021.ts
@@ -19,7 +19,7 @@ import {
visitEachChild,
visitNode,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function transformES2021(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/esDecorators.ts b/src/compiler/transformers/esDecorators.ts
index e164665379205..7609ab957a0c5 100644
--- a/src/compiler/transformers/esDecorators.ts
+++ b/src/compiler/transformers/esDecorators.ts
@@ -188,7 +188,7 @@ import {
Visitor,
VisitResult,
WrappedExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
// Class/Decorator evaluation order, as it pertains to this transformer:
//
diff --git a/src/compiler/transformers/esnext.ts b/src/compiler/transformers/esnext.ts
index 62d40e7831270..ecb75018d9be4 100644
--- a/src/compiler/transformers/esnext.ts
+++ b/src/compiler/transformers/esnext.ts
@@ -61,7 +61,7 @@ import {
visitNode,
visitNodes,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
const enum UsingKind {
None,
diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts
index 775075a6e8f6f..4031cb704665a 100644
--- a/src/compiler/transformers/generators.ts
+++ b/src/compiler/transformers/generators.ts
@@ -95,7 +95,7 @@ import {
WhileStatement,
WithStatement,
YieldExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
// Transforms generator functions into a compatible ES5 representation with similar runtime
// semantics. This is accomplished by first transforming the body of each generator
diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts
index 1044618351aef..49d04a2fd8280 100644
--- a/src/compiler/transformers/jsx.ts
+++ b/src/compiler/transformers/jsx.ts
@@ -84,7 +84,7 @@ import {
visitEachChild,
visitNode,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function transformJsx(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/legacyDecorators.ts b/src/compiler/transformers/legacyDecorators.ts
index 69f955e39b9cd..e3112ed53a241 100644
--- a/src/compiler/transformers/legacyDecorators.ts
+++ b/src/compiler/transformers/legacyDecorators.ts
@@ -82,7 +82,7 @@ import {
visitNode,
visitNodes,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function transformLegacyDecorators(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/module/esnextAnd2015.ts b/src/compiler/transformers/module/esnextAnd2015.ts
index 12c8fd87136ed..0c3bbc8129a2a 100644
--- a/src/compiler/transformers/module/esnextAnd2015.ts
+++ b/src/compiler/transformers/module/esnextAnd2015.ts
@@ -49,7 +49,7 @@ import {
visitEachChild,
visitNodes,
VisitResult,
-} from "../../_namespaces/ts";
+} from "../../_namespaces/ts.js";
/** @internal */
export function transformECMAScriptModule(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/module/impliedNodeFormatDependent.ts b/src/compiler/transformers/module/impliedNodeFormatDependent.ts
index c96ead5ebf753..7a5bf9e210fcd 100644
--- a/src/compiler/transformers/module/impliedNodeFormatDependent.ts
+++ b/src/compiler/transformers/module/impliedNodeFormatDependent.ts
@@ -11,7 +11,7 @@ import {
TransformationContext,
transformECMAScriptModule,
transformModule,
-} from "../../_namespaces/ts";
+} from "../../_namespaces/ts.js";
/** @internal */
export function transformImpliedNodeFormatDependentModule(context: TransformationContext) {
diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts
index 959c59f3e2952..9336c54a40fb6 100644
--- a/src/compiler/transformers/module/module.ts
+++ b/src/compiler/transformers/module/module.ts
@@ -161,7 +161,7 @@ import {
VisitResult,
WhileStatement,
WithStatement,
-} from "../../_namespaces/ts";
+} from "../../_namespaces/ts.js";
/** @internal */
export function transformModule(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/module/system.ts b/src/compiler/transformers/module/system.ts
index 10d6b7047ed74..5f79baf03fe54 100644
--- a/src/compiler/transformers/module/system.ts
+++ b/src/compiler/transformers/module/system.ts
@@ -128,7 +128,7 @@ import {
VisitResult,
WhileStatement,
WithStatement,
-} from "../../_namespaces/ts";
+} from "../../_namespaces/ts.js";
/** @internal */
export function transformSystemModule(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
diff --git a/src/compiler/transformers/namedEvaluation.ts b/src/compiler/transformers/namedEvaluation.ts
index 34123cf560080..785ed280c4158 100644
--- a/src/compiler/transformers/namedEvaluation.ts
+++ b/src/compiler/transformers/namedEvaluation.ts
@@ -48,7 +48,7 @@ import {
TransformationContext,
VariableDeclaration,
WrappedExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/**
* Gets a string literal to use as the assigned name of an anonymous class or function declaration.
diff --git a/src/compiler/transformers/taggedTemplate.ts b/src/compiler/transformers/taggedTemplate.ts
index a905dcb26ecb8..94f01dec4ba5e 100644
--- a/src/compiler/transformers/taggedTemplate.ts
+++ b/src/compiler/transformers/taggedTemplate.ts
@@ -23,7 +23,7 @@ import {
visitEachChild,
visitNode,
Visitor,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export enum ProcessLevel {
diff --git a/src/compiler/transformers/ts.ts b/src/compiler/transformers/ts.ts
index b4c7172cf05d2..668da90d8e696 100644
--- a/src/compiler/transformers/ts.ts
+++ b/src/compiler/transformers/ts.ts
@@ -201,7 +201,7 @@ import {
visitNodes,
visitParameterList,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/**
* Indicates whether to emit type metadata in the new format.
diff --git a/src/compiler/transformers/typeSerializer.ts b/src/compiler/transformers/typeSerializer.ts
index 2fcd9264e0b06..4c9d397b74385 100644
--- a/src/compiler/transformers/typeSerializer.ts
+++ b/src/compiler/transformers/typeSerializer.ts
@@ -67,7 +67,7 @@ import {
TypeReferenceSerializationKind,
UnionOrIntersectionTypeNode,
VoidExpression,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export type SerializedEntityName =
diff --git a/src/compiler/transformers/utilities.ts b/src/compiler/transformers/utilities.ts
index ad86ded1cb6f2..893460cf7a42f 100644
--- a/src/compiler/transformers/utilities.ts
+++ b/src/compiler/transformers/utilities.ts
@@ -90,7 +90,7 @@ import {
unorderedRemoveItem,
VariableDeclaration,
VariableStatement,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export function getOriginalNodeId(node: Node) {
diff --git a/src/compiler/tsbuild.ts b/src/compiler/tsbuild.ts
index cf902ea11c2f8..39a448fea9a15 100644
--- a/src/compiler/tsbuild.ts
+++ b/src/compiler/tsbuild.ts
@@ -4,7 +4,7 @@ import {
fileExtensionIs,
Path,
ResolvedConfigFileName,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export enum UpToDateStatusType {
diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts
index a44e6a6bc428d..2d7b210cced85 100644
--- a/src/compiler/tsbuildPublic.ts
+++ b/src/compiler/tsbuildPublic.ts
@@ -126,8 +126,8 @@ import {
WildcardDirectoryWatcher,
writeFile,
WriteFileCallback,
-} from "./_namespaces/ts";
-import * as performance from "./_namespaces/ts.performance";
+} from "./_namespaces/ts.js";
+import * as performance from "./_namespaces/ts.performance.js";
const minimumDate = new Date(-8640000000000000);
const maximumDate = new Date(8640000000000000);
diff --git a/src/compiler/types.ts b/src/compiler/types.ts
index 66ca87277cb68..8595bce0270eb 100644
--- a/src/compiler/types.ts
+++ b/src/compiler/types.ts
@@ -16,7 +16,7 @@ import {
ProgramBuildInfo,
SymlinkCache,
ThisContainer,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
// branded string type used to store absolute, normalized and canonicalized paths
// arbitrary file name can be converted to Path via toPath function
diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts
index 1fffa5af2bf7a..655c35eacf576 100644
--- a/src/compiler/utilities.ts
+++ b/src/compiler/utilities.ts
@@ -585,7 +585,7 @@ import {
WriteFileCallback,
WriteFileCallbackData,
YieldExpression,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export const resolvingEmptyArray: never[] = [];
diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts
index 35cabc9011aae..6e4db2fa3e24f 100644
--- a/src/compiler/utilitiesPublic.ts
+++ b/src/compiler/utilitiesPublic.ts
@@ -295,7 +295,7 @@ import {
TypeReferenceType,
UnaryExpression,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export function isExternalModuleNameRelative(moduleName: string): boolean {
// TypeScript 1.0 spec (April 2014): 11.2.1
diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts
index 0a4c746c2e7c6..21e477329270e 100644
--- a/src/compiler/visitorPublic.ts
+++ b/src/compiler/visitorPublic.ts
@@ -102,7 +102,7 @@ import {
SyntaxKind,
TransformationContext,
Visitor,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts
index 431156743f538..4b28e288a3442 100644
--- a/src/compiler/watch.ts
+++ b/src/compiler/watch.ts
@@ -106,7 +106,7 @@ import {
WatchStatusReporter,
whitespaceOrMapCommentRegExp,
WriteFileCallback,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const sysFormatDiagnosticsHost: FormatDiagnosticsHost | undefined = sys ? {
getCurrentDirectory: () => sys.getCurrentDirectory(),
diff --git a/src/compiler/watchPublic.ts b/src/compiler/watchPublic.ts
index 0abb5b0185f60..7c29f9ec6a085 100644
--- a/src/compiler/watchPublic.ts
+++ b/src/compiler/watchPublic.ts
@@ -94,7 +94,7 @@ import {
WatchType,
WatchTypeRegistry,
WildcardDirectoryWatcher,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface ReadBuildProgramHost {
useCaseSensitiveFileNames(): boolean;
diff --git a/src/compiler/watchUtilities.ts b/src/compiler/watchUtilities.ts
index 34794533ace12..425fedfdd6f22 100644
--- a/src/compiler/watchUtilities.ts
+++ b/src/compiler/watchUtilities.ts
@@ -56,7 +56,7 @@ import {
WatchDirectoryFlags,
WatchFileKind,
WatchOptions,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Partial interface of the System thats needed to support the caching of directory structure
diff --git a/src/deprecatedCompat/_namespaces/ts.ts b/src/deprecatedCompat/_namespaces/ts.ts
index cbfc88edbb648..0d062e9bc024d 100644
--- a/src/deprecatedCompat/_namespaces/ts.ts
+++ b/src/deprecatedCompat/_namespaces/ts.ts
@@ -1,4 +1,4 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-export * from "../deprecations";
+export * from "../../compiler/_namespaces/ts.js";
+export * from "../deprecations.js";
diff --git a/src/deprecatedCompat/deprecate.ts b/src/deprecatedCompat/deprecate.ts
index 0bb11bfd228ab..595376a5222d1 100644
--- a/src/deprecatedCompat/deprecate.ts
+++ b/src/deprecatedCompat/deprecate.ts
@@ -5,7 +5,7 @@ import {
noop,
Version,
version,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export let enableDeprecationWarnings = true;
diff --git a/src/deprecatedCompat/deprecations.ts b/src/deprecatedCompat/deprecations.ts
index 23dd903c44428..4f4ec88e957fb 100644
--- a/src/deprecatedCompat/deprecations.ts
+++ b/src/deprecatedCompat/deprecations.ts
@@ -2,8 +2,8 @@ import {
hasProperty,
UnionToIntersection,
Version,
-} from "./_namespaces/ts";
-import { deprecate } from "./deprecate";
+} from "./_namespaces/ts.js";
+import { deprecate } from "./deprecate.js";
/** @internal */
export interface DeprecationOptions {
diff --git a/src/harness/_namespaces/FourSlash.ts b/src/harness/_namespaces/FourSlash.ts
index c069ebaf784de..ff7722f62895b 100644
--- a/src/harness/_namespaces/FourSlash.ts
+++ b/src/harness/_namespaces/FourSlash.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the FourSlash namespace. */
-export * from "../fourslashImpl";
+export * from "../fourslashImpl.js";
diff --git a/src/harness/_namespaces/FourSlashInterface.ts b/src/harness/_namespaces/FourSlashInterface.ts
index 270be7300135f..88127d65a0ea0 100644
--- a/src/harness/_namespaces/FourSlashInterface.ts
+++ b/src/harness/_namespaces/FourSlashInterface.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the FourSlashInterface namespace. */
-export * from "../fourslashInterfaceImpl";
+export * from "../fourslashInterfaceImpl.js";
diff --git a/src/harness/_namespaces/Harness.LanguageService.ts b/src/harness/_namespaces/Harness.LanguageService.ts
index 53544477e279c..d485be2af0b73 100644
--- a/src/harness/_namespaces/Harness.LanguageService.ts
+++ b/src/harness/_namespaces/Harness.LanguageService.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the Harness.LanguageService namespace. */
-export * from "../harnessLanguageService";
+export * from "../harnessLanguageService.js";
diff --git a/src/harness/_namespaces/Harness.SourceMapRecorder.ts b/src/harness/_namespaces/Harness.SourceMapRecorder.ts
index 909654b08d165..8ae47bc803a6d 100644
--- a/src/harness/_namespaces/Harness.SourceMapRecorder.ts
+++ b/src/harness/_namespaces/Harness.SourceMapRecorder.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the Harness.SourceMapRecorder namespace. */
-export * from "../sourceMapRecorder";
+export * from "../sourceMapRecorder.js";
diff --git a/src/harness/_namespaces/Harness.ts b/src/harness/_namespaces/Harness.ts
index 3ff4b006555c1..964d64de66cb1 100644
--- a/src/harness/_namespaces/Harness.ts
+++ b/src/harness/_namespaces/Harness.ts
@@ -1,9 +1,9 @@
/* Generated file to emulate the Harness namespace. */
-export * from "../runnerbase";
-export * from "../harnessIO";
-export * from "../typeWriter";
-import * as LanguageService from "./Harness.LanguageService";
+export * from "../runnerbase.js";
+export * from "../harnessIO.js";
+export * from "../typeWriter.js";
+import * as LanguageService from "./Harness.LanguageService.js";
export { LanguageService };
-import * as SourceMapRecorder from "./Harness.SourceMapRecorder";
+import * as SourceMapRecorder from "./Harness.SourceMapRecorder.js";
export { SourceMapRecorder };
diff --git a/src/harness/_namespaces/Utils.ts b/src/harness/_namespaces/Utils.ts
index 3b958cd166789..d15b5cc7e3b72 100644
--- a/src/harness/_namespaces/Utils.ts
+++ b/src/harness/_namespaces/Utils.ts
@@ -1,5 +1,5 @@
/* Generated file to emulate the Utils namespace. */
-export * from "../util";
-export * from "../findUpDir";
-export * from "../harnessUtils";
+export * from "../util.js";
+export * from "../findUpDir.js";
+export * from "../harnessUtils.js";
diff --git a/src/harness/_namespaces/collections.ts b/src/harness/_namespaces/collections.ts
index 870e956769ebb..3445e7971ffeb 100644
--- a/src/harness/_namespaces/collections.ts
+++ b/src/harness/_namespaces/collections.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the collections namespace. */
-export * from "../collectionsImpl";
+export * from "../collectionsImpl.js";
diff --git a/src/harness/_namespaces/compiler.ts b/src/harness/_namespaces/compiler.ts
index 3ff645eca59d2..3b53847394748 100644
--- a/src/harness/_namespaces/compiler.ts
+++ b/src/harness/_namespaces/compiler.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the compiler namespace. */
-export * from "../compilerImpl";
+export * from "../compilerImpl.js";
diff --git a/src/harness/_namespaces/documents.ts b/src/harness/_namespaces/documents.ts
index 67dbd0e6c1c20..c1bba77a940a4 100644
--- a/src/harness/_namespaces/documents.ts
+++ b/src/harness/_namespaces/documents.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the documents namespace. */
-export * from "../documentsUtil";
+export * from "../documentsUtil.js";
diff --git a/src/harness/_namespaces/evaluator.ts b/src/harness/_namespaces/evaluator.ts
index e47f3eb0aeee2..d052b6c8fe4d3 100644
--- a/src/harness/_namespaces/evaluator.ts
+++ b/src/harness/_namespaces/evaluator.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the evaluator namespace. */
-export * from "../evaluatorImpl";
+export * from "../evaluatorImpl.js";
diff --git a/src/harness/_namespaces/fakes.ts b/src/harness/_namespaces/fakes.ts
index d2a68860bbb15..f5d19a8eeec15 100644
--- a/src/harness/_namespaces/fakes.ts
+++ b/src/harness/_namespaces/fakes.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the fakes namespace. */
-export * from "../fakesHosts";
+export * from "../fakesHosts.js";
diff --git a/src/harness/_namespaces/ts.server.ts b/src/harness/_namespaces/ts.server.ts
index 714986489e3d5..d808ae75c51c4 100644
--- a/src/harness/_namespaces/ts.server.ts
+++ b/src/harness/_namespaces/ts.server.ts
@@ -1,6 +1,6 @@
/* Generated file to emulate the ts.server namespace. */
-export * from "../../jsTyping/_namespaces/ts.server";
-export * from "../../server/_namespaces/ts.server";
-export * from "../../typingsInstallerCore/_namespaces/ts.server";
-export * from "../client";
+export * from "../../jsTyping/_namespaces/ts.server.js";
+export * from "../../server/_namespaces/ts.server.js";
+export * from "../../typingsInstallerCore/_namespaces/ts.server.js";
+export * from "../client.js";
diff --git a/src/harness/_namespaces/ts.ts b/src/harness/_namespaces/ts.ts
index 3f6ecdc8eeea5..a8d0cb3f723c2 100644
--- a/src/harness/_namespaces/ts.ts
+++ b/src/harness/_namespaces/ts.ts
@@ -1,11 +1,11 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-export * from "../../services/_namespaces/ts";
-export * from "../../jsTyping/_namespaces/ts";
-export * from "../../server/_namespaces/ts";
-export * from "../../typingsInstallerCore/_namespaces/ts";
-export * from "../../deprecatedCompat/_namespaces/ts";
-export * from "../harnessGlobals";
-import * as server from "./ts.server";
+export * from "../../compiler/_namespaces/ts.js";
+export * from "../../services/_namespaces/ts.js";
+export * from "../../jsTyping/_namespaces/ts.js";
+export * from "../../server/_namespaces/ts.js";
+export * from "../../typingsInstallerCore/_namespaces/ts.js";
+export * from "../../deprecatedCompat/_namespaces/ts.js";
+export * from "../harnessGlobals.js";
+import * as server from "./ts.server.js";
export { server };
diff --git a/src/harness/_namespaces/vfs.ts b/src/harness/_namespaces/vfs.ts
index 1eb82cd822103..ddd2347e4a99e 100644
--- a/src/harness/_namespaces/vfs.ts
+++ b/src/harness/_namespaces/vfs.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the vfs namespace. */
-export * from "../vfsUtil";
+export * from "../vfsUtil.js";
diff --git a/src/harness/_namespaces/vpath.ts b/src/harness/_namespaces/vpath.ts
index 7430c87d9b6ad..5c9c5ff5e95df 100644
--- a/src/harness/_namespaces/vpath.ts
+++ b/src/harness/_namespaces/vpath.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the vpath namespace. */
-export * from "../vpathUtil";
+export * from "../vpathUtil.js";
diff --git a/src/harness/client.ts b/src/harness/client.ts
index cc138546174e5..286b712af11b6 100644
--- a/src/harness/client.ts
+++ b/src/harness/client.ts
@@ -73,8 +73,8 @@ import {
TodoComment,
TodoCommentDescriptor,
UserPreferences,
-} from "./_namespaces/ts";
-import { protocol } from "./_namespaces/ts.server";
+} from "./_namespaces/ts.js";
+import { protocol } from "./_namespaces/ts.server.js";
export interface SessionClientHost extends LanguageServiceHost {
writeMessage(message: string): void;
diff --git a/src/harness/collectionsImpl.ts b/src/harness/collectionsImpl.ts
index 5e6b3d1fb4446..7b0a859d0fcbc 100644
--- a/src/harness/collectionsImpl.ts
+++ b/src/harness/collectionsImpl.ts
@@ -1,4 +1,4 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
export interface SortOptions {
comparer: (a: T, b: T) => number;
diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts
index f73e739e8b2d0..90393622d9308 100644
--- a/src/harness/compilerImpl.ts
+++ b/src/harness/compilerImpl.ts
@@ -1,10 +1,10 @@
-import * as collections from "./_namespaces/collections";
-import * as documents from "./_namespaces/documents";
-import * as fakes from "./_namespaces/fakes";
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
+import * as collections from "./_namespaces/collections.js";
+import * as documents from "./_namespaces/documents.js";
+import * as fakes from "./_namespaces/fakes.js";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
/**
* Test harness compiler functionality.
diff --git a/src/harness/documentsUtil.ts b/src/harness/documentsUtil.ts
index 8699609ef5350..8a96d4d290f3e 100644
--- a/src/harness/documentsUtil.ts
+++ b/src/harness/documentsUtil.ts
@@ -1,5 +1,5 @@
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
// NOTE: The contents of this file are all exported from the namespace 'documents'. This is to
// support the eventual conversion of harness into a modular system.
diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts
index b8decf789a1aa..9fdeed5b6cdc7 100644
--- a/src/harness/evaluatorImpl.ts
+++ b/src/harness/evaluatorImpl.ts
@@ -1,9 +1,9 @@
-import * as compiler from "./_namespaces/compiler";
-import * as fakes from "./_namespaces/fakes";
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
+import * as compiler from "./_namespaces/compiler.js";
+import * as fakes from "./_namespaces/fakes.js";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
const sourceFile = vpath.combine(vfs.srcFolder, "source.ts");
const sourceFileJs = vpath.combine(vfs.srcFolder, "source.js");
diff --git a/src/harness/fakesHosts.ts b/src/harness/fakesHosts.ts
index 4388b77aa1ca5..b677d7248261d 100644
--- a/src/harness/fakesHosts.ts
+++ b/src/harness/fakesHosts.ts
@@ -1,10 +1,10 @@
-import * as collections from "./_namespaces/collections";
-import * as documents from "./_namespaces/documents";
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as Utils from "./_namespaces/Utils";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
+import * as collections from "./_namespaces/collections.js";
+import * as documents from "./_namespaces/documents.js";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as Utils from "./_namespaces/Utils.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
/**
* Fake implementations of various compiler dependencies.
diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts
index fc544bc2e0e6d..d11daf7b45a8b 100644
--- a/src/harness/fourslashImpl.ts
+++ b/src/harness/fourslashImpl.ts
@@ -1,11 +1,11 @@
-import * as fakes from "./_namespaces/fakes";
-import * as FourSlashInterface from "./_namespaces/FourSlashInterface";
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as Utils from "./_namespaces/Utils";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
-import { LoggerWithInMemoryLogs } from "./tsserverLogger";
+import * as fakes from "./_namespaces/fakes.js";
+import * as FourSlashInterface from "./_namespaces/FourSlashInterface.js";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as Utils from "./_namespaces/Utils.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
+import { LoggerWithInMemoryLogs } from "./tsserverLogger.js";
import ArrayOrSingle = FourSlashInterface.ArrayOrSingle;
diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts
index 64577f69ced7c..b904a94cc2653 100644
--- a/src/harness/fourslashInterfaceImpl.ts
+++ b/src/harness/fourslashInterfaceImpl.ts
@@ -1,5 +1,5 @@
-import * as FourSlash from "./_namespaces/FourSlash";
-import * as ts from "./_namespaces/ts";
+import * as FourSlash from "./_namespaces/FourSlash.js";
+import * as ts from "./_namespaces/ts.js";
export class Test {
constructor(private state: FourSlash.TestState) {
diff --git a/src/harness/harnessGlobals.ts b/src/harness/harnessGlobals.ts
index a83bff41287ba..87831e80f66d5 100644
--- a/src/harness/harnessGlobals.ts
+++ b/src/harness/harnessGlobals.ts
@@ -1,6 +1,6 @@
import * as chai from "chai";
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
// this will work in the browser via browserify
declare global {
diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts
index a9891d70921b0..fb0a80b71d457 100644
--- a/src/harness/harnessIO.ts
+++ b/src/harness/harnessIO.ts
@@ -1,15 +1,15 @@
-import * as compiler from "./_namespaces/compiler";
-import * as documents from "./_namespaces/documents";
-import * as fakes from "./_namespaces/fakes";
+import * as compiler from "./_namespaces/compiler.js";
+import * as documents from "./_namespaces/documents.js";
+import * as fakes from "./_namespaces/fakes.js";
import {
RunnerBase,
TypeWriterResult,
TypeWriterWalker,
-} from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as Utils from "./_namespaces/Utils";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
+} from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as Utils from "./_namespaces/Utils.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
export interface IO {
newLine(): string;
diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts
index c890eadc37e75..4dfd58a297a96 100644
--- a/src/harness/harnessLanguageService.ts
+++ b/src/harness/harnessLanguageService.ts
@@ -1,22 +1,22 @@
-import * as collections from "./_namespaces/collections";
-import * as fakes from "./_namespaces/fakes";
+import * as collections from "./_namespaces/collections.js";
+import * as fakes from "./_namespaces/fakes.js";
import {
Compiler,
mockHash,
virtualFileSystemRoot,
-} from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import { getNewLineCharacter } from "./_namespaces/ts";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
-import { incrementalVerifier } from "./incrementalUtils";
-import { patchServiceForStateBaseline } from "./projectServiceStateLogger";
+} from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import { getNewLineCharacter } from "./_namespaces/ts.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
+import { incrementalVerifier } from "./incrementalUtils.js";
+import { patchServiceForStateBaseline } from "./projectServiceStateLogger.js";
import {
createLoggerWithInMemoryLogs,
HarnessLSCouldNotResolveModule,
LoggerWithInMemoryLogs,
-} from "./tsserverLogger";
-import { createWatchUtils } from "./watchUtils";
+} from "./tsserverLogger.js";
+import { createWatchUtils } from "./watchUtils.js";
export function makeDefaultProxy(info: ts.server.PluginCreateInfo): ts.LanguageService {
const proxy = Object.create(/*o*/ null); // eslint-disable-line no-restricted-syntax
diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts
index cb335891e893b..d7989da8d6980 100644
--- a/src/harness/harnessUtils.ts
+++ b/src/harness/harnessUtils.ts
@@ -1,5 +1,5 @@
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
export function encodeString(s: string): string {
return Buffer.from(s).toString("utf8");
diff --git a/src/harness/incrementalUtils.ts b/src/harness/incrementalUtils.ts
index 0ac3c9da9d2d3..ae48d0bed6694 100644
--- a/src/harness/incrementalUtils.ts
+++ b/src/harness/incrementalUtils.ts
@@ -1,4 +1,4 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
export function reportDocumentRegistryStats(documentRegistry: ts.DocumentRegistry) {
const str: string[] = [];
diff --git a/src/harness/projectServiceStateLogger.ts b/src/harness/projectServiceStateLogger.ts
index fd3f75853079d..ace44b97b1248 100644
--- a/src/harness/projectServiceStateLogger.ts
+++ b/src/harness/projectServiceStateLogger.ts
@@ -9,7 +9,7 @@ import {
isString,
noop,
SourceMapper,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
import {
AutoImportProviderProject,
AuxiliaryProject,
@@ -23,8 +23,8 @@ import {
ScriptInfo,
SourceMapFileWatcher,
TextStorage,
-} from "./_namespaces/ts.server";
-import { LoggerWithInMemoryLogs } from "./tsserverLogger";
+} from "./_namespaces/ts.server.js";
+import { LoggerWithInMemoryLogs } from "./tsserverLogger.js";
interface ProjectData {
projectStateVersion: Project["projectStateVersion"];
diff --git a/src/harness/runnerbase.ts b/src/harness/runnerbase.ts
index cc341aa499e89..17c6e5cb556a2 100644
--- a/src/harness/runnerbase.ts
+++ b/src/harness/runnerbase.ts
@@ -1,8 +1,8 @@
import {
IO,
userSpecifiedRoot,
-} from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
+} from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
export type TestRunnerKind = CompilerTestKind | FourslashTestKind | "project" | "transpile";
export type CompilerTestKind = "conformance" | "compiler";
diff --git a/src/harness/sourceMapRecorder.ts b/src/harness/sourceMapRecorder.ts
index 6504f33877614..44a6c12edf935 100644
--- a/src/harness/sourceMapRecorder.ts
+++ b/src/harness/sourceMapRecorder.ts
@@ -1,7 +1,7 @@
-import * as documents from "./_namespaces/documents";
-import { Compiler } from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as Utils from "./_namespaces/Utils";
+import * as documents from "./_namespaces/documents.js";
+import { Compiler } from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as Utils from "./_namespaces/Utils.js";
interface SourceMapSpanWithDecodeErrors {
sourceMapSpan: ts.Mapping;
diff --git a/src/harness/tsserverLogger.ts b/src/harness/tsserverLogger.ts
index 605d478824d40..6e8d18be74c6e 100644
--- a/src/harness/tsserverLogger.ts
+++ b/src/harness/tsserverLogger.ts
@@ -1,5 +1,5 @@
-import * as ts from "./_namespaces/ts";
-import { Compiler } from "./harnessIO";
+import * as ts from "./_namespaces/ts.js";
+import { Compiler } from "./harnessIO.js";
export const HarnessLSCouldNotResolveModule = "HarnessLanguageService:: Could not resolve module";
diff --git a/src/harness/typeWriter.ts b/src/harness/typeWriter.ts
index d8dd2326ddbd2..e09f8bd56a272 100644
--- a/src/harness/typeWriter.ts
+++ b/src/harness/typeWriter.ts
@@ -1,9 +1,9 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
import {
createPrinter,
createTextWriter,
memoize,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface TypeWriterTypeResult {
line: number;
diff --git a/src/harness/util.ts b/src/harness/util.ts
index 59bbbb0cec6af..4b0f7e28b9a09 100644
--- a/src/harness/util.ts
+++ b/src/harness/util.ts
@@ -1,4 +1,4 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
/**
* Common utilities
diff --git a/src/harness/vfsUtil.ts b/src/harness/vfsUtil.ts
index 11ffcfb25a683..0440c6b9e3316 100644
--- a/src/harness/vfsUtil.ts
+++ b/src/harness/vfsUtil.ts
@@ -1,8 +1,8 @@
-import * as collections from "./_namespaces/collections";
-import * as documents from "./_namespaces/documents";
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as vpath from "./_namespaces/vpath";
+import * as collections from "./_namespaces/collections.js";
+import * as documents from "./_namespaces/documents.js";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as vpath from "./_namespaces/vpath.js";
/**
* Posix-style path to the TypeScript compiler build outputs (including tsc.js, lib.d.ts, etc.)
diff --git a/src/harness/vpathUtil.ts b/src/harness/vpathUtil.ts
index 9b9d5e79fdfe6..c7c1ef4ce47c8 100644
--- a/src/harness/vpathUtil.ts
+++ b/src/harness/vpathUtil.ts
@@ -1,5 +1,5 @@
-import * as ts from "./_namespaces/ts";
-import * as vfs from "./_namespaces/vfs";
+import * as ts from "./_namespaces/ts.js";
+import * as vfs from "./_namespaces/vfs.js";
export import sep = ts.directorySeparator;
export import normalizeSeparators = ts.normalizeSlashes;
diff --git a/src/harness/watchUtils.ts b/src/harness/watchUtils.ts
index fd0201f28b20f..194a4d3225b2d 100644
--- a/src/harness/watchUtils.ts
+++ b/src/harness/watchUtils.ts
@@ -10,7 +10,7 @@ import {
MultiMap,
PollingInterval,
System,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface TestFileWatcher {
cb: FileWatcherCallback;
diff --git a/src/jsTyping/_namespaces/ts.JsTyping.ts b/src/jsTyping/_namespaces/ts.JsTyping.ts
index 6b010af980713..92abff3bea4b5 100644
--- a/src/jsTyping/_namespaces/ts.JsTyping.ts
+++ b/src/jsTyping/_namespaces/ts.JsTyping.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.JsTyping namespace. */
-export * from "../jsTyping";
+export * from "../jsTyping.js";
diff --git a/src/jsTyping/_namespaces/ts.server.ts b/src/jsTyping/_namespaces/ts.server.ts
index fe67648d42d98..a378332035669 100644
--- a/src/jsTyping/_namespaces/ts.server.ts
+++ b/src/jsTyping/_namespaces/ts.server.ts
@@ -1,4 +1,4 @@
/* Generated file to emulate the ts.server namespace. */
-export * from "../shared";
-export * from "../types";
+export * from "../shared.js";
+export * from "../types.js";
diff --git a/src/jsTyping/_namespaces/ts.ts b/src/jsTyping/_namespaces/ts.ts
index adf9791f4d2b5..db60f5218cf19 100644
--- a/src/jsTyping/_namespaces/ts.ts
+++ b/src/jsTyping/_namespaces/ts.ts
@@ -1,7 +1,7 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-import * as JsTyping from "./ts.JsTyping";
+export * from "../../compiler/_namespaces/ts.js";
+import * as JsTyping from "./ts.JsTyping.js";
export { JsTyping };
-import * as server from "./ts.server";
+import * as server from "./ts.server.js";
export { server };
diff --git a/src/jsTyping/jsTyping.ts b/src/jsTyping/jsTyping.ts
index 1f81cca4ad7ad..c1d2babeab10c 100644
--- a/src/jsTyping/jsTyping.ts
+++ b/src/jsTyping/jsTyping.ts
@@ -29,8 +29,8 @@ import {
TypeAcquisition,
Version,
versionMajorMinor,
-} from "./_namespaces/ts";
-import { stringifyIndented } from "./_namespaces/ts.server";
+} from "./_namespaces/ts.js";
+import { stringifyIndented } from "./_namespaces/ts.server.js";
export interface TypingResolutionHost {
directoryExists(path: string): boolean;
diff --git a/src/jsTyping/shared.ts b/src/jsTyping/shared.ts
index ab163bccbc34e..ddf13a4c9f9d7 100644
--- a/src/jsTyping/shared.ts
+++ b/src/jsTyping/shared.ts
@@ -1,4 +1,4 @@
-import { sys } from "./_namespaces/ts";
+import { sys } from "./_namespaces/ts.js";
export type ActionSet = "action::set";
export type ActionInvalidate = "action::invalidate";
diff --git a/src/jsTyping/types.ts b/src/jsTyping/types.ts
index 8d84a0d3bfdfb..0504a9344ca05 100644
--- a/src/jsTyping/types.ts
+++ b/src/jsTyping/types.ts
@@ -5,7 +5,7 @@ import {
Path,
SortedReadonlyArray,
TypeAcquisition,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
import {
ActionInvalidate,
ActionPackageInstalled,
@@ -15,7 +15,7 @@ import {
EventEndInstallTypes,
EventInitializationFailed,
EventTypesRegistry,
-} from "./_namespaces/ts.server";
+} from "./_namespaces/ts.server.js";
export interface TypingInstallerResponse {
readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations;
diff --git a/src/server/_namespaces/ts.server.protocol.ts b/src/server/_namespaces/ts.server.protocol.ts
index 781f82d050732..09d3f3b43b855 100644
--- a/src/server/_namespaces/ts.server.protocol.ts
+++ b/src/server/_namespaces/ts.server.protocol.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.server.protocol namespace. */
-export * from "../protocol";
+export * from "../protocol.js";
diff --git a/src/server/_namespaces/ts.server.ts b/src/server/_namespaces/ts.server.ts
index deaf2e873c38d..cc95db272e9d9 100644
--- a/src/server/_namespaces/ts.server.ts
+++ b/src/server/_namespaces/ts.server.ts
@@ -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";
diff --git a/src/server/_namespaces/ts.ts b/src/server/_namespaces/ts.ts
index 26e554e4cd973..59404d1b09eac 100644
--- a/src/server/_namespaces/ts.ts
+++ b/src/server/_namespaces/ts.ts
@@ -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 };
diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts
index 389c879feb106..449e0deacd219 100644
--- a/src/server/editorServices.ts
+++ b/src/server/editorServices.ts
@@ -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 */
diff --git a/src/server/moduleSpecifierCache.ts b/src/server/moduleSpecifierCache.ts
index fd5d74fcd861e..b47add6dfe888 100644
--- a/src/server/moduleSpecifierCache.ts
+++ b/src/server/moduleSpecifierCache.ts
@@ -9,7 +9,7 @@ import {
Path,
ResolvedModuleSpecifierInfo,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export interface ModuleSpecifierResolutionCacheHost {
diff --git a/src/server/packageJsonCache.ts b/src/server/packageJsonCache.ts
index 522bf0933d16e..e525d6b7b4a7e 100644
--- a/src/server/packageJsonCache.ts
+++ b/src/server/packageJsonCache.ts
@@ -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 {
diff --git a/src/server/project.ts b/src/server/project.ts
index db1e5307f74c4..6786d35f1fe18 100644
--- a/src/server/project.ts
+++ b/src/server/project.ts
@@ -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,
diff --git a/src/server/protocol.ts b/src/server/protocol.ts
index b27fb4d5c3dc1..39bc194385376 100644
--- a/src/server/protocol.ts
+++ b/src/server/protocol.ts
@@ -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 };
diff --git a/src/server/scriptInfo.ts b/src/server/scriptInfo.ts
index 42a0ba4782c9e..b3a4ed1ca6e1e 100644
--- a/src/server/scriptInfo.ts
+++ b/src/server/scriptInfo.ts
@@ -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 {
diff --git a/src/server/scriptVersionCache.ts b/src/server/scriptVersionCache.ts
index ecf62c7445f91..306e310f23ee3 100644
--- a/src/server/scriptVersionCache.ts
+++ b/src/server/scriptVersionCache.ts
@@ -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;
diff --git a/src/server/session.ts b/src/server/session.ts
index f05b431aa9260..9fe3a45479b3a 100644
--- a/src/server/session.ts
+++ b/src/server/session.ts
@@ -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;
diff --git a/src/server/types.ts b/src/server/types.ts
index 4a6aa56f7fb46..1ab26e0f20cf9 100644
--- a/src/server/types.ts
+++ b/src/server/types.ts
@@ -4,7 +4,7 @@ import {
FileWatcherCallback,
System,
WatchOptions,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface CompressedData {
length: number;
diff --git a/src/server/typingInstallerAdapter.ts b/src/server/typingInstallerAdapter.ts
index 9470a17c0496e..5f8e90b7f837d 100644
--- a/src/server/typingInstallerAdapter.ts
+++ b/src/server/typingInstallerAdapter.ts
@@ -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 {
diff --git a/src/server/typingsCache.ts b/src/server/typingsCache.ts
index 726006c6cdf6e..daa3737344011 100644
--- a/src/server/typingsCache.ts
+++ b/src/server/typingsCache.ts
@@ -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;
diff --git a/src/server/utilities.ts b/src/server/utilities.ts
index 088a2f9f16684..012270f5d14ad 100644
--- a/src/server/utilities.ts
+++ b/src/server/utilities.ts
@@ -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 {
diff --git a/src/server/utilitiesPublic.ts b/src/server/utilitiesPublic.ts
index ac8e0f3c131c3..c0ce5dfea1295 100644
--- a/src/server/utilitiesPublic.ts
+++ b/src/server/utilitiesPublic.ts
@@ -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,
diff --git a/src/services/_namespaces/ts.BreakpointResolver.ts b/src/services/_namespaces/ts.BreakpointResolver.ts
index 25d68e38408d2..4e74d10c32023 100644
--- a/src/services/_namespaces/ts.BreakpointResolver.ts
+++ b/src/services/_namespaces/ts.BreakpointResolver.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.BreakpointResolver namespace. */
-export * from "../breakpoints";
+export * from "../breakpoints.js";
diff --git a/src/services/_namespaces/ts.CallHierarchy.ts b/src/services/_namespaces/ts.CallHierarchy.ts
index 412260c0935f4..b1055790b5bdc 100644
--- a/src/services/_namespaces/ts.CallHierarchy.ts
+++ b/src/services/_namespaces/ts.CallHierarchy.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.CallHierarchy namespace. */
-export * from "../callHierarchy";
+export * from "../callHierarchy.js";
diff --git a/src/services/_namespaces/ts.Completions.StringCompletions.ts b/src/services/_namespaces/ts.Completions.StringCompletions.ts
index 23e0c06c32ffd..144208dacca1c 100644
--- a/src/services/_namespaces/ts.Completions.StringCompletions.ts
+++ b/src/services/_namespaces/ts.Completions.StringCompletions.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.Completions.StringCompletions namespace. */
-export * from "../stringCompletions";
+export * from "../stringCompletions.js";
diff --git a/src/services/_namespaces/ts.Completions.ts b/src/services/_namespaces/ts.Completions.ts
index bd0d6a8522511..0a644a6391168 100644
--- a/src/services/_namespaces/ts.Completions.ts
+++ b/src/services/_namespaces/ts.Completions.ts
@@ -1,5 +1,5 @@
/* Generated file to emulate the ts.Completions namespace. */
-export * from "../completions";
-import * as StringCompletions from "./ts.Completions.StringCompletions";
+export * from "../completions.js";
+import * as StringCompletions from "./ts.Completions.StringCompletions.js";
export { StringCompletions };
diff --git a/src/services/_namespaces/ts.FindAllReferences.ts b/src/services/_namespaces/ts.FindAllReferences.ts
index a5325a82f0cc4..76f8567e81465 100644
--- a/src/services/_namespaces/ts.FindAllReferences.ts
+++ b/src/services/_namespaces/ts.FindAllReferences.ts
@@ -1,4 +1,4 @@
/* Generated file to emulate the ts.FindAllReferences namespace. */
-export * from "../importTracker";
-export * from "../findAllReferences";
+export * from "../importTracker.js";
+export * from "../findAllReferences.js";
diff --git a/src/services/_namespaces/ts.GoToDefinition.ts b/src/services/_namespaces/ts.GoToDefinition.ts
index 41c12c0d1f1dc..04a5f473c4119 100644
--- a/src/services/_namespaces/ts.GoToDefinition.ts
+++ b/src/services/_namespaces/ts.GoToDefinition.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.GoToDefinition namespace. */
-export * from "../goToDefinition";
+export * from "../goToDefinition.js";
diff --git a/src/services/_namespaces/ts.InlayHints.ts b/src/services/_namespaces/ts.InlayHints.ts
index fd189d5732578..920473f13537d 100644
--- a/src/services/_namespaces/ts.InlayHints.ts
+++ b/src/services/_namespaces/ts.InlayHints.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.InlayHints namespace. */
-export * from "../inlayHints";
+export * from "../inlayHints.js";
diff --git a/src/services/_namespaces/ts.JsDoc.ts b/src/services/_namespaces/ts.JsDoc.ts
index 1572df70c3b20..e283c34ba63d6 100644
--- a/src/services/_namespaces/ts.JsDoc.ts
+++ b/src/services/_namespaces/ts.JsDoc.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.JsDoc namespace. */
-export * from "../jsDoc";
+export * from "../jsDoc.js";
diff --git a/src/services/_namespaces/ts.NavigateTo.ts b/src/services/_namespaces/ts.NavigateTo.ts
index cf0e35ad1cf1c..ba6ef9d35f665 100644
--- a/src/services/_namespaces/ts.NavigateTo.ts
+++ b/src/services/_namespaces/ts.NavigateTo.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.NavigateTo namespace. */
-export * from "../navigateTo";
+export * from "../navigateTo.js";
diff --git a/src/services/_namespaces/ts.NavigationBar.ts b/src/services/_namespaces/ts.NavigationBar.ts
index ad1c32d373d63..46d2b628078d2 100644
--- a/src/services/_namespaces/ts.NavigationBar.ts
+++ b/src/services/_namespaces/ts.NavigationBar.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.NavigationBar namespace. */
-export * from "../navigationBar";
+export * from "../navigationBar.js";
diff --git a/src/services/_namespaces/ts.OrganizeImports.ts b/src/services/_namespaces/ts.OrganizeImports.ts
index 1a338fc8e12b1..f5f2c3e495954 100644
--- a/src/services/_namespaces/ts.OrganizeImports.ts
+++ b/src/services/_namespaces/ts.OrganizeImports.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.OrganizeImports namespace. */
-export * from "../organizeImports";
+export * from "../organizeImports.js";
diff --git a/src/services/_namespaces/ts.OutliningElementsCollector.ts b/src/services/_namespaces/ts.OutliningElementsCollector.ts
index b6b05f8f6772e..960464818a40d 100644
--- a/src/services/_namespaces/ts.OutliningElementsCollector.ts
+++ b/src/services/_namespaces/ts.OutliningElementsCollector.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.OutliningElementsCollector namespace. */
-export * from "../outliningElementsCollector";
+export * from "../outliningElementsCollector.js";
diff --git a/src/services/_namespaces/ts.Rename.ts b/src/services/_namespaces/ts.Rename.ts
index e587684f8e689..de87aac59ebf3 100644
--- a/src/services/_namespaces/ts.Rename.ts
+++ b/src/services/_namespaces/ts.Rename.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.Rename namespace. */
-export * from "../rename";
+export * from "../rename.js";
diff --git a/src/services/_namespaces/ts.SignatureHelp.ts b/src/services/_namespaces/ts.SignatureHelp.ts
index c87bf5c7e8d14..592b993aab81b 100644
--- a/src/services/_namespaces/ts.SignatureHelp.ts
+++ b/src/services/_namespaces/ts.SignatureHelp.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.SignatureHelp namespace. */
-export * from "../signatureHelp";
+export * from "../signatureHelp.js";
diff --git a/src/services/_namespaces/ts.SmartSelectionRange.ts b/src/services/_namespaces/ts.SmartSelectionRange.ts
index f90161430d9b0..1e14c3b606ec9 100644
--- a/src/services/_namespaces/ts.SmartSelectionRange.ts
+++ b/src/services/_namespaces/ts.SmartSelectionRange.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.SmartSelectionRange namespace. */
-export * from "../smartSelection";
+export * from "../smartSelection.js";
diff --git a/src/services/_namespaces/ts.SymbolDisplay.ts b/src/services/_namespaces/ts.SymbolDisplay.ts
index fcb8050c44372..851401ae7f32e 100644
--- a/src/services/_namespaces/ts.SymbolDisplay.ts
+++ b/src/services/_namespaces/ts.SymbolDisplay.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.SymbolDisplay namespace. */
-export * from "../symbolDisplay";
+export * from "../symbolDisplay.js";
diff --git a/src/services/_namespaces/ts.classifier.ts b/src/services/_namespaces/ts.classifier.ts
index 34bc4e52196cc..fda72f72284f1 100644
--- a/src/services/_namespaces/ts.classifier.ts
+++ b/src/services/_namespaces/ts.classifier.ts
@@ -1,4 +1,4 @@
/* Generated file to emulate the ts.classifier namespace. */
-import * as v2020 from "./ts.classifier.v2020";
+import * as v2020 from "./ts.classifier.v2020.js";
export { v2020 };
diff --git a/src/services/_namespaces/ts.classifier.v2020.ts b/src/services/_namespaces/ts.classifier.v2020.ts
index 361c15f82351b..c4410e139a621 100644
--- a/src/services/_namespaces/ts.classifier.v2020.ts
+++ b/src/services/_namespaces/ts.classifier.v2020.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.classifier.v2020 namespace. */
-export * from "../classifier2020";
+export * from "../classifier2020.js";
diff --git a/src/services/_namespaces/ts.codefix.ts b/src/services/_namespaces/ts.codefix.ts
index b4b2dd37846e0..988323bd6a885 100644
--- a/src/services/_namespaces/ts.codefix.ts
+++ b/src/services/_namespaces/ts.codefix.ts
@@ -1,75 +1,75 @@
/* Generated file to emulate the ts.codefix namespace. */
-export * from "../codeFixProvider";
-export * from "../codefixes/addConvertToUnknownForNonOverlappingTypes";
-export * from "../codefixes/addEmptyExportDeclaration";
-export * from "../codefixes/addMissingAsync";
-export * from "../codefixes/addMissingAwait";
-export * from "../codefixes/addMissingConst";
-export * from "../codefixes/addMissingDeclareProperty";
-export * from "../codefixes/addMissingInvocationForDecorator";
-export * from "../codefixes/addNameToNamelessParameter";
-export * from "../codefixes/addOptionalPropertyUndefined";
-export * from "../codefixes/annotateWithTypeFromJSDoc";
-export * from "../codefixes/convertFunctionToEs6Class";
-export * from "../codefixes/convertToAsyncFunction";
-export * from "../codefixes/convertToEsModule";
-export * from "../codefixes/correctQualifiedNameToIndexedAccessType";
-export * from "../codefixes/convertToTypeOnlyExport";
-export * from "../codefixes/convertToTypeOnlyImport";
-export * from "../codefixes/convertTypedefToType";
-export * from "../codefixes/convertLiteralTypeToMappedType";
-export * from "../codefixes/fixClassIncorrectlyImplementsInterface";
-export * from "../codefixes/importFixes";
-export * from "../codefixes/fixAddMissingConstraint";
-export * from "../codefixes/fixOverrideModifier";
-export * from "../codefixes/fixNoPropertyAccessFromIndexSignature";
-export * from "../codefixes/fixImplicitThis";
-export * from "../codefixes/fixImportNonExportedMember";
-export * from "../codefixes/fixIncorrectNamedTupleSyntax";
-export * from "../codefixes/fixSpelling";
-export * from "../codefixes/returnValueCorrect";
-export * from "../codefixes/fixAddMissingMember";
-export * from "../codefixes/fixAddMissingNewOperator";
-export * from "../codefixes/fixAddMissingParam";
-export * from "../codefixes/fixCannotFindModule";
-export * from "../codefixes/fixClassDoesntImplementInheritedAbstractMember";
-export * from "../codefixes/fixClassSuperMustPrecedeThisAccess";
-export * from "../codefixes/fixConstructorForDerivedNeedSuperCall";
-export * from "../codefixes/fixEnableJsxFlag";
-export * from "../codefixes/fixNaNEquality";
-export * from "../codefixes/fixModuleAndTargetOptions";
-export * from "../codefixes/fixPropertyAssignment";
-export * from "../codefixes/fixExtendsInterfaceBecomesImplements";
-export * from "../codefixes/fixForgottenThisPropertyAccess";
-export * from "../codefixes/fixInvalidJsxCharacters";
-export * from "../codefixes/fixUnmatchedParameter";
-export * from "../codefixes/fixUnreferenceableDecoratorMetadata";
-export * from "../codefixes/fixUnusedIdentifier";
-export * from "../codefixes/fixUnreachableCode";
-export * from "../codefixes/fixUnusedLabel";
-export * from "../codefixes/fixJSDocTypes";
-export * from "../codefixes/fixMissingCallParentheses";
-export * from "../codefixes/fixMissingTypeAnnotationOnExports";
-export * from "../codefixes/fixAwaitInSyncFunction";
-export * from "../codefixes/fixPropertyOverrideAccessor";
-export * from "../codefixes/inferFromUsage";
-export * from "../codefixes/fixReturnTypeInAsyncFunction";
-export * from "../codefixes/disableJsDiagnostics";
-export * from "../codefixes/helpers";
-export * from "../codefixes/generateAccessors";
-export * from "../codefixes/fixInvalidImportSyntax";
-export * from "../codefixes/fixStrictClassInitialization";
-export * from "../codefixes/requireInTs";
-export * from "../codefixes/useDefaultImport";
-export * from "../codefixes/useBigintLiteral";
-export * from "../codefixes/fixAddModuleReferTypeMissingTypeof";
-export * from "../codefixes/wrapJsxInFragment";
-export * from "../codefixes/wrapDecoratorInParentheses";
-export * from "../codefixes/convertToMappedObjectType";
-export * from "../codefixes/removeAccidentalCallParentheses";
-export * from "../codefixes/removeUnnecessaryAwait";
-export * from "../codefixes/splitTypeOnlyImport";
-export * from "../codefixes/convertConstToLet";
-export * from "../codefixes/fixExpectedComma";
-export * from "../codefixes/fixAddVoidToPromise";
+export * from "../codeFixProvider.js";
+export * from "../codefixes/addConvertToUnknownForNonOverlappingTypes.js";
+export * from "../codefixes/addEmptyExportDeclaration.js";
+export * from "../codefixes/addMissingAsync.js";
+export * from "../codefixes/addMissingAwait.js";
+export * from "../codefixes/addMissingConst.js";
+export * from "../codefixes/addMissingDeclareProperty.js";
+export * from "../codefixes/addMissingInvocationForDecorator.js";
+export * from "../codefixes/addNameToNamelessParameter.js";
+export * from "../codefixes/addOptionalPropertyUndefined.js";
+export * from "../codefixes/annotateWithTypeFromJSDoc.js";
+export * from "../codefixes/convertFunctionToEs6Class.js";
+export * from "../codefixes/convertToAsyncFunction.js";
+export * from "../codefixes/convertToEsModule.js";
+export * from "../codefixes/correctQualifiedNameToIndexedAccessType.js";
+export * from "../codefixes/convertToTypeOnlyExport.js";
+export * from "../codefixes/convertToTypeOnlyImport.js";
+export * from "../codefixes/convertTypedefToType.js";
+export * from "../codefixes/convertLiteralTypeToMappedType.js";
+export * from "../codefixes/fixClassIncorrectlyImplementsInterface.js";
+export * from "../codefixes/importFixes.js";
+export * from "../codefixes/fixAddMissingConstraint.js";
+export * from "../codefixes/fixOverrideModifier.js";
+export * from "../codefixes/fixNoPropertyAccessFromIndexSignature.js";
+export * from "../codefixes/fixImplicitThis.js";
+export * from "../codefixes/fixImportNonExportedMember.js";
+export * from "../codefixes/fixIncorrectNamedTupleSyntax.js";
+export * from "../codefixes/fixSpelling.js";
+export * from "../codefixes/returnValueCorrect.js";
+export * from "../codefixes/fixAddMissingMember.js";
+export * from "../codefixes/fixAddMissingNewOperator.js";
+export * from "../codefixes/fixAddMissingParam.js";
+export * from "../codefixes/fixCannotFindModule.js";
+export * from "../codefixes/fixClassDoesntImplementInheritedAbstractMember.js";
+export * from "../codefixes/fixClassSuperMustPrecedeThisAccess.js";
+export * from "../codefixes/fixConstructorForDerivedNeedSuperCall.js";
+export * from "../codefixes/fixEnableJsxFlag.js";
+export * from "../codefixes/fixNaNEquality.js";
+export * from "../codefixes/fixModuleAndTargetOptions.js";
+export * from "../codefixes/fixPropertyAssignment.js";
+export * from "../codefixes/fixExtendsInterfaceBecomesImplements.js";
+export * from "../codefixes/fixForgottenThisPropertyAccess.js";
+export * from "../codefixes/fixInvalidJsxCharacters.js";
+export * from "../codefixes/fixUnmatchedParameter.js";
+export * from "../codefixes/fixUnreferenceableDecoratorMetadata.js";
+export * from "../codefixes/fixUnusedIdentifier.js";
+export * from "../codefixes/fixUnreachableCode.js";
+export * from "../codefixes/fixUnusedLabel.js";
+export * from "../codefixes/fixJSDocTypes.js";
+export * from "../codefixes/fixMissingCallParentheses.js";
+export * from "../codefixes/fixMissingTypeAnnotationOnExports.js";
+export * from "../codefixes/fixAwaitInSyncFunction.js";
+export * from "../codefixes/fixPropertyOverrideAccessor.js";
+export * from "../codefixes/inferFromUsage.js";
+export * from "../codefixes/fixReturnTypeInAsyncFunction.js";
+export * from "../codefixes/disableJsDiagnostics.js";
+export * from "../codefixes/helpers.js";
+export * from "../codefixes/generateAccessors.js";
+export * from "../codefixes/fixInvalidImportSyntax.js";
+export * from "../codefixes/fixStrictClassInitialization.js";
+export * from "../codefixes/requireInTs.js";
+export * from "../codefixes/useDefaultImport.js";
+export * from "../codefixes/useBigintLiteral.js";
+export * from "../codefixes/fixAddModuleReferTypeMissingTypeof.js";
+export * from "../codefixes/wrapJsxInFragment.js";
+export * from "../codefixes/wrapDecoratorInParentheses.js";
+export * from "../codefixes/convertToMappedObjectType.js";
+export * from "../codefixes/removeAccidentalCallParentheses.js";
+export * from "../codefixes/removeUnnecessaryAwait.js";
+export * from "../codefixes/splitTypeOnlyImport.js";
+export * from "../codefixes/convertConstToLet.js";
+export * from "../codefixes/fixExpectedComma.js";
+export * from "../codefixes/fixAddVoidToPromise.js";
diff --git a/src/services/_namespaces/ts.formatting.ts b/src/services/_namespaces/ts.formatting.ts
index 72e03b2f7e915..bd1396e355176 100644
--- a/src/services/_namespaces/ts.formatting.ts
+++ b/src/services/_namespaces/ts.formatting.ts
@@ -1,9 +1,9 @@
/* Generated file to emulate the ts.formatting namespace. */
-export * from "../formatting/formattingContext";
-export * from "../formatting/formattingScanner";
-export * from "../formatting/rule";
-export * from "../formatting/rules";
-export * from "../formatting/rulesMap";
-export * from "../formatting/formatting";
-export * from "../formatting/smartIndenter";
+export * from "../formatting/formattingContext.js";
+export * from "../formatting/formattingScanner.js";
+export * from "../formatting/rule.js";
+export * from "../formatting/rules.js";
+export * from "../formatting/rulesMap.js";
+export * from "../formatting/formatting.js";
+export * from "../formatting/smartIndenter.js";
diff --git a/src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts b/src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts
index 5dd00f2f63b86..6c5178ed60d8e 100644
--- a/src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts
+++ b/src/services/_namespaces/ts.refactor.addOrRemoveBracesToArrowFunction.ts
@@ -1,4 +1,4 @@
/* Generated file to emulate the ts.refactor.addOrRemoveBracesToArrowFunction namespace. */
-export * from "../refactors/convertOverloadListToSingleSignature";
-export * from "../refactors/addOrRemoveBracesToArrowFunction";
+export * from "../refactors/convertOverloadListToSingleSignature.js";
+export * from "../refactors/addOrRemoveBracesToArrowFunction.js";
diff --git a/src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts b/src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts
index 48fb788058cd4..fc3c0762497e5 100644
--- a/src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts
+++ b/src/services/_namespaces/ts.refactor.convertArrowFunctionOrFunctionExpression.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.convertArrowFunctionOrFunctionExpression namespace. */
-export * from "../refactors/convertArrowFunctionOrFunctionExpression";
+export * from "../refactors/convertArrowFunctionOrFunctionExpression.js";
diff --git a/src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts b/src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts
index 3cc94f5e9f048..488602adfab5f 100644
--- a/src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts
+++ b/src/services/_namespaces/ts.refactor.convertParamsToDestructuredObject.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.convertParamsToDestructuredObject namespace. */
-export * from "../refactors/convertParamsToDestructuredObject";
+export * from "../refactors/convertParamsToDestructuredObject.js";
diff --git a/src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts b/src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts
index e084befebaafc..ba98999f2afa2 100644
--- a/src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts
+++ b/src/services/_namespaces/ts.refactor.convertStringOrTemplateLiteral.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.convertStringOrTemplateLiteral namespace. */
-export * from "../refactors/convertStringOrTemplateLiteral";
+export * from "../refactors/convertStringOrTemplateLiteral.js";
diff --git a/src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts b/src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts
index d8b0ab31eabaa..f6eabd9e28e61 100644
--- a/src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts
+++ b/src/services/_namespaces/ts.refactor.convertToOptionalChainExpression.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.convertToOptionalChainExpression namespace. */
-export * from "../refactors/convertToOptionalChainExpression";
+export * from "../refactors/convertToOptionalChainExpression.js";
diff --git a/src/services/_namespaces/ts.refactor.extractSymbol.ts b/src/services/_namespaces/ts.refactor.extractSymbol.ts
index c71cacd346c4d..1a0fb218580eb 100644
--- a/src/services/_namespaces/ts.refactor.extractSymbol.ts
+++ b/src/services/_namespaces/ts.refactor.extractSymbol.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.extractSymbol namespace. */
-export * from "../refactors/extractSymbol";
+export * from "../refactors/extractSymbol.js";
diff --git a/src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts b/src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts
index 8128f0cb6cb0e..961e779e74e2d 100644
--- a/src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts
+++ b/src/services/_namespaces/ts.refactor.generateGetAccessorAndSetAccessor.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.generateGetAccessorAndSetAccessor namespace. */
-export * from "../refactors/generateGetAccessorAndSetAccessor";
+export * from "../refactors/generateGetAccessorAndSetAccessor.js";
diff --git a/src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts b/src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts
index 3dd2e0a9b04ad..36262dc39371b 100644
--- a/src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts
+++ b/src/services/_namespaces/ts.refactor.inferFunctionReturnType.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.refactor.inferFunctionReturnType namespace. */
-export * from "../refactors/inferFunctionReturnType";
+export * from "../refactors/inferFunctionReturnType.js";
diff --git a/src/services/_namespaces/ts.refactor.ts b/src/services/_namespaces/ts.refactor.ts
index e397f484766ba..e0b976da62f2e 100644
--- a/src/services/_namespaces/ts.refactor.ts
+++ b/src/services/_namespaces/ts.refactor.ts
@@ -1,26 +1,26 @@
/* Generated file to emulate the ts.refactor namespace. */
-export * from "../refactorProvider";
-export * from "../refactors/convertExport";
-export * from "../refactors/convertImport";
-export * from "../refactors/extractType";
-export * from "../refactors/helpers";
-export * from "../refactors/inlineVariable";
-export * from "../refactors/moveToNewFile";
-export * from "../refactors/moveToFile";
-import * as addOrRemoveBracesToArrowFunction from "./ts.refactor.addOrRemoveBracesToArrowFunction";
+export * from "../refactorProvider.js";
+export * from "../refactors/convertExport.js";
+export * from "../refactors/convertImport.js";
+export * from "../refactors/extractType.js";
+export * from "../refactors/helpers.js";
+export * from "../refactors/inlineVariable.js";
+export * from "../refactors/moveToNewFile.js";
+export * from "../refactors/moveToFile.js";
+import * as addOrRemoveBracesToArrowFunction from "./ts.refactor.addOrRemoveBracesToArrowFunction.js";
export { addOrRemoveBracesToArrowFunction };
-import * as convertArrowFunctionOrFunctionExpression from "./ts.refactor.convertArrowFunctionOrFunctionExpression";
+import * as convertArrowFunctionOrFunctionExpression from "./ts.refactor.convertArrowFunctionOrFunctionExpression.js";
export { convertArrowFunctionOrFunctionExpression };
-import * as convertParamsToDestructuredObject from "./ts.refactor.convertParamsToDestructuredObject";
+import * as convertParamsToDestructuredObject from "./ts.refactor.convertParamsToDestructuredObject.js";
export { convertParamsToDestructuredObject };
-import * as convertStringOrTemplateLiteral from "./ts.refactor.convertStringOrTemplateLiteral";
+import * as convertStringOrTemplateLiteral from "./ts.refactor.convertStringOrTemplateLiteral.js";
export { convertStringOrTemplateLiteral };
-import * as convertToOptionalChainExpression from "./ts.refactor.convertToOptionalChainExpression";
+import * as convertToOptionalChainExpression from "./ts.refactor.convertToOptionalChainExpression.js";
export { convertToOptionalChainExpression };
-import * as extractSymbol from "./ts.refactor.extractSymbol";
+import * as extractSymbol from "./ts.refactor.extractSymbol.js";
export { extractSymbol };
-import * as generateGetAccessorAndSetAccessor from "./ts.refactor.generateGetAccessorAndSetAccessor";
+import * as generateGetAccessorAndSetAccessor from "./ts.refactor.generateGetAccessorAndSetAccessor.js";
export { generateGetAccessorAndSetAccessor };
-import * as inferFunctionReturnType from "./ts.refactor.inferFunctionReturnType";
+import * as inferFunctionReturnType from "./ts.refactor.inferFunctionReturnType.js";
export { inferFunctionReturnType };
diff --git a/src/services/_namespaces/ts.textChanges.ts b/src/services/_namespaces/ts.textChanges.ts
index 12a272788fd09..5e3ec149c9f35 100644
--- a/src/services/_namespaces/ts.textChanges.ts
+++ b/src/services/_namespaces/ts.textChanges.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.textChanges namespace. */
-export * from "../textChanges";
+export * from "../textChanges.js";
diff --git a/src/services/_namespaces/ts.ts b/src/services/_namespaces/ts.ts
index e30ea818a04b5..78e24eda966f0 100644
--- a/src/services/_namespaces/ts.ts
+++ b/src/services/_namespaces/ts.ts
@@ -1,58 +1,58 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-export * from "../../jsTyping/_namespaces/ts";
-export * from "../types";
-export * from "../utilities";
-export * from "../exportInfoMap";
-export * from "../classifier";
-export * from "../documentHighlights";
-export * from "../documentRegistry";
-export * from "../getEditsForFileRename";
-export * from "../patternMatcher";
-export * from "../preProcess";
-export * from "../sourcemaps";
-export * from "../suggestionDiagnostics";
-export * from "../transpile";
-export * from "../services";
-export * from "../transform";
-import * as BreakpointResolver from "./ts.BreakpointResolver";
+export * from "../../compiler/_namespaces/ts.js";
+export * from "../../jsTyping/_namespaces/ts.js";
+export * from "../types.js";
+export * from "../utilities.js";
+export * from "../exportInfoMap.js";
+export * from "../classifier.js";
+export * from "../documentHighlights.js";
+export * from "../documentRegistry.js";
+export * from "../getEditsForFileRename.js";
+export * from "../patternMatcher.js";
+export * from "../preProcess.js";
+export * from "../sourcemaps.js";
+export * from "../suggestionDiagnostics.js";
+export * from "../transpile.js";
+export * from "../services.js";
+export * from "../transform.js";
+import * as BreakpointResolver from "./ts.BreakpointResolver.js";
export { BreakpointResolver };
-import * as CallHierarchy from "./ts.CallHierarchy";
+import * as CallHierarchy from "./ts.CallHierarchy.js";
export { CallHierarchy };
-import * as classifier from "./ts.classifier";
+import * as classifier from "./ts.classifier.js";
export { classifier };
-import * as codefix from "./ts.codefix";
+import * as codefix from "./ts.codefix.js";
export { codefix };
-import * as Completions from "./ts.Completions";
+import * as Completions from "./ts.Completions.js";
export { Completions };
-import * as FindAllReferences from "./ts.FindAllReferences";
+import * as FindAllReferences from "./ts.FindAllReferences.js";
export { FindAllReferences };
-import * as GoToDefinition from "./ts.GoToDefinition";
+import * as GoToDefinition from "./ts.GoToDefinition.js";
export { GoToDefinition };
-import * as InlayHints from "./ts.InlayHints";
+import * as InlayHints from "./ts.InlayHints.js";
export { InlayHints };
-import * as JsDoc from "./ts.JsDoc";
+import * as JsDoc from "./ts.JsDoc.js";
export { JsDoc };
-import * as NavigateTo from "./ts.NavigateTo";
+import * as NavigateTo from "./ts.NavigateTo.js";
export { NavigateTo };
-import * as NavigationBar from "./ts.NavigationBar";
+import * as NavigationBar from "./ts.NavigationBar.js";
export { NavigationBar };
-import * as OrganizeImports from "./ts.OrganizeImports";
+import * as OrganizeImports from "./ts.OrganizeImports.js";
export { OrganizeImports };
-import * as OutliningElementsCollector from "./ts.OutliningElementsCollector";
+import * as OutliningElementsCollector from "./ts.OutliningElementsCollector.js";
export { OutliningElementsCollector };
-import * as refactor from "./ts.refactor";
+import * as refactor from "./ts.refactor.js";
export { refactor };
-import * as Rename from "./ts.Rename";
+import * as Rename from "./ts.Rename.js";
export { Rename };
-import * as SignatureHelp from "./ts.SignatureHelp";
+import * as SignatureHelp from "./ts.SignatureHelp.js";
export { SignatureHelp };
-import * as SmartSelectionRange from "./ts.SmartSelectionRange";
+import * as SmartSelectionRange from "./ts.SmartSelectionRange.js";
export { SmartSelectionRange };
-import * as SymbolDisplay from "./ts.SymbolDisplay";
+import * as SymbolDisplay from "./ts.SymbolDisplay.js";
export { SymbolDisplay };
-import * as textChanges from "./ts.textChanges";
+import * as textChanges from "./ts.textChanges.js";
export { textChanges };
-import * as formatting from "./ts.formatting";
+import * as formatting from "./ts.formatting.js";
export { formatting };
diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts
index 8963a5dcf0d73..17d20da69ee92 100644
--- a/src/services/breakpoints.ts
+++ b/src/services/breakpoints.ts
@@ -70,7 +70,7 @@ import {
VariableStatement,
WhileStatement,
WithStatement,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Get the breakpoint span in given sourceFile
diff --git a/src/services/callHierarchy.ts b/src/services/callHierarchy.ts
index 6b354cbde9d73..77a3b4698e2c0 100644
--- a/src/services/callHierarchy.ts
+++ b/src/services/callHierarchy.ts
@@ -105,7 +105,7 @@ import {
TypeChecker,
usingSingleLineStringWriter,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export type NamedExpression =
diff --git a/src/services/classifier.ts b/src/services/classifier.ts
index df9b7d3e14880..0e9e509edcaa7 100644
--- a/src/services/classifier.ts
+++ b/src/services/classifier.ts
@@ -75,7 +75,7 @@ import {
TokenClass,
TypeChecker,
TypeParameterDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** The classifier is used for syntactic highlighting in editors via the TSServer */
export function createClassifier(): Classifier {
diff --git a/src/services/classifier2020.ts b/src/services/classifier2020.ts
index 1fa90584974f5..529b0adc03563 100644
--- a/src/services/classifier2020.ts
+++ b/src/services/classifier2020.ts
@@ -43,7 +43,7 @@ import {
Type,
TypeChecker,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export const enum TokenEncodingConsts {
diff --git a/src/services/codeFixProvider.ts b/src/services/codeFixProvider.ts
index 2e2282afbc6e1..686a96dea6c8e 100644
--- a/src/services/codeFixProvider.ts
+++ b/src/services/codeFixProvider.ts
@@ -23,7 +23,7 @@ import {
map,
TextChange,
textChanges,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const errorCodeToFixes = createMultiMap();
const fixIdToRegistration = new Map();
diff --git a/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts b/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts
index 4b27aee72c953..942cb05ffb687 100644
--- a/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts
+++ b/src/services/codefixes/addConvertToUnknownForNonOverlappingTypes.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
AsExpression,
Diagnostics,
@@ -11,12 +16,7 @@ import {
SyntaxKind,
textChanges,
TypeAssertion,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addConvertToUnknownForNonOverlappingTypes";
const errorCodes = [Diagnostics.Conversion_of_type_0_to_type_1_may_be_a_mistake_because_neither_type_sufficiently_overlaps_with_the_other_If_this_was_intentional_convert_the_expression_to_unknown_first.code];
diff --git a/src/services/codefixes/addEmptyExportDeclaration.ts b/src/services/codefixes/addEmptyExportDeclaration.ts
index d1c9bbf9a6e54..6241d9841c4e1 100644
--- a/src/services/codefixes/addEmptyExportDeclaration.ts
+++ b/src/services/codefixes/addEmptyExportDeclaration.ts
@@ -1,12 +1,12 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
textChanges,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
registerCodeFix({
errorCodes: [
diff --git a/src/services/codefixes/addMissingAsync.ts b/src/services/codefixes/addMissingAsync.ts
index 39a6f97c8bacd..9afd41691787a 100644
--- a/src/services/codefixes/addMissingAsync.ts
+++ b/src/services/codefixes/addMissingAsync.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
ArrowFunction,
CodeFixAllContext,
@@ -28,12 +33,7 @@ import {
TextSpan,
textSpanEnd,
textSpansEqual,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
type ContextualTrackChangesFunction = (cb: (changeTracker: textChanges.ChangeTracker) => void) => FileTextChanges[];
const fixId = "addMissingAsync";
diff --git a/src/services/codefixes/addMissingAwait.ts b/src/services/codefixes/addMissingAwait.ts
index 61c2692b3a8b5..0fc96ba514b37 100644
--- a/src/services/codefixes/addMissingAwait.ts
+++ b/src/services/codefixes/addMissingAwait.ts
@@ -1,3 +1,9 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CancellationToken,
CodeFixAllContext,
@@ -44,13 +50,7 @@ import {
tryCast,
TypeChecker,
TypeFlags,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
type ContextualTrackChangesFunction = (cb: (changeTracker: textChanges.ChangeTracker) => void) => FileTextChanges[];
const fixId = "addMissingAwait";
diff --git a/src/services/codefixes/addMissingConst.ts b/src/services/codefixes/addMissingConst.ts
index 87adb892cd9f6..17340f6eafc3d 100644
--- a/src/services/codefixes/addMissingConst.ts
+++ b/src/services/codefixes/addMissingConst.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
every,
@@ -17,12 +22,7 @@ import {
textChanges,
tryAddToSet,
TypeChecker,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addMissingConst";
const errorCodes = [
diff --git a/src/services/codefixes/addMissingDeclareProperty.ts b/src/services/codefixes/addMissingDeclareProperty.ts
index e78a76e25e96d..598195c23d192 100644
--- a/src/services/codefixes/addMissingDeclareProperty.ts
+++ b/src/services/codefixes/addMissingDeclareProperty.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
getTokenAtPosition,
@@ -7,12 +12,7 @@ import {
SyntaxKind,
textChanges,
tryAddToSet,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addMissingDeclareProperty";
const errorCodes = [
diff --git a/src/services/codefixes/addMissingInvocationForDecorator.ts b/src/services/codefixes/addMissingInvocationForDecorator.ts
index 330757c9fa76f..020768dc8540a 100644
--- a/src/services/codefixes/addMissingInvocationForDecorator.ts
+++ b/src/services/codefixes/addMissingInvocationForDecorator.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -7,12 +12,7 @@ import {
isDecorator,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addMissingInvocationForDecorator";
const errorCodes = [Diagnostics._0_accepts_too_few_arguments_to_be_used_as_a_decorator_here_Did_you_mean_to_call_it_first_and_write_0.code];
diff --git a/src/services/codefixes/addNameToNamelessParameter.ts b/src/services/codefixes/addNameToNamelessParameter.ts
index ca55406e9ca96..d8e5e24e1cdd6 100644
--- a/src/services/codefixes/addNameToNamelessParameter.ts
+++ b/src/services/codefixes/addNameToNamelessParameter.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
createRange,
Debug,
@@ -14,12 +19,7 @@ import {
SyntaxKind,
textChanges,
TypeNode,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addNameToNamelessParameter";
const errorCodes = [Diagnostics.Parameter_has_a_name_but_no_type_Did_you_mean_0_Colon_1.code];
diff --git a/src/services/codefixes/addOptionalPropertyUndefined.ts b/src/services/codefixes/addOptionalPropertyUndefined.ts
index 4b584c3f617ca..cb33ed9d5fa98 100644
--- a/src/services/codefixes/addOptionalPropertyUndefined.ts
+++ b/src/services/codefixes/addOptionalPropertyUndefined.ts
@@ -1,3 +1,7 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
emptyArray,
@@ -26,11 +30,7 @@ import {
TextSpan,
TypeChecker,
UnionTypeNode,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const addOptionalPropertyUndefined = "addOptionalPropertyUndefined";
diff --git a/src/services/codefixes/annotateWithTypeFromJSDoc.ts b/src/services/codefixes/annotateWithTypeFromJSDoc.ts
index a73a19abffe60..72a9cd7d19297 100644
--- a/src/services/codefixes/annotateWithTypeFromJSDoc.ts
+++ b/src/services/codefixes/annotateWithTypeFromJSDoc.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -40,12 +45,7 @@ import {
visitEachChild,
visitNode,
visitNodes,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "annotateWithTypeFromJSDoc";
const errorCodes = [Diagnostics.JSDoc_types_may_be_moved_to_TypeScript_types.code];
diff --git a/src/services/codefixes/convertConstToLet.ts b/src/services/codefixes/convertConstToLet.ts
index fb1cefbc859b3..8497cb2ee8053 100644
--- a/src/services/codefixes/convertConstToLet.ts
+++ b/src/services/codefixes/convertConstToLet.ts
@@ -1,3 +1,9 @@
+import {
+ createCodeFixActionMaybeFixAll,
+ createCombinedCodeActions,
+ eachDiagnostic,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
Diagnostics,
@@ -13,13 +19,7 @@ import {
textChanges,
Token,
tryCast,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionMaybeFixAll,
- createCombinedCodeActions,
- eachDiagnostic,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixConvertConstToLet";
const errorCodes = [Diagnostics.Cannot_assign_to_0_because_it_is_a_constant.code];
diff --git a/src/services/codefixes/convertFunctionToEs6Class.ts b/src/services/codefixes/convertFunctionToEs6Class.ts
index 92d1c85f269f6..56fdaeec81da2 100644
--- a/src/services/codefixes/convertFunctionToEs6Class.ts
+++ b/src/services/codefixes/convertFunctionToEs6Class.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
__String,
AccessExpression,
@@ -60,12 +65,7 @@ import {
TypeChecker,
UserPreferences,
VariableDeclaration,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "convertFunctionToEs6Class";
const errorCodes = [Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration.code];
diff --git a/src/services/codefixes/convertLiteralTypeToMappedType.ts b/src/services/codefixes/convertLiteralTypeToMappedType.ts
index bde76824b8ce6..1811087c077c4 100644
--- a/src/services/codefixes/convertLiteralTypeToMappedType.ts
+++ b/src/services/codefixes/convertLiteralTypeToMappedType.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Diagnostics,
@@ -10,12 +15,7 @@ import {
textChanges,
TypeLiteralNode,
TypeNode,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "convertLiteralTypeToMappedType";
const errorCodes = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code];
diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts
index cb122865c66ac..07ac83e40ea19 100644
--- a/src/services/codefixes/convertToAsyncFunction.ts
+++ b/src/services/codefixes/convertToAsyncFunction.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
ArrowFunction,
AwaitExpression,
@@ -77,12 +82,7 @@ import {
TypeNode,
TypeReference,
UnionReduction,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "convertToAsyncFunction";
const errorCodes = [Diagnostics.This_may_be_converted_to_an_async_function.code];
diff --git a/src/services/codefixes/convertToEsModule.ts b/src/services/codefixes/convertToEsModule.ts
index b78669dc244a0..9b725b591c6a3 100644
--- a/src/services/codefixes/convertToEsModule.ts
+++ b/src/services/codefixes/convertToEsModule.ts
@@ -1,3 +1,8 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ moduleSpecifierToValidIdentifier,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
__String,
arrayFrom,
@@ -74,12 +79,7 @@ import {
textChanges,
TypeChecker,
VariableStatement,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- moduleSpecifierToValidIdentifier,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
registerCodeFix({
errorCodes: [Diagnostics.File_is_a_CommonJS_module_it_may_be_converted_to_an_ES_module.code],
diff --git a/src/services/codefixes/convertToMappedObjectType.ts b/src/services/codefixes/convertToMappedObjectType.ts
index f07987f258c6b..c4330112e8100 100644
--- a/src/services/codefixes/convertToMappedObjectType.ts
+++ b/src/services/codefixes/convertToMappedObjectType.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Diagnostics,
@@ -21,12 +26,7 @@ import {
TypeAliasDeclaration,
TypeLiteralNode,
TypeNode,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixConvertToMappedObjectType";
const errorCodes = [Diagnostics.An_index_signature_parameter_type_cannot_be_a_literal_type_or_generic_type_Consider_using_a_mapped_object_type_instead.code];
diff --git a/src/services/codefixes/convertToTypeOnlyExport.ts b/src/services/codefixes/convertToTypeOnlyExport.ts
index 14ec2e3e8e31d..5f2e80f4c8481 100644
--- a/src/services/codefixes/convertToTypeOnlyExport.ts
+++ b/src/services/codefixes/convertToTypeOnlyExport.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
CodeFixContextBase,
@@ -17,12 +22,7 @@ import {
textChanges,
TextSpan,
tryCast,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const errorCodes = [Diagnostics.Re_exporting_a_type_when_0_is_enabled_requires_using_export_type.code];
const fixId = "convertToTypeOnlyExport";
diff --git a/src/services/codefixes/convertToTypeOnlyImport.ts b/src/services/codefixes/convertToTypeOnlyImport.ts
index 54f1121657432..3fdc81f3e4bbb 100644
--- a/src/services/codefixes/convertToTypeOnlyImport.ts
+++ b/src/services/codefixes/convertToTypeOnlyImport.ts
@@ -1,3 +1,9 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -17,13 +23,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const errorCodes = [
Diagnostics._0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled.code,
diff --git a/src/services/codefixes/convertTypedefToType.ts b/src/services/codefixes/convertTypedefToType.ts
index 395ee58f1378f..70d02fb846678 100644
--- a/src/services/codefixes/convertTypedefToType.ts
+++ b/src/services/codefixes/convertTypedefToType.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -23,12 +28,7 @@ import {
SyntaxKind,
textChanges,
TypeAliasDeclaration,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "convertTypedefToType";
const errorCodes = [Diagnostics.JSDoc_typedef_may_be_converted_to_TypeScript_type.code];
diff --git a/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts b/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts
index 3dbcb5e8f2180..96a7b8914bfe5 100644
--- a/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts
+++ b/src/services/codefixes/correctQualifiedNameToIndexedAccessType.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -10,12 +15,7 @@ import {
QualifiedName,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "correctQualifiedNameToIndexedAccessType";
const errorCodes = [Diagnostics.Cannot_access_0_1_because_0_is_a_type_but_not_a_namespace_Did_you_mean_to_retrieve_the_type_of_the_property_1_in_0_with_0_1.code];
diff --git a/src/services/codefixes/disableJsDiagnostics.ts b/src/services/codefixes/disableJsDiagnostics.ts
index 09d7a00d0c6c5..3d7aa72e4f672 100644
--- a/src/services/codefixes/disableJsDiagnostics.ts
+++ b/src/services/codefixes/disableJsDiagnostics.ts
@@ -1,3 +1,10 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createCodeFixActionWithoutFixAll,
+ createFileTextChanges,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixAction,
createTextChange,
@@ -13,14 +20,7 @@ import {
SourceFile,
textChanges,
tryAddToSet,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createCodeFixActionWithoutFixAll,
- createFileTextChanges,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "disableJsDiagnostics";
const fixId = "disableJsDiagnostics";
diff --git a/src/services/codefixes/fixAddMissingConstraint.ts b/src/services/codefixes/fixAddMissingConstraint.ts
index 267cabc534e02..fad9a8f003a5c 100644
--- a/src/services/codefixes/fixAddMissingConstraint.ts
+++ b/src/services/codefixes/fixAddMissingConstraint.ts
@@ -1,3 +1,13 @@
+import {
+ createCodeFixAction,
+ createCombinedCodeActions,
+ createImportAdder,
+ eachDiagnostic,
+ findAncestorMatchingSpan,
+ getNoopSymbolTrackerWithResolver,
+ registerCodeFix,
+ typeToAutoImportableTypeNode,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
createTextSpan,
@@ -25,17 +35,7 @@ import {
TypeChecker,
TypeParameterDeclaration,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- createCodeFixAction,
- createCombinedCodeActions,
- createImportAdder,
- eachDiagnostic,
- findAncestorMatchingSpan,
- getNoopSymbolTrackerWithResolver,
- registerCodeFix,
- typeToAutoImportableTypeNode,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addMissingConstraint";
const errorCodes = [
diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts
index 1210275178f6b..f5bf022fd5755 100644
--- a/src/services/codefixes/fixAddMissingMember.ts
+++ b/src/services/codefixes/fixAddMissingMember.ts
@@ -1,3 +1,16 @@
+import {
+ createCodeFixAction,
+ createCodeFixActionWithoutFixAll,
+ createCombinedCodeActions,
+ createImportAdder,
+ createSignatureDeclarationFromCallExpression,
+ createSignatureDeclarationFromSignature,
+ createStubbedBody,
+ eachDiagnostic,
+ getAllSupers,
+ ImportAdder,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
__String,
addToSeen,
@@ -112,20 +125,7 @@ import {
TypeNode,
TypeReference,
UnionType,
-} from "../_namespaces/ts";
-import {
- createCodeFixAction,
- createCodeFixActionWithoutFixAll,
- createCombinedCodeActions,
- createImportAdder,
- createSignatureDeclarationFromCallExpression,
- createSignatureDeclarationFromSignature,
- createStubbedBody,
- eachDiagnostic,
- getAllSupers,
- ImportAdder,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixMissingMember = "fixMissingMember";
const fixMissingProperties = "fixMissingProperties";
diff --git a/src/services/codefixes/fixAddMissingNewOperator.ts b/src/services/codefixes/fixAddMissingNewOperator.ts
index 8a44e267fb5f7..adbabbfe2e0a7 100644
--- a/src/services/codefixes/fixAddMissingNewOperator.ts
+++ b/src/services/codefixes/fixAddMissingNewOperator.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Diagnostics,
@@ -9,12 +14,7 @@ import {
textChanges,
TextSpan,
textSpanEnd,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "addMissingNewOperator";
const errorCodes = [Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new.code];
diff --git a/src/services/codefixes/fixAddMissingParam.ts b/src/services/codefixes/fixAddMissingParam.ts
index df78a311337e6..c5ac4f25b2b09 100644
--- a/src/services/codefixes/fixAddMissingParam.ts
+++ b/src/services/codefixes/fixAddMissingParam.ts
@@ -1,3 +1,12 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createImportAdder,
+ ImportAdder,
+ importSymbols,
+ registerCodeFix,
+ tryGetAutoImportableReferenceFromTypeNode,
+} from "../_namespaces/ts.codefix.js";
import {
append,
ArrowFunction,
@@ -44,16 +53,7 @@ import {
TypeChecker,
TypeNode,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createImportAdder,
- ImportAdder,
- importSymbols,
- registerCodeFix,
- tryGetAutoImportableReferenceFromTypeNode,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const addMissingParamFixId = "addMissingParam";
const addOptionalParamFixId = "addOptionalParam";
diff --git a/src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts b/src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts
index 1523819f60190..3d9bb53799fb0 100644
--- a/src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts
+++ b/src/services/codefixes/fixAddModuleReferTypeMissingTypeof.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -7,12 +12,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixIdAddMissingTypeof = "fixAddModuleReferTypeMissingTypeof";
const fixId = fixIdAddMissingTypeof;
diff --git a/src/services/codefixes/fixAddVoidToPromise.ts b/src/services/codefixes/fixAddVoidToPromise.ts
index 82114594c92fb..a9061b9d24ca7 100644
--- a/src/services/codefixes/fixAddVoidToPromise.ts
+++ b/src/services/codefixes/fixAddVoidToPromise.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixAllContext,
Diagnostics,
@@ -24,12 +29,7 @@ import {
textChanges,
TextSpan,
TypeFlags,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "addVoidToPromise";
const fixId = "addVoidToPromise";
diff --git a/src/services/codefixes/fixAwaitInSyncFunction.ts b/src/services/codefixes/fixAwaitInSyncFunction.ts
index e1f78e928cd00..d6b5d766caf12 100644
--- a/src/services/codefixes/fixAwaitInSyncFunction.ts
+++ b/src/services/codefixes/fixAwaitInSyncFunction.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
ArrowFunction,
@@ -19,12 +24,7 @@ import {
SyntaxKind,
textChanges,
TypeNode,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixAwaitInSyncFunction";
const errorCodes = [
diff --git a/src/services/codefixes/fixCannotFindModule.ts b/src/services/codefixes/fixCannotFindModule.ts
index d128045f7f075..4be66a264636b 100644
--- a/src/services/codefixes/fixCannotFindModule.ts
+++ b/src/services/codefixes/fixCannotFindModule.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -11,12 +16,7 @@ import {
parsePackageName,
SourceFile,
tryCast,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "fixCannotFindModule";
const fixIdInstallTypesPackage = "installTypesPackage";
diff --git a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
index d22e9b08678b7..8f77976267f1b 100644
--- a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
+++ b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
@@ -1,3 +1,11 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createImportAdder,
+ createMissingMemberNodes,
+ registerCodeFix,
+ TypeConstructionContext,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
cast,
@@ -15,15 +23,7 @@ import {
Symbol,
textChanges,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createImportAdder,
- createMissingMemberNodes,
- registerCodeFix,
- TypeConstructionContext,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const errorCodes = [
Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts
index 7c5e3652af32a..d5dacd51dc59d 100644
--- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts
+++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts
@@ -1,3 +1,12 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createImportAdder,
+ createMissingMemberNodes,
+ getNoopSymbolTrackerWithResolver,
+ registerCodeFix,
+ TypeConstructionContext,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
and,
@@ -27,16 +36,7 @@ import {
textChanges,
TypeChecker,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createImportAdder,
- createMissingMemberNodes,
- getNoopSymbolTrackerWithResolver,
- registerCodeFix,
- TypeConstructionContext,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const errorCodes = [
Diagnostics.Class_0_incorrectly_implements_interface_1.code,
diff --git a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts
index 66032b9f315ee..a3585ace24d79 100644
--- a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts
+++ b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
addToSeen,
CallExpression,
@@ -16,12 +21,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "classSuperMustPrecedeThisAccess";
const errorCodes = [Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class.code];
diff --git a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts
index 20e0cb3b35d9a..8f46f23073b9f 100644
--- a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts
+++ b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
ConstructorDeclaration,
Debug,
@@ -8,12 +13,7 @@ import {
isConstructorDeclaration,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "constructorForDerivedNeedSuperCall";
const errorCodes = [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code];
diff --git a/src/services/codefixes/fixEnableJsxFlag.ts b/src/services/codefixes/fixEnableJsxFlag.ts
index 6d00ac88e072b..de3f4b0bea557 100644
--- a/src/services/codefixes/fixEnableJsxFlag.ts
+++ b/src/services/codefixes/fixEnableJsxFlag.ts
@@ -1,15 +1,15 @@
-import {
- Diagnostics,
- factory,
- textChanges,
- TsConfigSourceFile,
-} from "../_namespaces/ts";
import {
codeFixAll,
createCodeFixActionWithoutFixAll,
registerCodeFix,
setJsonCompilerOptionValue,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.codefix.js";
+import {
+ Diagnostics,
+ factory,
+ textChanges,
+ TsConfigSourceFile,
+} from "../_namespaces/ts.js";
const fixID = "fixEnableJsxFlag";
const errorCodes = [Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided.code];
diff --git a/src/services/codefixes/fixExpectedComma.ts b/src/services/codefixes/fixExpectedComma.ts
index 352760d482a28..7882467591b7d 100644
--- a/src/services/codefixes/fixExpectedComma.ts
+++ b/src/services/codefixes/fixExpectedComma.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -8,12 +13,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixExpectedComma";
const expectedErrorCode = Diagnostics._0_expected.code;
diff --git a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts
index 65595a78b8b6a..0a92ba2013e64 100644
--- a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts
+++ b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -9,12 +14,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "extendsInterfaceBecomesImplements";
const errorCodes = [Diagnostics.Cannot_extend_an_interface_0_Did_you_mean_implements.code];
diff --git a/src/services/codefixes/fixForgottenThisPropertyAccess.ts b/src/services/codefixes/fixForgottenThisPropertyAccess.ts
index 1bd0de54296ee..0f1d197414cea 100644
--- a/src/services/codefixes/fixForgottenThisPropertyAccess.ts
+++ b/src/services/codefixes/fixForgottenThisPropertyAccess.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -10,12 +15,7 @@ import {
SourceFile,
suppressLeadingAndTrailingTrivia,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "forgottenThisPropertyAccess";
const didYouMeanStaticMemberCode = Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code;
diff --git a/src/services/codefixes/fixImplicitThis.ts b/src/services/codefixes/fixImplicitThis.ts
index 9a867574cac10..91be565e56570 100644
--- a/src/services/codefixes/fixImplicitThis.ts
+++ b/src/services/codefixes/fixImplicitThis.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
ANONYMOUS,
Debug,
@@ -17,12 +22,7 @@ import {
SyntaxKind,
textChanges,
TypeChecker,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixImplicitThis";
const errorCodes = [Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation.code];
diff --git a/src/services/codefixes/fixImportNonExportedMember.ts b/src/services/codefixes/fixImportNonExportedMember.ts
index 56208667bdb5e..449ef31faa931 100644
--- a/src/services/codefixes/fixImportNonExportedMember.ts
+++ b/src/services/codefixes/fixImportNonExportedMember.ts
@@ -1,3 +1,9 @@
+import {
+ createCodeFixAction,
+ createCombinedCodeActions,
+ eachDiagnostic,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
canHaveExportModifier,
canHaveLocals,
@@ -30,13 +36,7 @@ import {
textChanges,
tryCast,
VariableStatement,
-} from "../_namespaces/ts";
-import {
- createCodeFixAction,
- createCombinedCodeActions,
- eachDiagnostic,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixImportNonExportedMember";
const errorCodes = [
diff --git a/src/services/codefixes/fixIncorrectNamedTupleSyntax.ts b/src/services/codefixes/fixIncorrectNamedTupleSyntax.ts
index 4c831bac51529..7982f63b61ec5 100644
--- a/src/services/codefixes/fixIncorrectNamedTupleSyntax.ts
+++ b/src/services/codefixes/fixIncorrectNamedTupleSyntax.ts
@@ -1,3 +1,7 @@
+import {
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -10,11 +14,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixIncorrectNamedTupleSyntax";
const errorCodes = [
diff --git a/src/services/codefixes/fixInvalidImportSyntax.ts b/src/services/codefixes/fixInvalidImportSyntax.ts
index 6301bf0ba6e16..2f2663825062f 100644
--- a/src/services/codefixes/fixInvalidImportSyntax.ts
+++ b/src/services/codefixes/fixInvalidImportSyntax.ts
@@ -1,3 +1,7 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
addRange,
CallExpression,
@@ -24,11 +28,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "invalidImportSyntax";
diff --git a/src/services/codefixes/fixInvalidJsxCharacters.ts b/src/services/codefixes/fixInvalidJsxCharacters.ts
index 744354c7fb87b..803bc8137a2d4 100644
--- a/src/services/codefixes/fixInvalidJsxCharacters.ts
+++ b/src/services/codefixes/fixInvalidJsxCharacters.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
hasProperty,
@@ -5,12 +10,7 @@ import {
SourceFile,
textChanges,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixIdExpression = "fixInvalidJsxCharacters_expression";
const fixIdHtmlEntity = "fixInvalidJsxCharacters_htmlEntity";
diff --git a/src/services/codefixes/fixJSDocTypes.ts b/src/services/codefixes/fixJSDocTypes.ts
index 2a35ba3fdb3a9..7d3983db3d48d 100644
--- a/src/services/codefixes/fixJSDocTypes.ts
+++ b/src/services/codefixes/fixJSDocTypes.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
append,
AsExpression,
@@ -30,12 +35,7 @@ import {
TypeFlags,
TypeNode,
VariableDeclaration,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixIdPlain = "fixJSDocTypes_plain";
const fixIdNullable = "fixJSDocTypes_nullable";
diff --git a/src/services/codefixes/fixMissingCallParentheses.ts b/src/services/codefixes/fixMissingCallParentheses.ts
index 5a254bc1392dc..5bbe7a04a58e3 100644
--- a/src/services/codefixes/fixMissingCallParentheses.ts
+++ b/src/services/codefixes/fixMissingCallParentheses.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
getTokenAtPosition,
@@ -8,12 +13,7 @@ import {
PropertyAccessExpression,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixMissingCallParentheses";
const errorCodes = [
diff --git a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts
index 9abf1758b64d2..42e0d2141126c 100644
--- a/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts
+++ b/src/services/codefixes/fixMissingTypeAnnotationOnExports.ts
@@ -94,7 +94,7 @@ import {
VariableDeclaration,
VariableStatement,
walkUpParenthesizedExpressions,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
createCodeFixAction,
@@ -103,8 +103,8 @@ import {
eachDiagnostic,
registerCodeFix,
typeToAutoImportableTypeNode,
-} from "../_namespaces/ts.codefix";
-import { getIdentifierForNode } from "../refactors/helpers";
+} from "../_namespaces/ts.codefix.js";
+import { getIdentifierForNode } from "../refactors/helpers.js";
const fixId = "fixMissingTypeAnnotationOnExports";
diff --git a/src/services/codefixes/fixModuleAndTargetOptions.ts b/src/services/codefixes/fixModuleAndTargetOptions.ts
index 5ae7d53a89438..8f24304624a05 100644
--- a/src/services/codefixes/fixModuleAndTargetOptions.ts
+++ b/src/services/codefixes/fixModuleAndTargetOptions.ts
@@ -1,3 +1,9 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+ setJsonCompilerOptionValue,
+ setJsonCompilerOptionValues,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixAction,
Diagnostics,
@@ -9,13 +15,7 @@ import {
ModuleKind,
ScriptTarget,
textChanges,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
- setJsonCompilerOptionValue,
- setJsonCompilerOptionValues,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
registerCodeFix({
errorCodes: [
diff --git a/src/services/codefixes/fixNaNEquality.ts b/src/services/codefixes/fixNaNEquality.ts
index bd64d8b82a70a..3e617cc77f303 100644
--- a/src/services/codefixes/fixNaNEquality.ts
+++ b/src/services/codefixes/fixNaNEquality.ts
@@ -1,3 +1,9 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ findAncestorMatchingSpan,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
BinaryExpression,
createTextSpan,
@@ -14,13 +20,7 @@ import {
SyntaxKind,
textChanges,
TextSpan,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- findAncestorMatchingSpan,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixNaNEquality";
const errorCodes = [
diff --git a/src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts b/src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts
index 3ae9b9045e223..2c5f37e715686 100644
--- a/src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts
+++ b/src/services/codefixes/fixNoPropertyAccessFromIndexSignature.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Diagnostics,
@@ -11,12 +16,7 @@ import {
SourceFile,
textChanges,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixNoPropertyAccessFromIndexSignature";
const errorCodes = [
diff --git a/src/services/codefixes/fixOverrideModifier.ts b/src/services/codefixes/fixOverrideModifier.ts
index 2c3f8242a7ff5..360c7eda51c61 100644
--- a/src/services/codefixes/fixOverrideModifier.ts
+++ b/src/services/codefixes/fixOverrideModifier.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixActionMaybeFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixAllContext,
CodeFixContext,
@@ -31,12 +36,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixActionMaybeFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "fixOverrideModifier";
const fixAddOverrideId = "fixAddOverrideModifier";
diff --git a/src/services/codefixes/fixPropertyAssignment.ts b/src/services/codefixes/fixPropertyAssignment.ts
index d75fb8b365ac3..e24f3de7445c7 100644
--- a/src/services/codefixes/fixPropertyAssignment.ts
+++ b/src/services/codefixes/fixPropertyAssignment.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Diagnostics,
@@ -8,12 +13,7 @@ import {
ShorthandPropertyAssignment,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixPropertyAssignment";
const errorCodes = [
diff --git a/src/services/codefixes/fixPropertyOverrideAccessor.ts b/src/services/codefixes/fixPropertyOverrideAccessor.ts
index 4ee42dbbeee1e..c1b446bcf7d34 100644
--- a/src/services/codefixes/fixPropertyOverrideAccessor.ts
+++ b/src/services/codefixes/fixPropertyOverrideAccessor.ts
@@ -1,3 +1,10 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ generateAccessorFromProperty,
+ getAllSupers,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixAllContext,
CodeFixContext,
@@ -11,14 +18,7 @@ import {
singleOrUndefined,
SourceFile,
unescapeLeadingUnderscores,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- generateAccessorFromProperty,
- getAllSupers,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const errorCodes = [
Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property.code,
diff --git a/src/services/codefixes/fixReturnTypeInAsyncFunction.ts b/src/services/codefixes/fixReturnTypeInAsyncFunction.ts
index 8b33ec0c8cede..a6ada40a34175 100644
--- a/src/services/codefixes/fixReturnTypeInAsyncFunction.ts
+++ b/src/services/codefixes/fixReturnTypeInAsyncFunction.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -10,12 +15,7 @@ import {
Type,
TypeChecker,
TypeNode,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixReturnTypeInAsyncFunction";
const errorCodes = [
diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts
index 8c2130ab57c91..6283283bcbd4b 100644
--- a/src/services/codefixes/fixSpelling.ts
+++ b/src/services/codefixes/fixSpelling.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixContextBase,
Debug,
@@ -36,12 +41,7 @@ import {
symbolName,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixSpelling";
const errorCodes = [
diff --git a/src/services/codefixes/fixStrictClassInitialization.ts b/src/services/codefixes/fixStrictClassInitialization.ts
index d42e858964a1b..4ce6108cea74e 100644
--- a/src/services/codefixes/fixStrictClassInitialization.ts
+++ b/src/services/codefixes/fixStrictClassInitialization.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
append,
BigIntLiteralType,
@@ -27,12 +32,7 @@ import {
TypeChecker,
TypeFlags,
TypeNode,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "strictClassInitialization";
const fixIdAddDefiniteAssignmentAssertions = "addMissingPropertyDefiniteAssignmentAssertions";
diff --git a/src/services/codefixes/fixUnmatchedParameter.ts b/src/services/codefixes/fixUnmatchedParameter.ts
index bba50c32e589f..71a5c097deae0 100644
--- a/src/services/codefixes/fixUnmatchedParameter.ts
+++ b/src/services/codefixes/fixUnmatchedParameter.ts
@@ -1,3 +1,10 @@
+import {
+ createCodeFixAction,
+ createCodeFixActionWithoutFixAll,
+ createCombinedCodeActions,
+ eachDiagnostic,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
__String,
append,
@@ -21,14 +28,7 @@ import {
SignatureDeclaration,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- createCodeFixAction,
- createCodeFixActionWithoutFixAll,
- createCombinedCodeActions,
- eachDiagnostic,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const deleteUnmatchedParameter = "deleteUnmatchedParameter";
const renameUnmatchedParameter = "renameUnmatchedParameter";
diff --git a/src/services/codefixes/fixUnreachableCode.ts b/src/services/codefixes/fixUnreachableCode.ts
index 61c363c3fc868..948512305f27f 100644
--- a/src/services/codefixes/fixUnreachableCode.ts
+++ b/src/services/codefixes/fixUnreachableCode.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -13,12 +18,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixUnreachableCode";
const errorCodes = [Diagnostics.Unreachable_code_detected.code];
diff --git a/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts b/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts
index 4c35ee6b9629a..61c2a20949a4e 100644
--- a/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts
+++ b/src/services/codefixes/fixUnreferenceableDecoratorMetadata.ts
@@ -1,3 +1,7 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
append,
CodeFixAction,
@@ -23,11 +27,7 @@ import {
SyntaxKind,
textChanges,
tryCast,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixUnreferenceableDecoratorMetadata";
const errorCodes = [Diagnostics.A_type_referenced_in_a_decorated_signature_must_be_imported_with_import_type_or_a_namespace_import_when_isolatedModules_and_emitDecoratorMetadata_are_enabled.code];
diff --git a/src/services/codefixes/fixUnusedIdentifier.ts b/src/services/codefixes/fixUnusedIdentifier.ts
index 9e3677d3e23b6..1974e8067a45f 100644
--- a/src/services/codefixes/fixUnusedIdentifier.ts
+++ b/src/services/codefixes/fixUnusedIdentifier.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
ArrayBindingPattern,
CancellationToken,
@@ -59,12 +64,7 @@ import {
TypeChecker,
VariableDeclaration,
VariableDeclarationList,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixName = "unusedIdentifier";
const fixIdPrefix = "unusedIdentifier_prefix";
diff --git a/src/services/codefixes/fixUnusedLabel.ts b/src/services/codefixes/fixUnusedLabel.ts
index 88e6aed5d41a6..0466f9c8419b2 100644
--- a/src/services/codefixes/fixUnusedLabel.ts
+++ b/src/services/codefixes/fixUnusedLabel.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Diagnostics,
@@ -9,12 +14,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "fixUnusedLabel";
const errorCodes = [Diagnostics.Unused_label.code];
diff --git a/src/services/codefixes/generateAccessors.ts b/src/services/codefixes/generateAccessors.ts
index fe4af3faca1c1..75837f080749f 100644
--- a/src/services/codefixes/generateAccessors.ts
+++ b/src/services/codefixes/generateAccessors.ts
@@ -55,7 +55,7 @@ import {
textChanges,
TypeChecker,
TypeNode,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
/** @internal */
export type AcceptedDeclaration = ParameterPropertyDeclaration | PropertyDeclaration | PropertyAssignment;
diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts
index ee01e0f00a4b3..aa4e03c05fb42 100644
--- a/src/services/codefixes/helpers.ts
+++ b/src/services/codefixes/helpers.ts
@@ -1,3 +1,4 @@
+import { ImportAdder } from "../_namespaces/ts.codefix.js";
import {
AccessorDeclaration,
append,
@@ -110,8 +111,7 @@ import {
visitEachChild,
visitNode,
visitNodes,
-} from "../_namespaces/ts";
-import { ImportAdder } from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
/**
* Finds members of the resolved type that are missing in the class pointed to by class decl
diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts
index 0312c459d6c24..e528701942ce9 100644
--- a/src/services/codefixes/importFixes.ts
+++ b/src/services/codefixes/importFixes.ts
@@ -1,3 +1,9 @@
+import {
+ createCodeFixAction,
+ createCombinedCodeActions,
+ eachDiagnostic,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
AnyImportOrRequire,
AnyImportOrRequireStatement,
@@ -153,13 +159,7 @@ import {
TypeOnlyAliasDeclaration,
UserPreferences,
VariableDeclarationInitializedTo,
-} from "../_namespaces/ts";
-import {
- createCodeFixAction,
- createCombinedCodeActions,
- eachDiagnostic,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
/** @internal */
export const importFixName = "import";
diff --git a/src/services/codefixes/inferFromUsage.ts b/src/services/codefixes/inferFromUsage.ts
index 95a19e1d39638..620542686acab 100644
--- a/src/services/codefixes/inferFromUsage.ts
+++ b/src/services/codefixes/inferFromUsage.ts
@@ -1,3 +1,11 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ createImportAdder,
+ ImportAdder,
+ registerCodeFix,
+ tryGetAutoImportableReferenceFromTypeNode,
+} from "../_namespaces/ts.codefix.js";
import {
__String,
AnonymousType,
@@ -101,15 +109,7 @@ import {
UnionReduction,
UserPreferences,
VariableDeclaration,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- createImportAdder,
- ImportAdder,
- registerCodeFix,
- tryGetAutoImportableReferenceFromTypeNode,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "inferFromUsage";
const errorCodes = [
diff --git a/src/services/codefixes/removeAccidentalCallParentheses.ts b/src/services/codefixes/removeAccidentalCallParentheses.ts
index c4ad5c9ea3721..56f883cc54f6a 100644
--- a/src/services/codefixes/removeAccidentalCallParentheses.ts
+++ b/src/services/codefixes/removeAccidentalCallParentheses.ts
@@ -1,14 +1,14 @@
+import {
+ createCodeFixActionWithoutFixAll,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
findAncestor,
getTokenAtPosition,
isCallExpression,
textChanges,
-} from "../_namespaces/ts";
-import {
- createCodeFixActionWithoutFixAll,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "removeAccidentalCallParentheses";
const errorCodes = [
diff --git a/src/services/codefixes/removeUnnecessaryAwait.ts b/src/services/codefixes/removeUnnecessaryAwait.ts
index 45e6dcdef0dcd..1272ba512d38b 100644
--- a/src/services/codefixes/removeUnnecessaryAwait.ts
+++ b/src/services/codefixes/removeUnnecessaryAwait.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
AwaitKeyword,
Diagnostics,
@@ -13,12 +18,7 @@ import {
textChanges,
TextSpan,
tryCast,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "removeUnnecessaryAwait";
const errorCodes = [
diff --git a/src/services/codefixes/requireInTs.ts b/src/services/codefixes/requireInTs.ts
index 1c385d5ed0e19..f087722dbb047 100644
--- a/src/services/codefixes/requireInTs.ts
+++ b/src/services/codefixes/requireInTs.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
cast,
Debug,
@@ -21,12 +26,7 @@ import {
textChanges,
tryCast,
VariableStatement,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "requireInTs";
const errorCodes = [Diagnostics.require_call_may_be_converted_to_an_import.code];
diff --git a/src/services/codefixes/returnValueCorrect.ts b/src/services/codefixes/returnValueCorrect.ts
index 3aba6c183d29a..b021eb9f8105c 100644
--- a/src/services/codefixes/returnValueCorrect.ts
+++ b/src/services/codefixes/returnValueCorrect.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
append,
ArrowFunction,
@@ -39,12 +44,7 @@ import {
Type,
TypeChecker,
VariableLikeDeclaration,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "returnValueCorrect";
const fixIdAddReturnStatement = "fixAddReturnStatement";
diff --git a/src/services/codefixes/splitTypeOnlyImport.ts b/src/services/codefixes/splitTypeOnlyImport.ts
index 8ceba91300fbe..967d6fc837c10 100644
--- a/src/services/codefixes/splitTypeOnlyImport.ts
+++ b/src/services/codefixes/splitTypeOnlyImport.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
CodeFixContextBase,
Debug,
@@ -10,12 +15,7 @@ import {
SourceFile,
textChanges,
TextSpan,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const errorCodes = [Diagnostics.A_type_only_import_can_specify_a_default_import_or_named_bindings_but_not_both.code];
const fixId = "splitTypeOnlyImport";
diff --git a/src/services/codefixes/useBigintLiteral.ts b/src/services/codefixes/useBigintLiteral.ts
index 4492e176b5c57..33248f01b811b 100644
--- a/src/services/codefixes/useBigintLiteral.ts
+++ b/src/services/codefixes/useBigintLiteral.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Diagnostics,
factory,
@@ -7,12 +12,7 @@ import {
textChanges,
TextSpan,
tryCast,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "useBigintLiteral";
const errorCodes = [
diff --git a/src/services/codefixes/useDefaultImport.ts b/src/services/codefixes/useDefaultImport.ts
index 11d647517593a..a7efb9b98f33e 100644
--- a/src/services/codefixes/useDefaultImport.ts
+++ b/src/services/codefixes/useDefaultImport.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
AnyImportSyntax,
Diagnostics,
@@ -14,12 +19,7 @@ import {
SourceFile,
textChanges,
UserPreferences,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "useDefaultImport";
const errorCodes = [Diagnostics.Import_may_be_converted_to_a_default_import.code];
diff --git a/src/services/codefixes/wrapDecoratorInParentheses.ts b/src/services/codefixes/wrapDecoratorInParentheses.ts
index 10066eebda99f..74652e0794509 100644
--- a/src/services/codefixes/wrapDecoratorInParentheses.ts
+++ b/src/services/codefixes/wrapDecoratorInParentheses.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
Debug,
Diagnostics,
@@ -7,12 +12,7 @@ import {
isDecorator,
SourceFile,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixId = "wrapDecoratorInParentheses";
const errorCodes = [Diagnostics.Expression_must_be_enclosed_in_parentheses_to_be_used_as_a_decorator.code];
diff --git a/src/services/codefixes/wrapJsxInFragment.ts b/src/services/codefixes/wrapJsxInFragment.ts
index 11693d88a4c43..4c6c1470172e3 100644
--- a/src/services/codefixes/wrapJsxInFragment.ts
+++ b/src/services/codefixes/wrapJsxInFragment.ts
@@ -1,3 +1,8 @@
+import {
+ codeFixAll,
+ createCodeFixAction,
+ registerCodeFix,
+} from "../_namespaces/ts.codefix.js";
import {
BinaryExpression,
Diagnostics,
@@ -11,12 +16,7 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
-import {
- codeFixAll,
- createCodeFixAction,
- registerCodeFix,
-} from "../_namespaces/ts.codefix";
+} from "../_namespaces/ts.js";
const fixID = "wrapJsxInFragment";
const errorCodes = [Diagnostics.JSX_expressions_must_have_one_parent_element.code];
diff --git a/src/services/completions.ts b/src/services/completions.ts
index 386e53f2d8e19..d09e81736433f 100644
--- a/src/services/completions.ts
+++ b/src/services/completions.ts
@@ -1,3 +1,4 @@
+import { StringCompletions } from "./_namespaces/ts.Completions.js";
import {
__String,
addToSeen,
@@ -389,8 +390,7 @@ import {
UserPreferences,
VariableDeclaration,
walkUpParenthesizedExpressions,
-} from "./_namespaces/ts";
-import { StringCompletions } from "./_namespaces/ts.Completions";
+} from "./_namespaces/ts.js";
// Exported only for tests
/** @internal */
diff --git a/src/services/documentHighlights.ts b/src/services/documentHighlights.ts
index 37faabf7b5328..0cb7654459ca4 100644
--- a/src/services/documentHighlights.ts
+++ b/src/services/documentHighlights.ts
@@ -81,7 +81,7 @@ import {
toPath,
tryCast,
TryStatement,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface DocumentHighlights {
fileName: string;
diff --git a/src/services/documentRegistry.ts b/src/services/documentRegistry.ts
index fc42cacce7d5b..5c9aefd0a0a05 100644
--- a/src/services/documentRegistry.ts
+++ b/src/services/documentRegistry.ts
@@ -28,7 +28,7 @@ import {
toPath,
tracing,
updateLanguageServiceSourceFile,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* The document registry represents a store of SourceFile objects that can be shared between
diff --git a/src/services/exportInfoMap.ts b/src/services/exportInfoMap.ts
index f7c6521448d3a..e75303efcc819 100644
--- a/src/services/exportInfoMap.ts
+++ b/src/services/exportInfoMap.ts
@@ -61,7 +61,7 @@ import {
unescapeLeadingUnderscores,
unmangleScopedPackageName,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export const enum ImportKind {
diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts
index 9276c30ad8dba..225ad4551ab9e 100644
--- a/src/services/findAllReferences.ts
+++ b/src/services/findAllReferences.ts
@@ -1,3 +1,15 @@
+import {
+ createImportTracker,
+ ExportInfo,
+ ExportKind,
+ findModuleReferences,
+ getExportInfo,
+ getImportOrExportSymbol,
+ ImportExport,
+ ImportsResult,
+ ImportTracker,
+ ModuleReference,
+} from "./_namespaces/ts.FindAllReferences.js";
import {
__String,
addToSeen,
@@ -253,19 +265,7 @@ import {
TypeChecker,
TypeLiteralNode,
VariableDeclaration,
-} from "./_namespaces/ts";
-import {
- createImportTracker,
- ExportInfo,
- ExportKind,
- findModuleReferences,
- getExportInfo,
- getImportOrExportSymbol,
- ImportExport,
- ImportsResult,
- ImportTracker,
- ModuleReference,
-} from "./_namespaces/ts.FindAllReferences";
+} from "./_namespaces/ts.js";
/** @internal */
export interface SymbolAndEntries {
diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts
index 881a26c5e4e8a..2dc19c021e302 100644
--- a/src/services/formatting/formatting.ts
+++ b/src/services/formatting/formatting.ts
@@ -1,3 +1,14 @@
+import {
+ FormattingContext,
+ FormattingRequestKind,
+ FormattingScanner,
+ getFormattingScanner,
+ Rule,
+ RuleAction,
+ RuleFlags,
+ RulesMap,
+ SmartIndenter,
+} from "../_namespaces/ts.formatting.js";
import {
Block,
CallExpression,
@@ -65,18 +76,7 @@ import {
TextRange,
TriviaSyntaxKind,
TypeReferenceNode,
-} from "../_namespaces/ts";
-import {
- FormattingContext,
- FormattingRequestKind,
- FormattingScanner,
- getFormattingScanner,
- Rule,
- RuleAction,
- RuleFlags,
- RulesMap,
- SmartIndenter,
-} from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.js";
/** @internal */
export interface FormatContext {
diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts
index be23fe764396b..f41b7ee0ca283 100644
--- a/src/services/formatting/formattingContext.ts
+++ b/src/services/formatting/formattingContext.ts
@@ -1,3 +1,4 @@
+import { TextRangeWithKind } from "../_namespaces/ts.formatting.js";
import {
Debug,
findChildOfKind,
@@ -5,8 +6,7 @@ import {
Node,
SourceFileLike,
SyntaxKind,
-} from "../_namespaces/ts";
-import { TextRangeWithKind } from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.js";
/** @internal */
export const enum FormattingRequestKind {
diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts
index 78890ad3a29b3..8a3baa2d13896 100644
--- a/src/services/formatting/formattingScanner.ts
+++ b/src/services/formatting/formattingScanner.ts
@@ -1,3 +1,9 @@
+import {
+ createTextRangeWithKind,
+ TextRangeWithKind,
+ TextRangeWithTriviaKind,
+ TokenInfo,
+} from "../_namespaces/ts.formatting.js";
import {
append,
createScanner,
@@ -14,13 +20,7 @@ import {
NodeArray,
ScriptTarget,
SyntaxKind,
-} from "../_namespaces/ts";
-import {
- createTextRangeWithKind,
- TextRangeWithKind,
- TextRangeWithTriviaKind,
- TokenInfo,
-} from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.js";
const standardScanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false, LanguageVariant.Standard);
const jsxScanner = createScanner(ScriptTarget.Latest, /*skipTrivia*/ false, LanguageVariant.JSX);
diff --git a/src/services/formatting/rule.ts b/src/services/formatting/rule.ts
index ba4293102644e..4e10219d8e335 100644
--- a/src/services/formatting/rule.ts
+++ b/src/services/formatting/rule.ts
@@ -1,8 +1,8 @@
+import { FormattingContext } from "../_namespaces/ts.formatting.js";
import {
emptyArray,
SyntaxKind,
-} from "../_namespaces/ts";
-import { FormattingContext } from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.js";
/** @internal */
export interface Rule {
diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts
index 39a94b032fd66..806dc6003f510 100644
--- a/src/services/formatting/rules.ts
+++ b/src/services/formatting/rules.ts
@@ -1,3 +1,14 @@
+import {
+ anyContext,
+ ContextPredicate,
+ FormattingContext,
+ FormattingRequestKind,
+ Rule,
+ RuleAction,
+ RuleFlags,
+ TextRangeWithKind,
+ TokenRange,
+} from "../_namespaces/ts.formatting.js";
import {
BinaryExpression,
contains,
@@ -20,18 +31,7 @@ import {
SyntaxKind,
typeKeywords,
YieldExpression,
-} from "../_namespaces/ts";
-import {
- anyContext,
- ContextPredicate,
- FormattingContext,
- FormattingRequestKind,
- Rule,
- RuleAction,
- RuleFlags,
- TextRangeWithKind,
- TokenRange,
-} from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.js";
/** @internal */
export interface RuleSpec {
diff --git a/src/services/formatting/rulesMap.ts b/src/services/formatting/rulesMap.ts
index 15ee6fa629043..d3145b2728d64 100644
--- a/src/services/formatting/rulesMap.ts
+++ b/src/services/formatting/rulesMap.ts
@@ -1,10 +1,3 @@
-import {
- Debug,
- every,
- FormatCodeSettings,
- FormattingHost,
- SyntaxKind,
-} from "../_namespaces/ts";
import {
anyContext,
FormatContext,
@@ -13,7 +6,14 @@ import {
Rule,
RuleAction,
RuleSpec,
-} from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.formatting.js";
+import {
+ Debug,
+ every,
+ FormatCodeSettings,
+ FormattingHost,
+ SyntaxKind,
+} from "../_namespaces/ts.js";
/** @internal */
export function getFormatContext(options: FormatCodeSettings, host: FormattingHost): FormatContext {
diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts
index ca0936f3f7851..c2141602f1108 100644
--- a/src/services/formatting/smartIndenter.ts
+++ b/src/services/formatting/smartIndenter.ts
@@ -1,3 +1,7 @@
+import {
+ getRangeOfEnclosingComment,
+ TextRangeWithKind,
+} from "../_namespaces/ts.formatting.js";
import {
ArrayBindingPattern,
ArrayLiteralExpression,
@@ -52,11 +56,7 @@ import {
TypeLiteralNode,
TypeReferenceNode,
VariableDeclarationList,
-} from "../_namespaces/ts";
-import {
- getRangeOfEnclosingComment,
- TextRangeWithKind,
-} from "../_namespaces/ts.formatting";
+} from "../_namespaces/ts.js";
/** @internal */
export namespace SmartIndenter {
diff --git a/src/services/getEditsForFileRename.ts b/src/services/getEditsForFileRename.ts
index 860202a0bb285..d5fb1f8aadd6d 100644
--- a/src/services/getEditsForFileRename.ts
+++ b/src/services/getEditsForFileRename.ts
@@ -48,7 +48,7 @@ import {
TextRange,
tryRemoveDirectoryPrefix,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function getEditsForFileRename(
diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts
index 8fbfbe145e6ef..dad7271f8e39b 100644
--- a/src/services/goToDefinition.ts
+++ b/src/services/goToDefinition.ts
@@ -1,3 +1,4 @@
+import { isContextWithStartAndEndNode } from "./_namespaces/ts.FindAllReferences.js";
import {
AssignmentDeclarationKind,
AssignmentExpression,
@@ -105,8 +106,7 @@ import {
TypeFlags,
TypeReference,
unescapeLeadingUnderscores,
-} from "./_namespaces/ts";
-import { isContextWithStartAndEndNode } from "./_namespaces/ts.FindAllReferences";
+} from "./_namespaces/ts.js";
/** @internal */
export function getDefinitionAtPosition(program: Program, sourceFile: SourceFile, position: number, searchOtherFilesOnly?: boolean, stopAtAlias?: boolean): readonly DefinitionInfo[] | undefined {
diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts
index 516df4dbdb5b4..181c1e5faa4a9 100644
--- a/src/services/importTracker.ts
+++ b/src/services/importTracker.ts
@@ -83,7 +83,7 @@ import {
ValidImportTypeNode,
VariableDeclaration,
walkUpBindingElementsAndPatterns,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/* Code for finding imports of an exported symbol. Used only by FindAllReferences. */
diff --git a/src/services/inlayHints.ts b/src/services/inlayHints.ts
index ed084912c6863..ce779052a053a 100644
--- a/src/services/inlayHints.ts
+++ b/src/services/inlayHints.ts
@@ -123,7 +123,7 @@ import {
UserPreferences,
usingSingleLineStringWriter,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const leadingParameterNameCommentRegexFactory = (name: string) => {
return new RegExp(`^\\s?/\\*\\*?\\s?${name}\\s?\\*\\/\\s?$`);
diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts
index a08937cfd7e99..94664ce5d4332 100644
--- a/src/services/jsDoc.ts
+++ b/src/services/jsDoc.ts
@@ -92,7 +92,7 @@ import {
TypeChecker,
typeParameterNamePart,
VariableStatement,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const jsDocTagNames = [
"abstract",
diff --git a/src/services/navigateTo.ts b/src/services/navigateTo.ts
index 5beb279698d2e..cb75e1478113f 100644
--- a/src/services/navigateTo.ts
+++ b/src/services/navigateTo.ts
@@ -27,7 +27,7 @@ import {
SourceFile,
SyntaxKind,
TypeChecker,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
interface RawNavigateToItem {
readonly name: string;
diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts
index 167ca62982e94..fc2a316361c06 100644
--- a/src/services/navigationBar.ts
+++ b/src/services/navigationBar.ts
@@ -111,7 +111,7 @@ import {
TypeElement,
unescapeLeadingUnderscores,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Matches all whitespace characters in a string. Eg:
diff --git a/src/services/organizeImports.ts b/src/services/organizeImports.ts
index 14a794c526af5..facc06742ded7 100644
--- a/src/services/organizeImports.ts
+++ b/src/services/organizeImports.ts
@@ -63,7 +63,7 @@ import {
TransformFlags,
tryCast,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Organize imports by:
diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts
index 740b246eb066f..19d1438c6ea3f 100644
--- a/src/services/outliningElementsCollector.ts
+++ b/src/services/outliningElementsCollector.ts
@@ -53,7 +53,7 @@ import {
TemplateExpression,
TextSpan,
TryStatement,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function collectElements(sourceFile: SourceFile, cancellationToken: CancellationToken): OutliningSpan[] {
diff --git a/src/services/patternMatcher.ts b/src/services/patternMatcher.ts
index e3394439757b2..f146e8d32b4ae 100644
--- a/src/services/patternMatcher.ts
+++ b/src/services/patternMatcher.ts
@@ -10,7 +10,7 @@ import {
ScriptTarget,
startsWith,
TextSpan,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
// Note(cyrusn): this enum is ordered from strongest match type to weakest match type.
/** @internal */
diff --git a/src/services/preProcess.ts b/src/services/preProcess.ts
index 2d98a63586c55..5ae905fb506ba 100644
--- a/src/services/preProcess.ts
+++ b/src/services/preProcess.ts
@@ -11,7 +11,7 @@ import {
scanner,
ScriptTarget,
SyntaxKind,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export function preProcessFile(sourceText: string, readImportFiles = true, detectJavaScriptImports = false): PreProcessedFileInfo {
const pragmaContext: PragmaContext = {
diff --git a/src/services/refactorProvider.ts b/src/services/refactorProvider.ts
index 368bd8810962e..1b21149070931 100644
--- a/src/services/refactorProvider.ts
+++ b/src/services/refactorProvider.ts
@@ -6,8 +6,8 @@ import {
Refactor,
RefactorContext,
RefactorEditInfo,
-} from "./_namespaces/ts";
-import { refactorKindBeginsWith } from "./_namespaces/ts.refactor";
+} from "./_namespaces/ts.js";
+import { refactorKindBeginsWith } from "./_namespaces/ts.refactor.js";
// A map with the refactor code as key, the refactor itself as value
// e.g. nonSuggestableRefactors[refactorCode] -> the refactor you want
diff --git a/src/services/refactors/addOrRemoveBracesToArrowFunction.ts b/src/services/refactors/addOrRemoveBracesToArrowFunction.ts
index 6cd5bb9f05ddd..4392c19211061 100644
--- a/src/services/refactors/addOrRemoveBracesToArrowFunction.ts
+++ b/src/services/refactors/addOrRemoveBracesToArrowFunction.ts
@@ -28,13 +28,13 @@ import {
SourceFile,
SyntaxKind,
textChanges,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
RefactorErrorInfo,
refactorKindBeginsWith,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Add or remove braces in an arrow function";
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Add_or_remove_braces_in_an_arrow_function);
diff --git a/src/services/refactors/convertArrowFunctionOrFunctionExpression.ts b/src/services/refactors/convertArrowFunctionOrFunctionExpression.ts
index 05d13bdc8fd91..ef0576e59f8bb 100644
--- a/src/services/refactors/convertArrowFunctionOrFunctionExpression.ts
+++ b/src/services/refactors/convertArrowFunctionOrFunctionExpression.ts
@@ -52,11 +52,11 @@ import {
VariableDeclaration,
VariableDeclarationList,
VariableStatement,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
refactorKindBeginsWith,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Convert arrow function or function expression";
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_arrow_function_or_function_expression);
diff --git a/src/services/refactors/convertExport.ts b/src/services/refactors/convertExport.ts
index 7f477fc1a86ac..5e722c083a9a0 100644
--- a/src/services/refactors/convertExport.ts
+++ b/src/services/refactors/convertExport.ts
@@ -50,12 +50,12 @@ import {
TypeAliasDeclaration,
TypeChecker,
VariableStatement,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
RefactorErrorInfo,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Convert export";
diff --git a/src/services/refactors/convertImport.ts b/src/services/refactors/convertImport.ts
index 4dbfd40d89185..5614efbca075f 100644
--- a/src/services/refactors/convertImport.ts
+++ b/src/services/refactors/convertImport.ts
@@ -45,12 +45,12 @@ import {
SyntaxKind,
textChanges,
TypeChecker,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
RefactorErrorInfo,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Convert import";
diff --git a/src/services/refactors/convertOverloadListToSingleSignature.ts b/src/services/refactors/convertOverloadListToSingleSignature.ts
index 915b59077f8c3..c9fd31f1b4e70 100644
--- a/src/services/refactors/convertOverloadListToSingleSignature.ts
+++ b/src/services/refactors/convertOverloadListToSingleSignature.ts
@@ -39,8 +39,8 @@ import {
SyntaxKind,
textChanges,
TupleTypeNode,
-} from "../_namespaces/ts";
-import { registerRefactor } from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.js";
+import { registerRefactor } from "../_namespaces/ts.refactor.js";
const refactorName = "Convert overload list to single signature";
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature);
diff --git a/src/services/refactors/convertParamsToDestructuredObject.ts b/src/services/refactors/convertParamsToDestructuredObject.ts
index 164c725f7a932..9c1792b9b8cbe 100644
--- a/src/services/refactors/convertParamsToDestructuredObject.ts
+++ b/src/services/refactors/convertParamsToDestructuredObject.ts
@@ -103,8 +103,8 @@ import {
TypeLiteralNode,
TypeNode,
VariableDeclaration,
-} from "../_namespaces/ts";
-import { registerRefactor } from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.js";
+import { registerRefactor } from "../_namespaces/ts.refactor.js";
const refactorName = "Convert parameters to destructured object";
const minimumParameterLength = 1;
diff --git a/src/services/refactors/convertStringOrTemplateLiteral.ts b/src/services/refactors/convertStringOrTemplateLiteral.ts
index cd8fe2ad5032b..c6eb8494fe3ad 100644
--- a/src/services/refactors/convertStringOrTemplateLiteral.ts
+++ b/src/services/refactors/convertStringOrTemplateLiteral.ts
@@ -36,8 +36,8 @@ import {
TemplateTail,
textChanges,
Token,
-} from "../_namespaces/ts";
-import { registerRefactor } from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.js";
+import { registerRefactor } from "../_namespaces/ts.refactor.js";
const refactorName = "Convert to template string";
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string);
diff --git a/src/services/refactors/convertToOptionalChainExpression.ts b/src/services/refactors/convertToOptionalChainExpression.ts
index ebacc0935a5c2..333e200f6a0b4 100644
--- a/src/services/refactors/convertToOptionalChainExpression.ts
+++ b/src/services/refactors/convertToOptionalChainExpression.ts
@@ -40,12 +40,12 @@ import {
TextSpan,
TypeChecker,
VariableStatement,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
RefactorErrorInfo,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Convert to optional chain expression";
const convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression);
diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts
index 9e04d91d10d8e..d5ebc4e3c040d 100644
--- a/src/services/refactors/extractSymbol.ts
+++ b/src/services/refactors/extractSymbol.ts
@@ -157,12 +157,12 @@ import {
visitNode,
visitNodes,
VisitResult,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
getIdentifierForNode,
refactorKindBeginsWith,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Extract Symbol";
diff --git a/src/services/refactors/extractType.ts b/src/services/refactors/extractType.ts
index fe1e8e3ddb2fa..b6f4c97b55a5d 100644
--- a/src/services/refactors/extractType.ts
+++ b/src/services/refactors/extractType.ts
@@ -67,12 +67,12 @@ import {
TypeElement,
TypeNode,
TypeParameterDeclaration,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
RefactorErrorInfo,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Extract type";
diff --git a/src/services/refactors/generateGetAccessorAndSetAccessor.ts b/src/services/refactors/generateGetAccessorAndSetAccessor.ts
index 2756ae20471ed..7e0820c3e2224 100644
--- a/src/services/refactors/generateGetAccessorAndSetAccessor.ts
+++ b/src/services/refactors/generateGetAccessorAndSetAccessor.ts
@@ -9,11 +9,11 @@ import {
isIdentifier,
isParameter,
RefactorContext,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const actionName = "Generate 'get' and 'set' accessors";
const actionDescription = getLocaleSpecificMessage(Diagnostics.Generate_get_and_set_accessors);
diff --git a/src/services/refactors/helpers.ts b/src/services/refactors/helpers.ts
index e72eea44693a6..459979c3ef0dc 100644
--- a/src/services/refactors/helpers.ts
+++ b/src/services/refactors/helpers.ts
@@ -18,8 +18,8 @@ import {
Symbol,
SymbolFlags,
TypeChecker,
-} from "../_namespaces/ts";
-import { addImportsForMovedSymbols } from "./moveToFile";
+} from "../_namespaces/ts.js";
+import { addImportsForMovedSymbols } from "./moveToFile.js";
/**
* Returned by refactor functions when some error message needs to be surfaced to users.
*
diff --git a/src/services/refactors/inferFunctionReturnType.ts b/src/services/refactors/inferFunctionReturnType.ts
index dc3a9adbd0d7f..3bf9bdb1afaf9 100644
--- a/src/services/refactors/inferFunctionReturnType.ts
+++ b/src/services/refactors/inferFunctionReturnType.ts
@@ -26,13 +26,13 @@ import {
Type,
TypeChecker,
TypeNode,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
isRefactorErrorInfo,
RefactorErrorInfo,
refactorKindBeginsWith,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Infer function return type";
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Infer_function_return_type);
diff --git a/src/services/refactors/inlineVariable.ts b/src/services/refactors/inlineVariable.ts
index bdd5af771e761..0bcf841ce39e2 100644
--- a/src/services/refactors/inlineVariable.ts
+++ b/src/services/refactors/inlineVariable.ts
@@ -38,11 +38,11 @@ import {
textRangeContainsPositionInclusive,
TypeChecker,
VariableDeclaration,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
RefactorErrorInfo,
registerRefactor,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Inline variable";
const refactorDescription = getLocaleSpecificMessage(Diagnostics.Inline_variable);
diff --git a/src/services/refactors/moveToFile.ts b/src/services/refactors/moveToFile.ts
index dea0ebc4c43e1..38e6b137bad1f 100644
--- a/src/services/refactors/moveToFile.ts
+++ b/src/services/refactors/moveToFile.ts
@@ -1,4 +1,4 @@
-import { getModuleSpecifier } from "../../compiler/_namespaces/ts.moduleSpecifiers";
+import { getModuleSpecifier } from "../../compiler/_namespaces/ts.moduleSpecifiers.js";
import {
ApplicableRefactorInfo,
arrayFrom,
@@ -153,9 +153,9 @@ import {
VariableDeclaration,
VariableDeclarationList,
VariableStatement,
-} from "../_namespaces/ts";
-import { addTargetFileImports } from "../_namespaces/ts.refactor";
-import { registerRefactor } from "../refactorProvider";
+} from "../_namespaces/ts.js";
+import { addTargetFileImports } from "../_namespaces/ts.refactor.js";
+import { registerRefactor } from "../refactorProvider.js";
const refactorNameForMoveToFile = "Move to file";
const description = getLocaleSpecificMessage(Diagnostics.Move_to_file);
diff --git a/src/services/refactors/moveToNewFile.ts b/src/services/refactors/moveToNewFile.ts
index 2665239e10483..fcd31f8267ba7 100644
--- a/src/services/refactors/moveToNewFile.ts
+++ b/src/services/refactors/moveToNewFile.ts
@@ -17,7 +17,7 @@ import {
SourceFile,
textChanges,
UserPreferences,
-} from "../_namespaces/ts";
+} from "../_namespaces/ts.js";
import {
addNewFileToTsconfig,
createNewFileName,
@@ -26,7 +26,7 @@ import {
getUsageInfo,
registerRefactor,
ToMove,
-} from "../_namespaces/ts.refactor";
+} from "../_namespaces/ts.refactor.js";
const refactorName = "Move to a new file";
const description = getLocaleSpecificMessage(Diagnostics.Move_to_a_new_file);
diff --git a/src/services/rename.ts b/src/services/rename.ts
index 1260fef23d5cc..64f817dcd03e5 100644
--- a/src/services/rename.ts
+++ b/src/services/rename.ts
@@ -51,7 +51,7 @@ import {
TypeFlags,
UnionType,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function getRenameInfo(program: Program, sourceFile: SourceFile, position: number, preferences: UserPreferences): RenameInfo {
diff --git a/src/services/services.ts b/src/services/services.ts
index 3431d51623ba3..7e508b1f38d63 100644
--- a/src/services/services.ts
+++ b/src/services/services.ts
@@ -326,16 +326,16 @@ import {
updateSourceFile,
UserPreferences,
VariableDeclaration,
-} from "./_namespaces/ts";
-import * as NavigateTo from "./_namespaces/ts.NavigateTo";
-import * as NavigationBar from "./_namespaces/ts.NavigationBar";
+} from "./_namespaces/ts.js";
+import * as NavigateTo from "./_namespaces/ts.NavigateTo.js";
+import * as NavigationBar from "./_namespaces/ts.NavigationBar.js";
import {
containsJsx,
createNewFileName,
getStatementsToMove,
-} from "./_namespaces/ts.refactor";
-import * as classifier from "./classifier";
-import * as classifier2020 from "./classifier2020";
+} from "./_namespaces/ts.refactor.js";
+import * as classifier from "./classifier.js";
+import * as classifier2020 from "./classifier2020.js";
/** The version of the language service API */
export const servicesVersion = "0.8";
diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts
index 28f0d188854bb..ab1fdcbee22b2 100644
--- a/src/services/signatureHelp.ts
+++ b/src/services/signatureHelp.ts
@@ -91,7 +91,7 @@ import {
Type,
TypeChecker,
TypeParameter,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const enum InvocationKind {
Call,
diff --git a/src/services/smartSelection.ts b/src/services/smartSelection.ts
index d726d177e682a..f58862d76ab68 100644
--- a/src/services/smartSelection.ts
+++ b/src/services/smartSelection.ts
@@ -46,7 +46,7 @@ import {
SyntaxList,
textSpanIntersectsWithPosition,
textSpansEqual,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/** @internal */
export function getSmartSelectionRange(pos: number, sourceFile: SourceFile): SelectionRange {
diff --git a/src/services/sourcemaps.ts b/src/services/sourcemaps.ts
index 0a58a2cda4705..954616d3f0317 100644
--- a/src/services/sourcemaps.ts
+++ b/src/services/sourcemaps.ts
@@ -25,7 +25,7 @@ import {
toPath as ts_toPath,
tryGetSourceMappingURL,
tryParseRawSourceMap,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const base64UrlRegExp = /^data:(?:application\/json(?:;charset=[uU][tT][fF]-8);base64,([A-Za-z0-9+/=]+)$)?/;
diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts
index b1db1fc467bdd..06f488ed47bcb 100644
--- a/src/services/stringCompletions.ts
+++ b/src/services/stringCompletions.ts
@@ -1,4 +1,13 @@
-import { getModuleSpecifierPreferences } from "../compiler/moduleSpecifiers";
+import { getModuleSpecifierPreferences } from "../compiler/moduleSpecifiers.js";
+import {
+ CompletionKind,
+ createCompletionDetails,
+ createCompletionDetailsForSymbol,
+ getCompletionEntriesFromSymbols,
+ getPropertiesForObjectExpression,
+ Log,
+ SortText,
+} from "./_namespaces/ts.Completions.js";
import {
addToSeen,
altDirectorySeparator,
@@ -148,16 +157,7 @@ import {
UserPreferences,
walkUpParenthesizedExpressions,
walkUpParenthesizedTypes,
-} from "./_namespaces/ts";
-import {
- CompletionKind,
- createCompletionDetails,
- createCompletionDetailsForSymbol,
- getCompletionEntriesFromSymbols,
- getPropertiesForObjectExpression,
- Log,
- SortText,
-} from "./_namespaces/ts.Completions";
+} from "./_namespaces/ts.js";
interface NameAndKindSet {
add(value: NameAndKind): void;
diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts
index 91e99ba9450db..ddf51f1b53c1c 100644
--- a/src/services/suggestionDiagnostics.ts
+++ b/src/services/suggestionDiagnostics.ts
@@ -57,7 +57,7 @@ import {
SyntaxKind,
TypeChecker,
VariableStatement,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const visitedNestedConvertibleFunctions = new Map();
diff --git a/src/services/symbolDisplay.ts b/src/services/symbolDisplay.ts
index 0524d150972bc..5a36b6b28fb37 100644
--- a/src/services/symbolDisplay.ts
+++ b/src/services/symbolDisplay.ts
@@ -108,7 +108,7 @@ import {
TypeParameter,
typeToDisplayParts,
VariableDeclaration,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
const symbolDisplayNodeBuilderFlags = NodeBuilderFlags.OmitParameterModifiers | NodeBuilderFlags.IgnoreErrors | NodeBuilderFlags.UseAliasDefinedOutsideCurrentScope;
diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts
index 5887fba6ae2e6..1fa19379afc4c 100644
--- a/src/services/textChanges.ts
+++ b/src/services/textChanges.ts
@@ -174,7 +174,7 @@ import {
visitEachChild,
visitNodes,
Visitor,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Currently for simplicity we store recovered positions on the node itself.
diff --git a/src/services/transform.ts b/src/services/transform.ts
index 85fae890c0984..a8d03f62a19fb 100644
--- a/src/services/transform.ts
+++ b/src/services/transform.ts
@@ -9,7 +9,7 @@ import {
TransformationResult,
TransformerFactory,
transformNodes,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
/**
* Transform one or more nodes using the supplied transformers.
diff --git a/src/services/transpile.ts b/src/services/transpile.ts
index b9179bcd2a198..12bfb3482c70d 100644
--- a/src/services/transpile.ts
+++ b/src/services/transpile.ts
@@ -28,7 +28,7 @@ import {
ScriptTarget,
toPath,
transpileOptionValueCompilerOptions,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
export interface TranspileOptions {
compilerOptions?: CompilerOptions;
diff --git a/src/services/types.ts b/src/services/types.ts
index 3adcf0c39e65f..5a4b80afb6cdd 100644
--- a/src/services/types.ts
+++ b/src/services/types.ts
@@ -41,9 +41,9 @@ import {
TextRange,
TextSpan,
UserPreferences,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface Node {
getSourceFile(): SourceFile;
@@ -73,21 +73,21 @@ declare module "../compiler/types" {
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface Identifier {
readonly text: string;
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface PrivateIdentifier {
readonly text: string;
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface Symbol {
readonly name: string;
@@ -104,7 +104,7 @@ declare module "../compiler/types" {
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface Type {
getFlags(): TypeFlags;
@@ -136,14 +136,14 @@ declare module "../compiler/types" {
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface TypeReference {
typeArguments?: readonly Type[];
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface Signature {
getDeclaration(): SignatureDeclaration;
@@ -156,7 +156,7 @@ declare module "../compiler/types" {
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface SourceFile {
/** @internal */ version: string;
@@ -175,14 +175,14 @@ declare module "../compiler/types" {
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface SourceFileLike {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
}
}
-declare module "../compiler/types" {
+declare module "../compiler/types.js" {
// Module transform: converted from interface augmentation
export interface SourceMapSource {
getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
diff --git a/src/services/utilities.ts b/src/services/utilities.ts
index fe0de5d35e1cc..a5f068eef754c 100644
--- a/src/services/utilities.ts
+++ b/src/services/utilities.ts
@@ -384,7 +384,7 @@ import {
VoidExpression,
walkUpParenthesizedExpressions,
YieldExpression,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
// These utilities are common to multiple language service features.
// #region
diff --git a/src/testRunner/_namespaces/FourSlash.ts b/src/testRunner/_namespaces/FourSlash.ts
index b81535c48ffd8..39911defc1d7a 100644
--- a/src/testRunner/_namespaces/FourSlash.ts
+++ b/src/testRunner/_namespaces/FourSlash.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the FourSlash namespace. */
-export * from "../../harness/_namespaces/FourSlash";
+export * from "../../harness/_namespaces/FourSlash.js";
diff --git a/src/testRunner/_namespaces/Harness.Parallel.Host.ts b/src/testRunner/_namespaces/Harness.Parallel.Host.ts
index 8104cc9ecfdf6..d8ebbf319731a 100644
--- a/src/testRunner/_namespaces/Harness.Parallel.Host.ts
+++ b/src/testRunner/_namespaces/Harness.Parallel.Host.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the Harness.Parallel.Host namespace. */
-export * from "../parallel/host";
+export * from "../parallel/host.js";
diff --git a/src/testRunner/_namespaces/Harness.Parallel.Worker.ts b/src/testRunner/_namespaces/Harness.Parallel.Worker.ts
index ecca4b9659e6e..de2a725adb08f 100644
--- a/src/testRunner/_namespaces/Harness.Parallel.Worker.ts
+++ b/src/testRunner/_namespaces/Harness.Parallel.Worker.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the Harness.Parallel.Worker namespace. */
-export * from "../parallel/worker";
+export * from "../parallel/worker.js";
diff --git a/src/testRunner/_namespaces/Harness.Parallel.ts b/src/testRunner/_namespaces/Harness.Parallel.ts
index 10087db7557c3..8f2b792e406d1 100644
--- a/src/testRunner/_namespaces/Harness.Parallel.ts
+++ b/src/testRunner/_namespaces/Harness.Parallel.ts
@@ -1,7 +1,7 @@
/* Generated file to emulate the Harness.Parallel namespace. */
-export * from "../parallel/shared";
-import * as Host from "./Harness.Parallel.Host";
+export * from "../parallel/shared.js";
+import * as Host from "./Harness.Parallel.Host.js";
export { Host };
-import * as Worker from "./Harness.Parallel.Worker";
+import * as Worker from "./Harness.Parallel.Worker.js";
export { Worker };
diff --git a/src/testRunner/_namespaces/Harness.ts b/src/testRunner/_namespaces/Harness.ts
index 7577c667a8050..8648f7ddf675c 100644
--- a/src/testRunner/_namespaces/Harness.ts
+++ b/src/testRunner/_namespaces/Harness.ts
@@ -1,17 +1,17 @@
/* Generated file to emulate the Harness namespace. */
-export * from "../../harness/_namespaces/Harness";
+export * from "../../harness/_namespaces/Harness.js";
-import * as Parallel from "./Harness.Parallel";
+import * as Parallel from "./Harness.Parallel.js";
export { Parallel };
-export * from "../fourslashRunner";
-export * from "../compilerRunner";
-export * from "../transpileRunner";
-export * from "../runner";
+export * from "../fourslashRunner.js";
+export * from "../compilerRunner.js";
+export * from "../transpileRunner.js";
+export * from "../runner.js";
// If running as emitted CJS, don't start executing the tests here; instead start in runner.ts.
// If running bundled, we want this to be here so that esbuild places the tests after runner.ts.
if (!__filename.endsWith("Harness.js")) {
- require("../tests");
+ require("../tests.js");
}
diff --git a/src/testRunner/_namespaces/Utils.ts b/src/testRunner/_namespaces/Utils.ts
index f7bd754263d74..f513c8cfc9ed2 100644
--- a/src/testRunner/_namespaces/Utils.ts
+++ b/src/testRunner/_namespaces/Utils.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the Utils namespace. */
-export * from "../../harness/_namespaces/Utils";
+export * from "../../harness/_namespaces/Utils.js";
diff --git a/src/testRunner/_namespaces/compiler.ts b/src/testRunner/_namespaces/compiler.ts
index 62e194d59712a..fefbd43af363d 100644
--- a/src/testRunner/_namespaces/compiler.ts
+++ b/src/testRunner/_namespaces/compiler.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the compiler namespace. */
-export * from "../../harness/_namespaces/compiler";
+export * from "../../harness/_namespaces/compiler.js";
diff --git a/src/testRunner/_namespaces/documents.ts b/src/testRunner/_namespaces/documents.ts
index bf76b1332fc47..853d1defc3c0a 100644
--- a/src/testRunner/_namespaces/documents.ts
+++ b/src/testRunner/_namespaces/documents.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the documents namespace. */
-export * from "../../harness/_namespaces/documents";
+export * from "../../harness/_namespaces/documents.js";
diff --git a/src/testRunner/_namespaces/evaluator.ts b/src/testRunner/_namespaces/evaluator.ts
index 9710863c9b2ec..83ec0908821a7 100644
--- a/src/testRunner/_namespaces/evaluator.ts
+++ b/src/testRunner/_namespaces/evaluator.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the evaluator namespace. */
-export * from "../../harness/_namespaces/evaluator";
+export * from "../../harness/_namespaces/evaluator.js";
diff --git a/src/testRunner/_namespaces/fakes.ts b/src/testRunner/_namespaces/fakes.ts
index 1b6c51d409411..c7290912b6ce1 100644
--- a/src/testRunner/_namespaces/fakes.ts
+++ b/src/testRunner/_namespaces/fakes.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the fakes namespace. */
-export * from "../../harness/_namespaces/fakes";
+export * from "../../harness/_namespaces/fakes.js";
diff --git a/src/testRunner/_namespaces/project.ts b/src/testRunner/_namespaces/project.ts
index c9d999adbfff1..fe75d6e294718 100644
--- a/src/testRunner/_namespaces/project.ts
+++ b/src/testRunner/_namespaces/project.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the project namespace. */
-export * from "../projectsRunner";
+export * from "../projectsRunner.js";
diff --git a/src/testRunner/_namespaces/ts.server.ts b/src/testRunner/_namespaces/ts.server.ts
index b0a090fcfed08..5fa9fe89382e6 100644
--- a/src/testRunner/_namespaces/ts.server.ts
+++ b/src/testRunner/_namespaces/ts.server.ts
@@ -1,6 +1,6 @@
/* Generated file to emulate the ts.server namespace. */
-export * from "../../jsTyping/_namespaces/ts.server";
-export * from "../../server/_namespaces/ts.server";
-export * from "../../typingsInstallerCore/_namespaces/ts.server";
-export * from "../../harness/_namespaces/ts.server";
+export * from "../../jsTyping/_namespaces/ts.server.js";
+export * from "../../server/_namespaces/ts.server.js";
+export * from "../../typingsInstallerCore/_namespaces/ts.server.js";
+export * from "../../harness/_namespaces/ts.server.js";
diff --git a/src/testRunner/_namespaces/ts.ts b/src/testRunner/_namespaces/ts.ts
index 27efc73b10f55..11b145abe4621 100644
--- a/src/testRunner/_namespaces/ts.ts
+++ b/src/testRunner/_namespaces/ts.ts
@@ -1,11 +1,11 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-export * from "../../services/_namespaces/ts";
-export * from "../../jsTyping/_namespaces/ts";
-export * from "../../server/_namespaces/ts";
-export * from "../../typingsInstallerCore/_namespaces/ts";
-export * from "../../deprecatedCompat/_namespaces/ts";
-export * from "../../harness/_namespaces/ts";
-import * as server from "./ts.server";
+export * from "../../compiler/_namespaces/ts.js";
+export * from "../../services/_namespaces/ts.js";
+export * from "../../jsTyping/_namespaces/ts.js";
+export * from "../../server/_namespaces/ts.js";
+export * from "../../typingsInstallerCore/_namespaces/ts.js";
+export * from "../../deprecatedCompat/_namespaces/ts.js";
+export * from "../../harness/_namespaces/ts.js";
+import * as server from "./ts.server.js";
export { server };
diff --git a/src/testRunner/_namespaces/vfs.ts b/src/testRunner/_namespaces/vfs.ts
index 5fe2e7d9362b5..eeb46064fb93f 100644
--- a/src/testRunner/_namespaces/vfs.ts
+++ b/src/testRunner/_namespaces/vfs.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the vfs namespace. */
-export * from "../../harness/_namespaces/vfs";
+export * from "../../harness/_namespaces/vfs.js";
diff --git a/src/testRunner/_namespaces/vpath.ts b/src/testRunner/_namespaces/vpath.ts
index 9ae8ad3777f57..1c8261db73c3c 100644
--- a/src/testRunner/_namespaces/vpath.ts
+++ b/src/testRunner/_namespaces/vpath.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the vpath namespace. */
-export * from "../../harness/_namespaces/vpath";
+export * from "../../harness/_namespaces/vpath.js";
diff --git a/src/testRunner/compilerRunner.ts b/src/testRunner/compilerRunner.ts
index 3d82d232ccc05..93bc55c1159fe 100644
--- a/src/testRunner/compilerRunner.ts
+++ b/src/testRunner/compilerRunner.ts
@@ -9,11 +9,11 @@ import {
RunnerBase,
TestCaseParser,
TestRunnerKind,
-} from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as Utils from "./_namespaces/Utils";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
+} from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as Utils from "./_namespaces/Utils.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
export const enum CompilerTestType {
Conformance,
diff --git a/src/testRunner/fourslashRunner.ts b/src/testRunner/fourslashRunner.ts
index 6fd61eb0e3b08..e1a0535963ca3 100644
--- a/src/testRunner/fourslashRunner.ts
+++ b/src/testRunner/fourslashRunner.ts
@@ -1,10 +1,10 @@
-import * as FourSlash from "./_namespaces/FourSlash";
+import * as FourSlash from "./_namespaces/FourSlash.js";
import {
IO,
RunnerBase,
TestRunnerKind,
-} from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
+} from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
export class FourSlashRunner extends RunnerBase {
protected basePath: string;
diff --git a/src/testRunner/parallel/host.ts b/src/testRunner/parallel/host.ts
index 346982ae5fe1b..d1ff118ba0482 100644
--- a/src/testRunner/parallel/host.ts
+++ b/src/testRunner/parallel/host.ts
@@ -12,7 +12,7 @@ import {
TestConfig,
TestRunnerKind,
workerCount,
-} from "../_namespaces/Harness";
+} from "../_namespaces/Harness.js";
import {
ErrorInfo,
ParallelClientMessage,
@@ -21,9 +21,9 @@ import {
Task,
TaskTimeout,
TestInfo,
-} from "../_namespaces/Harness.Parallel";
-import * as ts from "../_namespaces/ts";
-import * as Utils from "../_namespaces/Utils";
+} from "../_namespaces/Harness.Parallel.js";
+import * as ts from "../_namespaces/ts.js";
+import * as Utils from "../_namespaces/Utils.js";
export function start() {
const Mocha = require("mocha") as typeof import("mocha");
diff --git a/src/testRunner/parallel/shared.ts b/src/testRunner/parallel/shared.ts
index 755d353be1f9f..53d310eefcf15 100644
--- a/src/testRunner/parallel/shared.ts
+++ b/src/testRunner/parallel/shared.ts
@@ -1,5 +1,5 @@
-import { TestRunnerKind } from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
+import { TestRunnerKind } from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
export interface RunnerTask {
runner: TestRunnerKind;
diff --git a/src/testRunner/parallel/worker.ts b/src/testRunner/parallel/worker.ts
index 3637721240732..ee0f699eea865 100644
--- a/src/testRunner/parallel/worker.ts
+++ b/src/testRunner/parallel/worker.ts
@@ -3,7 +3,7 @@ import {
globalTimeout,
RunnerBase,
runUnitTests,
-} from "../_namespaces/Harness";
+} from "../_namespaces/Harness.js";
import {
ErrorInfo,
ParallelClientMessage,
@@ -14,7 +14,7 @@ import {
TaskResult,
TestInfo,
UnitTestTask,
-} from "../_namespaces/Harness.Parallel";
+} from "../_namespaces/Harness.Parallel.js";
export function start() {
function hookUncaughtExceptions() {
diff --git a/src/testRunner/projectsRunner.ts b/src/testRunner/projectsRunner.ts
index 56394ed3ce28a..fa5d15a11a13e 100644
--- a/src/testRunner/projectsRunner.ts
+++ b/src/testRunner/projectsRunner.ts
@@ -1,10 +1,10 @@
-import * as documents from "./_namespaces/documents";
-import * as fakes from "./_namespaces/fakes";
-import * as Harness from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as Utils from "./_namespaces/Utils";
-import * as vfs from "./_namespaces/vfs";
-import * as vpath from "./_namespaces/vpath";
+import * as documents from "./_namespaces/documents.js";
+import * as fakes from "./_namespaces/fakes.js";
+import * as Harness from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as Utils from "./_namespaces/Utils.js";
+import * as vfs from "./_namespaces/vfs.js";
+import * as vpath from "./_namespaces/vpath.js";
// Test case is json of below type in tests/cases/project/
interface ProjectRunnerTestCase {
diff --git a/src/testRunner/runner.ts b/src/testRunner/runner.ts
index e5ac52c131025..819a9026ba03a 100644
--- a/src/testRunner/runner.ts
+++ b/src/testRunner/runner.ts
@@ -1,4 +1,4 @@
-import * as FourSlash from "./_namespaces/FourSlash";
+import * as FourSlash from "./_namespaces/FourSlash.js";
import {
CompilerBaselineRunner,
CompilerTestType,
@@ -12,10 +12,10 @@ import {
setShards,
TestRunnerKind,
TranspileRunner,
-} from "./_namespaces/Harness";
-import * as project from "./_namespaces/project";
-import * as ts from "./_namespaces/ts";
-import * as vpath from "./_namespaces/vpath";
+} from "./_namespaces/Harness.js";
+import * as project from "./_namespaces/project.js";
+import * as ts from "./_namespaces/ts.js";
+import * as vpath from "./_namespaces/vpath.js";
/* eslint-disable prefer-const */
export let runners: RunnerBase[] = [];
@@ -271,5 +271,5 @@ startTestEnvironment();
// If running as emitted CJS, we want to start the tests here after startTestEnvironment.
// If running bundled, we will do this in Harness.ts.
if (__filename.endsWith("runner.js")) {
- require("./tests");
+ require("./tests.js");
}
diff --git a/src/testRunner/tests.ts b/src/testRunner/tests.ts
index 75a0ca1d32c70..f01233dc12f67 100644
--- a/src/testRunner/tests.ts
+++ b/src/testRunner/tests.ts
@@ -1,221 +1,221 @@
-import "./unittests/asserts";
-import "./unittests/base64";
-import "./unittests/builder";
-import "./unittests/canWatch";
-import "./unittests/comments";
-import "./unittests/compilerCore";
-import "./unittests/convertToBase64";
-import "./unittests/customTransforms";
-import "./unittests/diagnosticCollection";
-import "./unittests/factory";
-import "./unittests/incrementalParser";
-import "./unittests/jsDocParsing";
-import "./unittests/jsonParserRecovery";
-import "./unittests/moduleResolution";
-import "./unittests/parsePseudoBigInt";
-import "./unittests/paths";
-import "./unittests/printer";
-import "./unittests/programApi";
-import "./unittests/publicApi";
-import "./unittests/reuseProgramStructure";
-import "./unittests/semver";
-import "./unittests/transform";
-import "./unittests/typeParameterIsPossiblyReferenced";
-import "./unittests/config/commandLineParsing";
-import "./unittests/config/configurationExtension";
-import "./unittests/config/convertCompilerOptionsFromJson";
-import "./unittests/config/convertTypeAcquisitionFromJson";
-import "./unittests/config/initializeTSConfig";
-import "./unittests/config/matchFiles";
-import "./unittests/config/showConfig";
-import "./unittests/config/tsconfigParsing";
-import "./unittests/config/tsconfigParsingWatchOptions";
-import "./unittests/evaluation/arraySpread";
-import "./unittests/evaluation/asyncArrow";
-import "./unittests/evaluation/asyncGenerator";
-import "./unittests/evaluation/autoAccessors";
-import "./unittests/evaluation/awaiter";
-import "./unittests/evaluation/constEnum";
-import "./unittests/evaluation/destructuring";
-import "./unittests/evaluation/externalModules";
-import "./unittests/evaluation/esDecorators";
-import "./unittests/evaluation/esDecoratorsMetadata";
-import "./unittests/evaluation/forAwaitOf";
-import "./unittests/evaluation/forOf";
-import "./unittests/evaluation/generator";
-import "./unittests/evaluation/optionalCall";
-import "./unittests/evaluation/objectRest";
-import "./unittests/evaluation/superInStaticInitializer";
-import "./unittests/evaluation/templateLiteral";
-import "./unittests/evaluation/updateExpressionInModule";
-import "./unittests/evaluation/usingDeclarations";
-import "./unittests/evaluation/awaitUsingDeclarations";
-import "./unittests/services/cancellableLanguageServiceOperations";
-import "./unittests/services/colorization";
-import "./unittests/services/convertToAsyncFunction";
-import "./unittests/services/documentRegistry";
-import "./unittests/services/extract/constants";
-import "./unittests/services/extract/functions";
-import "./unittests/services/extract/symbolWalker";
-import "./unittests/services/extract/ranges";
-import "./unittests/services/hostNewLineSupport";
-import "./unittests/services/languageService";
-import "./unittests/services/organizeImports";
-import "./unittests/services/patternMatcher";
-import "./unittests/services/preProcessFile";
-import "./unittests/services/textChanges";
-import "./unittests/services/transpile";
-import "./unittests/services/utilities";
-import "./unittests/sys/symlinkWatching";
-import "./unittests/tsbuild/amdModulesWithOut";
-import "./unittests/tsbuild/clean";
-import "./unittests/tsbuild/commandLine";
-import "./unittests/tsbuild/configFileErrors";
-import "./unittests/tsbuild/configFileExtends";
-import "./unittests/tsbuild/containerOnlyReferenced";
-import "./unittests/tsbuild/declarationEmit";
-import "./unittests/tsbuild/demo";
-import "./unittests/tsbuild/emitDeclarationOnly";
-import "./unittests/tsbuild/emptyFiles";
-import "./unittests/tsbuild/exitCodeOnBogusFile";
-import "./unittests/tsbuild/extends";
-import "./unittests/tsbuild/fileDelete";
-import "./unittests/tsbuild/graphOrdering";
-import "./unittests/tsbuild/inferredTypeFromTransitiveModule";
-import "./unittests/tsbuild/javascriptProjectEmit";
-import "./unittests/tsbuild/lateBoundSymbol";
-import "./unittests/tsbuild/libraryResolution";
-import "./unittests/tsbuild/moduleResolution";
-import "./unittests/tsbuild/moduleSpecifiers";
-import "./unittests/tsbuild/noCheck";
-import "./unittests/tsbuild/noEmit";
-import "./unittests/tsbuild/noEmitOnError";
-import "./unittests/tsbuild/outFile";
-import "./unittests/tsbuild/outputPaths";
-import "./unittests/tsbuild/publicApi";
-import "./unittests/tsbuild/referencesWithRootDirInParent";
-import "./unittests/tsbuild/resolveJsonModule";
-import "./unittests/tsbuild/roots";
-import "./unittests/tsbuild/sample";
-import "./unittests/tsbuild/transitiveReferences";
-import "./unittests/tsbuildWatch/configFileErrors";
-import "./unittests/tsbuildWatch/demo";
-import "./unittests/tsbuildWatch/extends";
-import "./unittests/tsbuildWatch/libraryResolution";
-import "./unittests/tsbuildWatch/moduleResolution";
-import "./unittests/tsbuildWatch/noEmit";
-import "./unittests/tsbuildWatch/noEmitOnError";
-import "./unittests/tsbuildWatch/programUpdates";
-import "./unittests/tsbuildWatch/projectsBuilding";
-import "./unittests/tsbuildWatch/publicApi";
-import "./unittests/tsbuildWatch/reexport";
-import "./unittests/tsbuildWatch/watchEnvironment";
-import "./unittests/tsc/cancellationToken";
-import "./unittests/tsc/composite";
-import "./unittests/tsc/declarationEmit";
-import "./unittests/tsc/extends";
-import "./unittests/tsc/forceConsistentCasingInFileNames";
-import "./unittests/tsc/incremental";
-import "./unittests/tsc/libraryResolution";
-import "./unittests/tsc/listFilesOnly";
-import "./unittests/tsc/moduleResolution";
-import "./unittests/tsc/projectReferences";
-import "./unittests/tsc/projectReferencesConfig";
-import "./unittests/tsc/redirect";
-import "./unittests/tsc/runWithoutArgs";
-import "./unittests/tscWatch/consoleClearing";
-import "./unittests/tscWatch/emit";
-import "./unittests/tscWatch/nodeNextWatch";
-import "./unittests/tscWatch/emitAndErrorUpdates";
-import "./unittests/tscWatch/extends";
-import "./unittests/tscWatch/forceConsistentCasingInFileNames";
-import "./unittests/tscWatch/incremental";
-import "./unittests/tscWatch/libraryResolution";
-import "./unittests/tscWatch/moduleResolution";
-import "./unittests/tscWatch/programUpdates";
-import "./unittests/tscWatch/projectsWithReferences";
-import "./unittests/tscWatch/resolutionCache";
-import "./unittests/tscWatch/resolveJsonModuleWithIncremental";
-import "./unittests/tscWatch/sourceOfProjectReferenceRedirect";
-import "./unittests/tscWatch/symlinks";
-import "./unittests/tscWatch/watchApi";
-import "./unittests/tscWatch/watchEnvironment";
-import "./unittests/tsserver/applyChangesToOpenFiles";
-import "./unittests/tsserver/autoImportProvider";
-import "./unittests/tsserver/auxiliaryProject";
-import "./unittests/tsserver/cachingFileSystemInformation";
-import "./unittests/tsserver/cancellationToken";
-import "./unittests/tsserver/codeFix";
-import "./unittests/tsserver/compileOnSave";
-import "./unittests/tsserver/completions";
-import "./unittests/tsserver/completionsIncomplete";
-import "./unittests/tsserver/configFileSearch";
-import "./unittests/tsserver/configuredProjects";
-import "./unittests/tsserver/declarationFileMaps";
-import "./unittests/tsserver/documentRegistry";
-import "./unittests/tsserver/duplicatePackages";
-import "./unittests/tsserver/dynamicFiles";
-import "./unittests/tsserver/events/largeFileReferenced";
-import "./unittests/tsserver/events/projectLanguageServiceState";
-import "./unittests/tsserver/events/projectLoading";
-import "./unittests/tsserver/events/projectUpdatedInBackground";
-import "./unittests/tsserver/events/watchEvents";
-import "./unittests/tsserver/exportMapCache";
-import "./unittests/tsserver/extends";
-import "./unittests/tsserver/externalProjects";
-import "./unittests/tsserver/findAllReferences";
-import "./unittests/tsserver/forceConsistentCasingInFileNames";
-import "./unittests/tsserver/formatSettings";
-import "./unittests/tsserver/getApplicableRefactors";
-import "./unittests/tsserver/getEditsForFileRename";
-import "./unittests/tsserver/getExportReferences";
-import "./unittests/tsserver/getFileReferences";
-import "./unittests/tsserver/goToDefinition";
-import "./unittests/tsserver/importHelpers";
-import "./unittests/tsserver/inlayHints";
-import "./unittests/tsserver/inferredProjects";
-import "./unittests/tsserver/jsdocTag";
-import "./unittests/tsserver/languageService";
-import "./unittests/tsserver/libraryResolution";
-import "./unittests/tsserver/maxNodeModuleJsDepth";
-import "./unittests/tsserver/metadataInResponse";
-import "./unittests/tsserver/moduleResolution";
-import "./unittests/tsserver/moduleSpecifierCache";
-import "./unittests/tsserver/navTo";
-import "./unittests/tsserver/occurences";
-import "./unittests/tsserver/openFile";
-import "./unittests/tsserver/packageJsonInfo";
-import "./unittests/tsserver/partialSemanticServer";
-import "./unittests/tsserver/plugins";
-import "./unittests/tsserver/pluginsAsync";
-import "./unittests/tsserver/projectErrors";
-import "./unittests/tsserver/projectReferenceCompileOnSave";
-import "./unittests/tsserver/projectReferenceErrors";
-import "./unittests/tsserver/projectReferences";
-import "./unittests/tsserver/projectReferencesSourcemap";
-import "./unittests/tsserver/projects";
-import "./unittests/tsserver/projectsWithReferences";
-import "./unittests/tsserver/refactors";
-import "./unittests/tsserver/reload";
-import "./unittests/tsserver/reloadProjects";
-import "./unittests/tsserver/rename";
-import "./unittests/tsserver/resolutionCache";
-import "./unittests/tsserver/session";
-import "./unittests/tsserver/skipLibCheck";
-import "./unittests/tsserver/smartSelection";
-import "./unittests/tsserver/symlinkCache";
-import "./unittests/tsserver/symLinks";
-import "./unittests/tsserver/syntacticServer";
-import "./unittests/tsserver/syntaxOperations";
-import "./unittests/tsserver/textStorage";
-import "./unittests/tsserver/telemetry";
-import "./unittests/tsserver/typeAquisition";
-import "./unittests/tsserver/typeOnlyImportChains";
-import "./unittests/tsserver/typeReferenceDirectives";
-import "./unittests/tsserver/typingsInstaller";
-import "./unittests/tsserver/versionCache";
-import "./unittests/tsserver/watchEnvironment";
-import "./unittests/debugDeprecation";
-import "./unittests/tsserver/inconsistentErrorInEditor";
-import "./unittests/tsserver/getMoveToRefactoringFileSuggestions";
-import "./unittests/skipJSDocParsing";
+export * from "./unittests/asserts.js";
+export * from "./unittests/base64.js";
+export * from "./unittests/builder.js";
+export * from "./unittests/canWatch.js";
+export * from "./unittests/comments.js";
+export * from "./unittests/compilerCore.js";
+export * from "./unittests/config/commandLineParsing.js";
+export * from "./unittests/config/configurationExtension.js";
+export * from "./unittests/config/convertCompilerOptionsFromJson.js";
+export * from "./unittests/config/convertTypeAcquisitionFromJson.js";
+export * from "./unittests/config/initializeTSConfig.js";
+export * from "./unittests/config/matchFiles.js";
+export * from "./unittests/config/showConfig.js";
+export * from "./unittests/config/tsconfigParsing.js";
+export * from "./unittests/config/tsconfigParsingWatchOptions.js";
+export * from "./unittests/convertToBase64.js";
+export * from "./unittests/customTransforms.js";
+export * from "./unittests/debugDeprecation.js";
+export * from "./unittests/diagnosticCollection.js";
+export * from "./unittests/evaluation/arraySpread.js";
+export * from "./unittests/evaluation/asyncArrow.js";
+export * from "./unittests/evaluation/asyncGenerator.js";
+export * from "./unittests/evaluation/autoAccessors.js";
+export * from "./unittests/evaluation/awaiter.js";
+export * from "./unittests/evaluation/awaitUsingDeclarations.js";
+export * from "./unittests/evaluation/constEnum.js";
+export * from "./unittests/evaluation/destructuring.js";
+export * from "./unittests/evaluation/esDecorators.js";
+export * from "./unittests/evaluation/esDecoratorsMetadata.js";
+export * from "./unittests/evaluation/externalModules.js";
+export * from "./unittests/evaluation/forAwaitOf.js";
+export * from "./unittests/evaluation/forOf.js";
+export * from "./unittests/evaluation/generator.js";
+export * from "./unittests/evaluation/objectRest.js";
+export * from "./unittests/evaluation/optionalCall.js";
+export * from "./unittests/evaluation/superInStaticInitializer.js";
+export * from "./unittests/evaluation/templateLiteral.js";
+export * from "./unittests/evaluation/updateExpressionInModule.js";
+export * from "./unittests/evaluation/usingDeclarations.js";
+export * from "./unittests/factory.js";
+export * from "./unittests/incrementalParser.js";
+export * from "./unittests/jsDocParsing.js";
+export * from "./unittests/jsonParserRecovery.js";
+export * from "./unittests/moduleResolution.js";
+export * from "./unittests/parsePseudoBigInt.js";
+export * from "./unittests/paths.js";
+export * from "./unittests/printer.js";
+export * from "./unittests/programApi.js";
+export * from "./unittests/publicApi.js";
+export * from "./unittests/reuseProgramStructure.js";
+export * from "./unittests/semver.js";
+export * from "./unittests/services/cancellableLanguageServiceOperations.js";
+export * from "./unittests/services/colorization.js";
+export * from "./unittests/services/convertToAsyncFunction.js";
+export * from "./unittests/services/documentRegistry.js";
+export * from "./unittests/services/extract/constants.js";
+export * from "./unittests/services/extract/functions.js";
+export * from "./unittests/services/extract/ranges.js";
+export * from "./unittests/services/extract/symbolWalker.js";
+export * from "./unittests/services/hostNewLineSupport.js";
+export * from "./unittests/services/languageService.js";
+export * from "./unittests/services/organizeImports.js";
+export * from "./unittests/services/patternMatcher.js";
+export * from "./unittests/services/preProcessFile.js";
+export * from "./unittests/services/textChanges.js";
+export * from "./unittests/services/transpile.js";
+export * from "./unittests/services/utilities.js";
+export * from "./unittests/skipJSDocParsing.js";
+export * from "./unittests/sys/symlinkWatching.js";
+export * from "./unittests/transform.js";
+export * from "./unittests/tsbuild/amdModulesWithOut.js";
+export * from "./unittests/tsbuild/clean.js";
+export * from "./unittests/tsbuild/commandLine.js";
+export * from "./unittests/tsbuild/configFileErrors.js";
+export * from "./unittests/tsbuild/configFileExtends.js";
+export * from "./unittests/tsbuild/containerOnlyReferenced.js";
+export * from "./unittests/tsbuild/declarationEmit.js";
+export * from "./unittests/tsbuild/demo.js";
+export * from "./unittests/tsbuild/emitDeclarationOnly.js";
+export * from "./unittests/tsbuild/emptyFiles.js";
+export * from "./unittests/tsbuild/exitCodeOnBogusFile.js";
+export * from "./unittests/tsbuild/extends.js";
+export * from "./unittests/tsbuild/fileDelete.js";
+export * from "./unittests/tsbuild/graphOrdering.js";
+export * from "./unittests/tsbuild/inferredTypeFromTransitiveModule.js";
+export * from "./unittests/tsbuild/javascriptProjectEmit.js";
+export * from "./unittests/tsbuild/lateBoundSymbol.js";
+export * from "./unittests/tsbuild/libraryResolution.js";
+export * from "./unittests/tsbuild/moduleResolution.js";
+export * from "./unittests/tsbuild/moduleSpecifiers.js";
+export * from "./unittests/tsbuild/noCheck.js";
+export * from "./unittests/tsbuild/noEmit.js";
+export * from "./unittests/tsbuild/noEmitOnError.js";
+export * from "./unittests/tsbuild/outFile.js";
+export * from "./unittests/tsbuild/outputPaths.js";
+export * from "./unittests/tsbuild/publicApi.js";
+export * from "./unittests/tsbuild/referencesWithRootDirInParent.js";
+export * from "./unittests/tsbuild/resolveJsonModule.js";
+export * from "./unittests/tsbuild/roots.js";
+export * from "./unittests/tsbuild/sample.js";
+export * from "./unittests/tsbuild/transitiveReferences.js";
+export * from "./unittests/tsbuildWatch/configFileErrors.js";
+export * from "./unittests/tsbuildWatch/demo.js";
+export * from "./unittests/tsbuildWatch/extends.js";
+export * from "./unittests/tsbuildWatch/libraryResolution.js";
+export * from "./unittests/tsbuildWatch/moduleResolution.js";
+export * from "./unittests/tsbuildWatch/noEmit.js";
+export * from "./unittests/tsbuildWatch/noEmitOnError.js";
+export * from "./unittests/tsbuildWatch/programUpdates.js";
+export * from "./unittests/tsbuildWatch/projectsBuilding.js";
+export * from "./unittests/tsbuildWatch/publicApi.js";
+export * from "./unittests/tsbuildWatch/reexport.js";
+export * from "./unittests/tsbuildWatch/watchEnvironment.js";
+export * from "./unittests/tsc/cancellationToken.js";
+export * from "./unittests/tsc/composite.js";
+export * from "./unittests/tsc/declarationEmit.js";
+export * from "./unittests/tsc/extends.js";
+export * from "./unittests/tsc/forceConsistentCasingInFileNames.js";
+export * from "./unittests/tsc/incremental.js";
+export * from "./unittests/tsc/libraryResolution.js";
+export * from "./unittests/tsc/listFilesOnly.js";
+export * from "./unittests/tsc/moduleResolution.js";
+export * from "./unittests/tsc/projectReferences.js";
+export * from "./unittests/tsc/projectReferencesConfig.js";
+export * from "./unittests/tsc/redirect.js";
+export * from "./unittests/tsc/runWithoutArgs.js";
+export * from "./unittests/tscWatch/consoleClearing.js";
+export * from "./unittests/tscWatch/emit.js";
+export * from "./unittests/tscWatch/emitAndErrorUpdates.js";
+export * from "./unittests/tscWatch/extends.js";
+export * from "./unittests/tscWatch/forceConsistentCasingInFileNames.js";
+export * from "./unittests/tscWatch/incremental.js";
+export * from "./unittests/tscWatch/libraryResolution.js";
+export * from "./unittests/tscWatch/moduleResolution.js";
+export * from "./unittests/tscWatch/nodeNextWatch.js";
+export * from "./unittests/tscWatch/programUpdates.js";
+export * from "./unittests/tscWatch/projectsWithReferences.js";
+export * from "./unittests/tscWatch/resolutionCache.js";
+export * from "./unittests/tscWatch/resolveJsonModuleWithIncremental.js";
+export * from "./unittests/tscWatch/sourceOfProjectReferenceRedirect.js";
+export * from "./unittests/tscWatch/symlinks.js";
+export * from "./unittests/tscWatch/watchApi.js";
+export * from "./unittests/tscWatch/watchEnvironment.js";
+export * from "./unittests/tsserver/applyChangesToOpenFiles.js";
+export * from "./unittests/tsserver/autoImportProvider.js";
+export * from "./unittests/tsserver/auxiliaryProject.js";
+export * from "./unittests/tsserver/cachingFileSystemInformation.js";
+export * from "./unittests/tsserver/cancellationToken.js";
+export * from "./unittests/tsserver/codeFix.js";
+export * from "./unittests/tsserver/compileOnSave.js";
+export * from "./unittests/tsserver/completions.js";
+export * from "./unittests/tsserver/completionsIncomplete.js";
+export * from "./unittests/tsserver/configFileSearch.js";
+export * from "./unittests/tsserver/configuredProjects.js";
+export * from "./unittests/tsserver/declarationFileMaps.js";
+export * from "./unittests/tsserver/documentRegistry.js";
+export * from "./unittests/tsserver/duplicatePackages.js";
+export * from "./unittests/tsserver/dynamicFiles.js";
+export * from "./unittests/tsserver/events/largeFileReferenced.js";
+export * from "./unittests/tsserver/events/projectLanguageServiceState.js";
+export * from "./unittests/tsserver/events/projectLoading.js";
+export * from "./unittests/tsserver/events/projectUpdatedInBackground.js";
+export * from "./unittests/tsserver/events/watchEvents.js";
+export * from "./unittests/tsserver/exportMapCache.js";
+export * from "./unittests/tsserver/extends.js";
+export * from "./unittests/tsserver/externalProjects.js";
+export * from "./unittests/tsserver/findAllReferences.js";
+export * from "./unittests/tsserver/forceConsistentCasingInFileNames.js";
+export * from "./unittests/tsserver/formatSettings.js";
+export * from "./unittests/tsserver/getApplicableRefactors.js";
+export * from "./unittests/tsserver/getEditsForFileRename.js";
+export * from "./unittests/tsserver/getExportReferences.js";
+export * from "./unittests/tsserver/getFileReferences.js";
+export * from "./unittests/tsserver/getMoveToRefactoringFileSuggestions.js";
+export * from "./unittests/tsserver/goToDefinition.js";
+export * from "./unittests/tsserver/importHelpers.js";
+export * from "./unittests/tsserver/inconsistentErrorInEditor.js";
+export * from "./unittests/tsserver/inferredProjects.js";
+export * from "./unittests/tsserver/inlayHints.js";
+export * from "./unittests/tsserver/jsdocTag.js";
+export * from "./unittests/tsserver/languageService.js";
+export * from "./unittests/tsserver/libraryResolution.js";
+export * from "./unittests/tsserver/maxNodeModuleJsDepth.js";
+export * from "./unittests/tsserver/metadataInResponse.js";
+export * from "./unittests/tsserver/moduleResolution.js";
+export * from "./unittests/tsserver/moduleSpecifierCache.js";
+export * from "./unittests/tsserver/navTo.js";
+export * from "./unittests/tsserver/occurences.js";
+export * from "./unittests/tsserver/openFile.js";
+export * from "./unittests/tsserver/packageJsonInfo.js";
+export * from "./unittests/tsserver/partialSemanticServer.js";
+export * from "./unittests/tsserver/plugins.js";
+export * from "./unittests/tsserver/pluginsAsync.js";
+export * from "./unittests/tsserver/projectErrors.js";
+export * from "./unittests/tsserver/projectReferenceCompileOnSave.js";
+export * from "./unittests/tsserver/projectReferenceErrors.js";
+export * from "./unittests/tsserver/projectReferences.js";
+export * from "./unittests/tsserver/projectReferencesSourcemap.js";
+export * from "./unittests/tsserver/projects.js";
+export * from "./unittests/tsserver/projectsWithReferences.js";
+export * from "./unittests/tsserver/refactors.js";
+export * from "./unittests/tsserver/reload.js";
+export * from "./unittests/tsserver/reloadProjects.js";
+export * from "./unittests/tsserver/rename.js";
+export * from "./unittests/tsserver/resolutionCache.js";
+export * from "./unittests/tsserver/session.js";
+export * from "./unittests/tsserver/skipLibCheck.js";
+export * from "./unittests/tsserver/smartSelection.js";
+export * from "./unittests/tsserver/symlinkCache.js";
+export * from "./unittests/tsserver/symLinks.js";
+export * from "./unittests/tsserver/syntacticServer.js";
+export * from "./unittests/tsserver/syntaxOperations.js";
+export * from "./unittests/tsserver/telemetry.js";
+export * from "./unittests/tsserver/textStorage.js";
+export * from "./unittests/tsserver/typeAquisition.js";
+export * from "./unittests/tsserver/typeOnlyImportChains.js";
+export * from "./unittests/tsserver/typeReferenceDirectives.js";
+export * from "./unittests/tsserver/typingsInstaller.js";
+export * from "./unittests/tsserver/versionCache.js";
+export * from "./unittests/tsserver/watchEnvironment.js";
+export * from "./unittests/typeParameterIsPossiblyReferenced.js";
diff --git a/src/testRunner/transpileRunner.ts b/src/testRunner/transpileRunner.ts
index fd8526d79a69d..80a9794fe2bc1 100644
--- a/src/testRunner/transpileRunner.ts
+++ b/src/testRunner/transpileRunner.ts
@@ -6,9 +6,9 @@ import {
RunnerBase,
TestCaseParser,
TestRunnerKind,
-} from "./_namespaces/Harness";
-import * as ts from "./_namespaces/ts";
-import * as vpath from "./_namespaces/vpath";
+} from "./_namespaces/Harness.js";
+import * as ts from "./_namespaces/ts.js";
+import * as vpath from "./_namespaces/vpath.js";
export class TranspileRunner extends RunnerBase {
protected basePath = "tests/cases/transpile";
diff --git a/src/testRunner/unittests/asserts.ts b/src/testRunner/unittests/asserts.ts
index 0656156e852c0..48f1d32fd146c 100644
--- a/src/testRunner/unittests/asserts.ts
+++ b/src/testRunner/unittests/asserts.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: assert", () => {
it("deepEqual", () => {
diff --git a/src/testRunner/unittests/base64.ts b/src/testRunner/unittests/base64.ts
index 82ae5df634814..996cae1d12ebf 100644
--- a/src/testRunner/unittests/base64.ts
+++ b/src/testRunner/unittests/base64.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: base64", () => {
describe("base64decode", () => {
diff --git a/src/testRunner/unittests/builder.ts b/src/testRunner/unittests/builder.ts
index 65ad35bfd6c6c..66b133cfa02c6 100644
--- a/src/testRunner/unittests/builder.ts
+++ b/src/testRunner/unittests/builder.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
import {
NamedSourceText,
newProgram,
@@ -6,7 +6,7 @@ import {
SourceText,
updateProgram,
updateProgramText,
-} from "./helpers";
+} from "./helpers.js";
describe("unittests:: builder", () => {
it("emits dependent files", () => {
diff --git a/src/testRunner/unittests/canWatch.ts b/src/testRunner/unittests/canWatch.ts
index 736d45b5198ab..b5d4f4f58af1d 100644
--- a/src/testRunner/unittests/canWatch.ts
+++ b/src/testRunner/unittests/canWatch.ts
@@ -1,5 +1,5 @@
-import { Baseline } from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
+import { Baseline } from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: canWatch::", () => {
baselineCanWatch(
"canWatchDirectoryOrFile",
diff --git a/src/testRunner/unittests/comments.ts b/src/testRunner/unittests/comments.ts
index 74d6919285616..1138a549ad4b1 100644
--- a/src/testRunner/unittests/comments.ts
+++ b/src/testRunner/unittests/comments.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("comment parsing", () => {
const withShebang = `#! node
diff --git a/src/testRunner/unittests/compilerCore.ts b/src/testRunner/unittests/compilerCore.ts
index ed2415eb6aec5..82a259df154ef 100644
--- a/src/testRunner/unittests/compilerCore.ts
+++ b/src/testRunner/unittests/compilerCore.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: compilerCore", () => {
describe("equalOwnProperties", () => {
diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts
index 6173663884323..9c5dc6d3f2351 100644
--- a/src/testRunner/unittests/config/commandLineParsing.ts
+++ b/src/testRunner/unittests/config/commandLineParsing.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => {
function assertParseResult(subScenario: string, commandLine: string[], workerDiagnostic?: () => ts.ParseCommandLineWorkerDiagnostics) {
diff --git a/src/testRunner/unittests/config/configurationExtension.ts b/src/testRunner/unittests/config/configurationExtension.ts
index 7006b3dbe7169..251cc965746c7 100644
--- a/src/testRunner/unittests/config/configurationExtension.ts
+++ b/src/testRunner/unittests/config/configurationExtension.ts
@@ -1,12 +1,12 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineParseConfig,
baselineParseConfigHost,
-} from "./helpers";
+} from "./helpers.js";
function createFileSystem(ignoreCase: boolean, cwd: string, root: string) {
return new vfs.FileSystem(ignoreCase, {
diff --git a/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts b/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts
index 684484c6c2ce2..1acec6596358e 100644
--- a/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts
+++ b/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts
@@ -1,7 +1,7 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { baselineParseConfig } from "./helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { baselineParseConfig } from "./helpers.js";
describe("unittests:: config:: convertCompilerOptionsFromJson", () => {
function baselineCompilerOptions(subScenario: string, json: any, configFileName: string) {
diff --git a/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts b/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts
index 2a0e1f458af1a..9cdad65b4c40b 100644
--- a/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts
+++ b/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts
@@ -1,7 +1,7 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { baselineParseConfig } from "./helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { baselineParseConfig } from "./helpers.js";
describe("unittests:: config:: convertTypeAcquisitionFromJson", () => {
function baselineTypeAcquisition(subScenario: string, json: any, configFileName: string) {
diff --git a/src/testRunner/unittests/config/helpers.ts b/src/testRunner/unittests/config/helpers.ts
index dd219e84afe39..5a5aa78c24fed 100644
--- a/src/testRunner/unittests/config/helpers.ts
+++ b/src/testRunner/unittests/config/helpers.ts
@@ -1,7 +1,7 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
function getParsedCommandJson(
jsonText: string,
diff --git a/src/testRunner/unittests/config/initializeTSConfig.ts b/src/testRunner/unittests/config/initializeTSConfig.ts
index d2965cdca7c17..713c693d0e807 100644
--- a/src/testRunner/unittests/config/initializeTSConfig.ts
+++ b/src/testRunner/unittests/config/initializeTSConfig.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: config:: initTSConfig", () => {
function initTSConfigCorrectly(name: string, commandLinesArgs: string[]) {
diff --git a/src/testRunner/unittests/config/matchFiles.ts b/src/testRunner/unittests/config/matchFiles.ts
index f2359ca9922ea..05a668e3e079d 100644
--- a/src/testRunner/unittests/config/matchFiles.ts
+++ b/src/testRunner/unittests/config/matchFiles.ts
@@ -1,8 +1,8 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { baselineParseConfig } from "./helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { baselineParseConfig } from "./helpers.js";
const caseInsensitiveBasePath = "c:/dev/";
const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json";
diff --git a/src/testRunner/unittests/config/showConfig.ts b/src/testRunner/unittests/config/showConfig.ts
index 3e02a256d8f29..0061df800a223 100644
--- a/src/testRunner/unittests/config/showConfig.ts
+++ b/src/testRunner/unittests/config/showConfig.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: config:: showConfig", () => {
function showTSConfigCorrectly(name: string, commandLinesArgs: string[], configJson?: object) {
diff --git a/src/testRunner/unittests/config/tsconfigParsing.ts b/src/testRunner/unittests/config/tsconfigParsing.ts
index 6652c2ffb2b38..c3893dde6eb59 100644
--- a/src/testRunner/unittests/config/tsconfigParsing.ts
+++ b/src/testRunner/unittests/config/tsconfigParsing.ts
@@ -1,9 +1,9 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { baselineParseConfig } from "./helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { baselineParseConfig } from "./helpers.js";
describe("unittests:: config:: tsconfigParsing:: parseConfigFileTextToJson", () => {
function formatErrors(errors: readonly ts.Diagnostic[]) {
diff --git a/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts b/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts
index 24837791623a7..1890be7fb560f 100644
--- a/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts
+++ b/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts
@@ -1,8 +1,8 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { baselineParseConfig } from "./helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { baselineParseConfig } from "./helpers.js";
describe("unittests:: config:: tsconfigParsingWatchOptions:: parseConfigFileTextToJson", () => {
interface VerifyWatchOptions {
diff --git a/src/testRunner/unittests/convertToBase64.ts b/src/testRunner/unittests/convertToBase64.ts
index e801451208ef9..a3465854d7853 100644
--- a/src/testRunner/unittests/convertToBase64.ts
+++ b/src/testRunner/unittests/convertToBase64.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: convertToBase64", () => {
function runTest(input: string): void {
diff --git a/src/testRunner/unittests/customTransforms.ts b/src/testRunner/unittests/customTransforms.ts
index 2af7834ccf72b..ec46c04206ad4 100644
--- a/src/testRunner/unittests/customTransforms.ts
+++ b/src/testRunner/unittests/customTransforms.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: customTransforms", () => {
function emitsCorrectly(name: string, sources: { file: string; text: string; }[], customTransformers: ts.CustomTransformers, options: ts.CompilerOptions = {}) {
diff --git a/src/testRunner/unittests/debugDeprecation.ts b/src/testRunner/unittests/debugDeprecation.ts
index 4019a021bb807..09cc781114780 100644
--- a/src/testRunner/unittests/debugDeprecation.ts
+++ b/src/testRunner/unittests/debugDeprecation.ts
@@ -1,5 +1,5 @@
-import { deprecate } from "../../deprecatedCompat/deprecate";
-import * as ts from "../_namespaces/ts";
+import { deprecate } from "../../deprecatedCompat/deprecate.js";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: debugDeprecation", () => {
let loggingHost: ts.LoggingHost | undefined;
diff --git a/src/testRunner/unittests/diagnosticCollection.ts b/src/testRunner/unittests/diagnosticCollection.ts
index e0b543ac31272..4ea709f78049e 100644
--- a/src/testRunner/unittests/diagnosticCollection.ts
+++ b/src/testRunner/unittests/diagnosticCollection.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: internalApi:: diagnosticCollection", () => {
describe("add", () => {
diff --git a/src/testRunner/unittests/evaluation/arraySpread.ts b/src/testRunner/unittests/evaluation/arraySpread.ts
index cc871a76a2f46..aaf113dcaf4ef 100644
--- a/src/testRunner/unittests/evaluation/arraySpread.ts
+++ b/src/testRunner/unittests/evaluation/arraySpread.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: arraySpread", () => {
it("array spread preserves side-effects", async () => {
diff --git a/src/testRunner/unittests/evaluation/asyncArrow.ts b/src/testRunner/unittests/evaluation/asyncArrow.ts
index 87374fdfea3e1..652a66a88e5ec 100644
--- a/src/testRunner/unittests/evaluation/asyncArrow.ts
+++ b/src/testRunner/unittests/evaluation/asyncArrow.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: asyncArrowEvaluation", () => {
// https://github.com/Microsoft/TypeScript/issues/24722
diff --git a/src/testRunner/unittests/evaluation/asyncGenerator.ts b/src/testRunner/unittests/evaluation/asyncGenerator.ts
index f067c872aaff2..78c54bde9238e 100644
--- a/src/testRunner/unittests/evaluation/asyncGenerator.ts
+++ b/src/testRunner/unittests/evaluation/asyncGenerator.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: asyncGeneratorEvaluation", () => {
it("return (es5)", async () => {
diff --git a/src/testRunner/unittests/evaluation/autoAccessors.ts b/src/testRunner/unittests/evaluation/autoAccessors.ts
index 6f4d37587a3f7..ea35171c58c77 100644
--- a/src/testRunner/unittests/evaluation/autoAccessors.ts
+++ b/src/testRunner/unittests/evaluation/autoAccessors.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: autoAccessors", () => {
const editions = [
diff --git a/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts b/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts
index aced8512f138f..756c4ce5871c8 100644
--- a/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts
+++ b/src/testRunner/unittests/evaluation/awaitUsingDeclarations.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
function FakeSuppressedError(error: any, suppressed: any) {
return { error, suppressed };
diff --git a/src/testRunner/unittests/evaluation/awaiter.ts b/src/testRunner/unittests/evaluation/awaiter.ts
index 87007d8925934..718521d0bb309 100644
--- a/src/testRunner/unittests/evaluation/awaiter.ts
+++ b/src/testRunner/unittests/evaluation/awaiter.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: awaiter", () => {
// NOTE: This could break if the ECMAScript spec ever changes the timing behavior for Promises (again)
diff --git a/src/testRunner/unittests/evaluation/constEnum.ts b/src/testRunner/unittests/evaluation/constEnum.ts
index 8074c00627ff6..9060dba8d2843 100644
--- a/src/testRunner/unittests/evaluation/constEnum.ts
+++ b/src/testRunner/unittests/evaluation/constEnum.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: constEnum", () => {
it("correct order of operations for inlined negative numbers", async () => {
diff --git a/src/testRunner/unittests/evaluation/destructuring.ts b/src/testRunner/unittests/evaluation/destructuring.ts
index 6a36f92fab830..a8dbf796653a2 100644
--- a/src/testRunner/unittests/evaluation/destructuring.ts
+++ b/src/testRunner/unittests/evaluation/destructuring.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: destructuring", () => {
// https://github.com/microsoft/TypeScript/issues/39205
diff --git a/src/testRunner/unittests/evaluation/esDecorators.ts b/src/testRunner/unittests/evaluation/esDecorators.ts
index 258bfcc803e6a..5c54951a57b95 100644
--- a/src/testRunner/unittests/evaluation/esDecorators.ts
+++ b/src/testRunner/unittests/evaluation/esDecorators.ts
@@ -1,6 +1,6 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
-import { ScriptTarget } from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
+import { ScriptTarget } from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: esDecorators", () => {
const options: ts.CompilerOptions = { target: ts.ScriptTarget.ES2021 };
diff --git a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts
index 3a5a979d4895d..5261c3d7cef96 100644
--- a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts
+++ b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts
@@ -1,6 +1,6 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
-import { ScriptTarget } from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
+import { ScriptTarget } from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: esDecoratorsMetadata", () => {
const nodeVersion = new ts.Version(process.versions.node);
diff --git a/src/testRunner/unittests/evaluation/externalModules.ts b/src/testRunner/unittests/evaluation/externalModules.ts
index f6719764870bb..b387ad62b22a3 100644
--- a/src/testRunner/unittests/evaluation/externalModules.ts
+++ b/src/testRunner/unittests/evaluation/externalModules.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: externalModules", () => {
// https://github.com/microsoft/TypeScript/issues/35420
diff --git a/src/testRunner/unittests/evaluation/forAwaitOf.ts b/src/testRunner/unittests/evaluation/forAwaitOf.ts
index 76b1f931c5540..1f2d4c2668261 100644
--- a/src/testRunner/unittests/evaluation/forAwaitOf.ts
+++ b/src/testRunner/unittests/evaluation/forAwaitOf.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: forAwaitOfEvaluation", () => {
it("sync (es5)", async () => {
diff --git a/src/testRunner/unittests/evaluation/forOf.ts b/src/testRunner/unittests/evaluation/forOf.ts
index 8b2fd226770e8..b95914a6d5970 100644
--- a/src/testRunner/unittests/evaluation/forOf.ts
+++ b/src/testRunner/unittests/evaluation/forOf.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: forOfEvaluation", () => {
it("es5 over a array with no Symbol", () => {
diff --git a/src/testRunner/unittests/evaluation/generator.ts b/src/testRunner/unittests/evaluation/generator.ts
index 676b9ff699750..06f22c3680fa5 100644
--- a/src/testRunner/unittests/evaluation/generator.ts
+++ b/src/testRunner/unittests/evaluation/generator.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: generatorEvaluation", () => {
it("throw before start (es5)", () => {
diff --git a/src/testRunner/unittests/evaluation/objectRest.ts b/src/testRunner/unittests/evaluation/objectRest.ts
index ebbaa7219a7f6..20f5481588eb6 100644
--- a/src/testRunner/unittests/evaluation/objectRest.ts
+++ b/src/testRunner/unittests/evaluation/objectRest.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: objectRest", () => {
// https://github.com/microsoft/TypeScript/issues/31469
diff --git a/src/testRunner/unittests/evaluation/optionalCall.ts b/src/testRunner/unittests/evaluation/optionalCall.ts
index db92162a3e14f..392bdd3c40804 100644
--- a/src/testRunner/unittests/evaluation/optionalCall.ts
+++ b/src/testRunner/unittests/evaluation/optionalCall.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: optionalCall", () => {
it("f?.()", async () => {
diff --git a/src/testRunner/unittests/evaluation/superInStaticInitializer.ts b/src/testRunner/unittests/evaluation/superInStaticInitializer.ts
index c5e2f84b4eb0b..ad07548f204bf 100644
--- a/src/testRunner/unittests/evaluation/superInStaticInitializer.ts
+++ b/src/testRunner/unittests/evaluation/superInStaticInitializer.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: superInStaticInitializer", () => {
it("super-property-get in es2015", () => {
diff --git a/src/testRunner/unittests/evaluation/templateLiteral.ts b/src/testRunner/unittests/evaluation/templateLiteral.ts
index 65fabb9d4ccbb..924bc60389066 100644
--- a/src/testRunner/unittests/evaluation/templateLiteral.ts
+++ b/src/testRunner/unittests/evaluation/templateLiteral.ts
@@ -1,4 +1,4 @@
-import * as evaluator from "../../_namespaces/evaluator";
+import * as evaluator from "../../_namespaces/evaluator.js";
describe("unittests:: evaluation:: templateLiteral", () => {
it("toString() over valueOf()", () => {
diff --git a/src/testRunner/unittests/evaluation/updateExpressionInModule.ts b/src/testRunner/unittests/evaluation/updateExpressionInModule.ts
index dc0eaade1c1eb..2dc7b5188a650 100644
--- a/src/testRunner/unittests/evaluation/updateExpressionInModule.ts
+++ b/src/testRunner/unittests/evaluation/updateExpressionInModule.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: evaluation:: updateExpressionInModule", () => {
// only run BigInt tests if BigInt is supported in the host environment
diff --git a/src/testRunner/unittests/evaluation/usingDeclarations.ts b/src/testRunner/unittests/evaluation/usingDeclarations.ts
index 11adef2fb2b31..9c1b5995fc581 100644
--- a/src/testRunner/unittests/evaluation/usingDeclarations.ts
+++ b/src/testRunner/unittests/evaluation/usingDeclarations.ts
@@ -1,5 +1,5 @@
-import * as evaluator from "../../_namespaces/evaluator";
-import * as ts from "../../_namespaces/ts";
+import * as evaluator from "../../_namespaces/evaluator.js";
+import * as ts from "../../_namespaces/ts.js";
function FakeSuppressedError(error: any, suppressed: any) {
return { error, suppressed };
diff --git a/src/testRunner/unittests/factory.ts b/src/testRunner/unittests/factory.ts
index 903388588aa69..c5e897e4d2066 100644
--- a/src/testRunner/unittests/factory.ts
+++ b/src/testRunner/unittests/factory.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: FactoryAPI", () => {
function assertSyntaxKind(node: ts.Node, expected: ts.SyntaxKind) {
diff --git a/src/testRunner/unittests/helpers.ts b/src/testRunner/unittests/helpers.ts
index 0bec189046f0f..9ec9b57e6618e 100644
--- a/src/testRunner/unittests/helpers.ts
+++ b/src/testRunner/unittests/helpers.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
const enum ChangedPart {
none = 0,
diff --git a/src/testRunner/unittests/helpers/alternateResult.ts b/src/testRunner/unittests/helpers/alternateResult.ts
index d43e1eb8d68c9..265f9c0c0f767 100644
--- a/src/testRunner/unittests/helpers/alternateResult.ts
+++ b/src/testRunner/unittests/helpers/alternateResult.ts
@@ -1,7 +1,7 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { FsContents } from "./contents";
-import { libFile } from "./virtualFileSystemWithWatch";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { FsContents } from "./contents.js";
+import { libFile } from "./virtualFileSystemWithWatch.js";
export function getFsConentsForAlternateResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) {
return jsonToReadableText({
diff --git a/src/testRunner/unittests/helpers/baseline.ts b/src/testRunner/unittests/helpers/baseline.ts
index 21cf49ad95b90..c07381ad64be9 100644
--- a/src/testRunner/unittests/helpers/baseline.ts
+++ b/src/testRunner/unittests/helpers/baseline.ts
@@ -1,9 +1,9 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { TscCompileSystem } from "./tsc";
-import { TestServerHost } from "./virtualFileSystemWithWatch";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { TscCompileSystem } from "./tsc.js";
+import { TestServerHost } from "./virtualFileSystemWithWatch.js";
export type CommandLineProgram = [ts.Program, ts.BuilderProgram?];
export interface CommandLineCallbacks {
diff --git a/src/testRunner/unittests/helpers/contents.ts b/src/testRunner/unittests/helpers/contents.ts
index c01f55d7d35f3..943093d2704af 100644
--- a/src/testRunner/unittests/helpers/contents.ts
+++ b/src/testRunner/unittests/helpers/contents.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../_namespaces/ts";
-import { libFile } from "./virtualFileSystemWithWatch";
+import * as ts from "../../_namespaces/ts.js";
+import { libFile } from "./virtualFileSystemWithWatch.js";
export function compilerOptionsToConfigJson(options: ts.CompilerOptions) {
return ts.optionMapToObject(ts.serializeCompilerOptions(options));
diff --git a/src/testRunner/unittests/helpers/demoProjectReferences.ts b/src/testRunner/unittests/helpers/demoProjectReferences.ts
index 7189d5afbe23c..9276fbc8d88cd 100644
--- a/src/testRunner/unittests/helpers/demoProjectReferences.ts
+++ b/src/testRunner/unittests/helpers/demoProjectReferences.ts
@@ -1,14 +1,14 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
FsContents,
libContent,
-} from "./contents";
-import { loadProjectFromFiles } from "./vfs";
+} from "./contents.js";
+import { loadProjectFromFiles } from "./vfs.js";
import {
createWatchedSystem,
libFile,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function getFsContentsForDemoProjectReferencesCoreConfig(additional?: object) {
return jsonToReadableText({
diff --git a/src/testRunner/unittests/helpers/extends.ts b/src/testRunner/unittests/helpers/extends.ts
index e9398ab4b4708..a67007064efaa 100644
--- a/src/testRunner/unittests/helpers/extends.ts
+++ b/src/testRunner/unittests/helpers/extends.ts
@@ -1,12 +1,12 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { FsContents } from "./contents";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { FsContents } from "./contents.js";
import {
createServerHost,
createWatchedSystem,
libFile,
TestServerHost,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function getSymlinkedExtendsSys(forTsserver?: true): TestServerHost {
return (!forTsserver ? createWatchedSystem : createServerHost)({
diff --git a/src/testRunner/unittests/helpers/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/helpers/forceConsistentCasingInFileNames.ts
index 03bf67cf33453..8e38d59fbbd60 100644
--- a/src/testRunner/unittests/helpers/forceConsistentCasingInFileNames.ts
+++ b/src/testRunner/unittests/helpers/forceConsistentCasingInFileNames.ts
@@ -1,10 +1,10 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
FsContents,
libContent,
-} from "./contents";
-import { libFile } from "./virtualFileSystemWithWatch";
+} from "./contents.js";
+import { libFile } from "./virtualFileSystemWithWatch.js";
export function getFsContentsForMultipleErrorsForceConsistentCasingInFileNames(): FsContents {
return {
diff --git a/src/testRunner/unittests/helpers/libraryResolution.ts b/src/testRunner/unittests/helpers/libraryResolution.ts
index f62a53be1cdd2..bbe0b0c22052d 100644
--- a/src/testRunner/unittests/helpers/libraryResolution.ts
+++ b/src/testRunner/unittests/helpers/libraryResolution.ts
@@ -1,14 +1,14 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
FsContents,
libContent,
-} from "./contents";
-import { loadProjectFromFiles } from "./vfs";
+} from "./contents.js";
+import { loadProjectFromFiles } from "./vfs.js";
import {
createServerHost,
createWatchedSystem,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
function getFsContentsForLibResolution(libRedirection?: boolean): FsContents {
return {
diff --git a/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts b/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts
index 5d3b02eceffb4..30d94e847a58d 100644
--- a/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts
+++ b/src/testRunner/unittests/helpers/monorepoSymlinkedSiblingPackages.ts
@@ -1,13 +1,13 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "./contents";
-import { solutionBuildWithBaseline } from "./solutionBuilder";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "./contents.js";
+import { solutionBuildWithBaseline } from "./solutionBuilder.js";
import {
createServerHost,
createWatchedSystem,
TestServerHost,
TestServerHostOsFlavor,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function getMonorepoSymlinkedSiblingPackagesSys(forTsserver: boolean, built: boolean, osFlavor?: TestServerHostOsFlavor): TestServerHost {
const configText = jsonToReadableText({
diff --git a/src/testRunner/unittests/helpers/noEmitOnError.ts b/src/testRunner/unittests/helpers/noEmitOnError.ts
index c0fda49bd28eb..7d7a9095a0a55 100644
--- a/src/testRunner/unittests/helpers/noEmitOnError.ts
+++ b/src/testRunner/unittests/helpers/noEmitOnError.ts
@@ -1,14 +1,14 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
FsContents,
libContent,
-} from "./contents";
-import { loadProjectFromFiles } from "./vfs";
+} from "./contents.js";
+import { loadProjectFromFiles } from "./vfs.js";
import {
createWatchedSystem,
libFile,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function getFsContentsForNoEmitOnError(): FsContents {
return {
diff --git a/src/testRunner/unittests/helpers/sampleProjectReferences.ts b/src/testRunner/unittests/helpers/sampleProjectReferences.ts
index 7d417940e88cc..7c5634c0120e3 100644
--- a/src/testRunner/unittests/helpers/sampleProjectReferences.ts
+++ b/src/testRunner/unittests/helpers/sampleProjectReferences.ts
@@ -1,15 +1,15 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
FsContents,
getProjectConfigWithNodeNext,
-} from "./contents";
-import { loadProjectFromFiles } from "./vfs";
+} from "./contents.js";
+import { loadProjectFromFiles } from "./vfs.js";
import {
createServerHost,
createWatchedSystem,
libFile,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function getFsContentsForSampleProjectReferencesLogicConfig(withNodeNext?: boolean) {
return jsonToReadableText({
diff --git a/src/testRunner/unittests/helpers/solutionBuilder.ts b/src/testRunner/unittests/helpers/solutionBuilder.ts
index cc0f5c9e6bc58..7225deed28def 100644
--- a/src/testRunner/unittests/helpers/solutionBuilder.ts
+++ b/src/testRunner/unittests/helpers/solutionBuilder.ts
@@ -1,15 +1,15 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { commandLineCallbacks } from "./baseline";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { commandLineCallbacks } from "./baseline.js";
import {
makeSystemReadyForBaseline,
TscCompileSystem,
-} from "./tsc";
+} from "./tsc.js";
import {
changeToHostTrackingWrittenFiles,
TestServerHost,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function createSolutionBuilderHostForBaseline(
sys: TscCompileSystem | TestServerHost,
diff --git a/src/testRunner/unittests/helpers/transitiveReferences.ts b/src/testRunner/unittests/helpers/transitiveReferences.ts
index 958371ee25e40..7bfc10aec4792 100644
--- a/src/testRunner/unittests/helpers/transitiveReferences.ts
+++ b/src/testRunner/unittests/helpers/transitiveReferences.ts
@@ -1,11 +1,11 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
FsContents,
getProjectConfigWithNodeNext,
libContent,
-} from "./contents";
-import { libFile } from "./virtualFileSystemWithWatch";
+} from "./contents.js";
+import { libFile } from "./virtualFileSystemWithWatch.js";
export function getFsContentsForTransitiveReferencesRefsAdts() {
return dedent`
diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts
index ac4c9868e76cb..16fc92c55900c 100644
--- a/src/testRunner/unittests/helpers/tsc.ts
+++ b/src/testRunner/unittests/helpers/tsc.ts
@@ -1,8 +1,8 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselinePrograms,
CommandLineCallbacks,
@@ -15,7 +15,7 @@ import {
ReadableProgramMultiFileEmitBuildInfo,
toPathWithSystem,
tscBaselineName,
-} from "./baseline";
+} from "./baseline.js";
export type TscCompileSystem = fakes.System & {
writtenFiles: Set;
diff --git a/src/testRunner/unittests/helpers/tscWatch.ts b/src/testRunner/unittests/helpers/tscWatch.ts
index 94a7acc6c160e..05938988e0599 100644
--- a/src/testRunner/unittests/helpers/tscWatch.ts
+++ b/src/testRunner/unittests/helpers/tscWatch.ts
@@ -1,10 +1,10 @@
import {
verifyProgramStructure,
verifyResolutionCache,
-} from "../../../harness/incrementalUtils";
-import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes";
-import { Baseline } from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+} from "../../../harness/incrementalUtils.js";
+import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes.js";
+import { Baseline } from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
import {
baselinePrograms,
CommandLineCallbacks,
@@ -12,7 +12,7 @@ import {
CommandLineProgram,
generateSourceMapBaselineFiles,
tscBaselineName,
-} from "./baseline";
+} from "./baseline.js";
import {
changeToHostTrackingWrittenFiles,
File,
@@ -20,7 +20,7 @@ import {
StateLogger,
TestServerHost,
TestServerHostTrackingWrittenFiles,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export const commonFile1: File = {
path: "/a/b/commonFile1.ts",
diff --git a/src/testRunner/unittests/helpers/tsserver.ts b/src/testRunner/unittests/helpers/tsserver.ts
index b1c2192730c25..662cb764b0ed9 100644
--- a/src/testRunner/unittests/helpers/tsserver.ts
+++ b/src/testRunner/unittests/helpers/tsserver.ts
@@ -1,18 +1,18 @@
-import { incrementalVerifier } from "../../../harness/incrementalUtils";
-import { patchServiceForStateBaseline } from "../../../harness/projectServiceStateLogger";
+import { incrementalVerifier } from "../../../harness/incrementalUtils.js";
+import { patchServiceForStateBaseline } from "../../../harness/projectServiceStateLogger.js";
import {
createLoggerWithInMemoryLogs,
LoggerWithInMemoryLogs,
-} from "../../../harness/tsserverLogger";
-import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { ensureErrorFreeBuild } from "./solutionBuilder";
+} from "../../../harness/tsserverLogger.js";
+import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { ensureErrorFreeBuild } from "./solutionBuilder.js";
import {
customTypesMap,
TestTypingsInstallerAdapter,
TestTypingsInstallerOptions,
-} from "./typingsInstaller";
+} from "./typingsInstaller.js";
import {
changeToHostTrackingWrittenFiles,
createServerHost,
@@ -23,7 +23,7 @@ import {
StateLogger,
TestServerHost,
TestServerHostTrackingWrittenFiles,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export function baselineTsserverLogs(scenario: string, subScenario: string, sessionOrService: { logger: LoggerWithInMemoryLogs; }) {
Harness.Baseline.runBaseline(`tsserver/${scenario}/${subScenario.split(" ").join("-")}.js`, sessionOrService.logger.logs.join("\r\n"));
diff --git a/src/testRunner/unittests/helpers/typingsInstaller.ts b/src/testRunner/unittests/helpers/typingsInstaller.ts
index a12caae2052b3..752992304827d 100644
--- a/src/testRunner/unittests/helpers/typingsInstaller.ts
+++ b/src/testRunner/unittests/helpers/typingsInstaller.ts
@@ -1,15 +1,15 @@
import {
LoggerWithInMemoryLogs,
nowString,
-} from "../../../harness/tsserverLogger";
-import * as ts from "../../_namespaces/ts";
-import { stringifyIndented } from "../../_namespaces/ts.server";
-import { jsonToReadableText } from "../helpers";
-import { TestSession } from "./tsserver";
+} from "../../../harness/tsserverLogger.js";
+import * as ts from "../../_namespaces/ts.js";
+import { stringifyIndented } from "../../_namespaces/ts.server.js";
+import { jsonToReadableText } from "../helpers.js";
+import { TestSession } from "./tsserver.js";
import {
File,
TestServerHost,
-} from "./virtualFileSystemWithWatch";
+} from "./virtualFileSystemWithWatch.js";
export const customTypesMap = {
path: "/typesMap.json" as ts.Path,
diff --git a/src/testRunner/unittests/helpers/vfs.ts b/src/testRunner/unittests/helpers/vfs.ts
index 5b8a264f75fcf..cd8ec94018a12 100644
--- a/src/testRunner/unittests/helpers/vfs.ts
+++ b/src/testRunner/unittests/helpers/vfs.ts
@@ -1,6 +1,6 @@
-import { getDirectoryPath } from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { libContent } from "./contents";
+import { getDirectoryPath } from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { libContent } from "./contents.js";
export interface FsOptions {
libContentToAppend?: string;
diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts
index e7ff6a7d405bc..4f2de5807f471 100644
--- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts
+++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts
@@ -2,7 +2,7 @@ import {
createWatchUtils,
Watches,
WatchUtils,
-} from "../../../harness/watchUtils";
+} from "../../../harness/watchUtils.js";
import {
arrayFrom,
clear,
@@ -43,9 +43,9 @@ import {
SortedArray,
sys,
toPath,
-} from "../../_namespaces/ts";
-import { typingsInstaller } from "../../_namespaces/ts.server";
-import { timeIncrements } from "../../_namespaces/vfs";
+} from "../../_namespaces/ts.js";
+import { typingsInstaller } from "../../_namespaces/ts.server.js";
+import { timeIncrements } from "../../_namespaces/vfs.js";
export const libFile: File = {
path: "/a/lib/lib.d.ts",
diff --git a/src/testRunner/unittests/incrementalParser.ts b/src/testRunner/unittests/incrementalParser.ts
index a42044d0a67db..7d4aa1cea04a0 100644
--- a/src/testRunner/unittests/incrementalParser.ts
+++ b/src/testRunner/unittests/incrementalParser.ts
@@ -1,5 +1,5 @@
-import * as ts from "../_namespaces/ts";
-import * as Utils from "../_namespaces/Utils";
+import * as ts from "../_namespaces/ts.js";
+import * as Utils from "../_namespaces/Utils.js";
function withChange(text: ts.IScriptSnapshot, start: number, length: number, newText: string): { text: ts.IScriptSnapshot; textChangeRange: ts.TextChangeRange; } {
const contents = ts.getSnapshotText(text);
diff --git a/src/testRunner/unittests/jsDocParsing.ts b/src/testRunner/unittests/jsDocParsing.ts
index 02f5c8e199980..8d58f23d6547d 100644
--- a/src/testRunner/unittests/jsDocParsing.ts
+++ b/src/testRunner/unittests/jsDocParsing.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as Utils from "../_namespaces/Utils";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as Utils from "../_namespaces/Utils.js";
describe("unittests:: JSDocParsing", () => {
describe("TypeExpressions", () => {
diff --git a/src/testRunner/unittests/jsonParserRecovery.ts b/src/testRunner/unittests/jsonParserRecovery.ts
index c68253ab03609..fb03cbf045a6f 100644
--- a/src/testRunner/unittests/jsonParserRecovery.ts
+++ b/src/testRunner/unittests/jsonParserRecovery.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: jsonParserRecovery", () => {
function parsesToValidSourceFileWithErrors(name: string, text: string) {
diff --git a/src/testRunner/unittests/moduleResolution.ts b/src/testRunner/unittests/moduleResolution.ts
index 5ee17d871dd6e..4cc25806235dd 100644
--- a/src/testRunner/unittests/moduleResolution.ts
+++ b/src/testRunner/unittests/moduleResolution.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import { jsonToReadableText } from "./helpers";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import { jsonToReadableText } from "./helpers.js";
interface File {
name: string;
diff --git a/src/testRunner/unittests/parsePseudoBigInt.ts b/src/testRunner/unittests/parsePseudoBigInt.ts
index affe01a2d0d3d..8f95e3cc30da3 100644
--- a/src/testRunner/unittests/parsePseudoBigInt.ts
+++ b/src/testRunner/unittests/parsePseudoBigInt.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: BigInt literal base conversions", () => {
describe("parsePseudoBigInt", () => {
diff --git a/src/testRunner/unittests/paths.ts b/src/testRunner/unittests/paths.ts
index 33de6b314914c..56a49f57f392a 100644
--- a/src/testRunner/unittests/paths.ts
+++ b/src/testRunner/unittests/paths.ts
@@ -1,4 +1,4 @@
-import * as ts from "../_namespaces/ts";
+import * as ts from "../_namespaces/ts.js";
describe("unittests:: core paths", () => {
it("normalizeSlashes", () => {
diff --git a/src/testRunner/unittests/printer.ts b/src/testRunner/unittests/printer.ts
index dd724ed73f855..76f23ab692fb0 100644
--- a/src/testRunner/unittests/printer.ts
+++ b/src/testRunner/unittests/printer.ts
@@ -1,7 +1,7 @@
-import * as fakes from "../_namespaces/fakes";
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as vfs from "../_namespaces/vfs";
+import * as fakes from "../_namespaces/fakes.js";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as vfs from "../_namespaces/vfs.js";
describe("unittests:: PrinterAPI", () => {
function makePrintsCorrectly(prefix: string) {
diff --git a/src/testRunner/unittests/programApi.ts b/src/testRunner/unittests/programApi.ts
index fe129d78a9ade..44f391b869002 100644
--- a/src/testRunner/unittests/programApi.ts
+++ b/src/testRunner/unittests/programApi.ts
@@ -1,9 +1,9 @@
-import * as documents from "../_namespaces/documents";
-import * as fakes from "../_namespaces/fakes";
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as vfs from "../_namespaces/vfs";
-import { jsonToReadableText } from "./helpers";
+import * as documents from "../_namespaces/documents.js";
+import * as fakes from "../_namespaces/fakes.js";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as vfs from "../_namespaces/vfs.js";
+import { jsonToReadableText } from "./helpers.js";
function verifyMissingFilePaths(missing: ReturnType, expected: readonly string[]) {
assert.isDefined(missing);
diff --git a/src/testRunner/unittests/publicApi.ts b/src/testRunner/unittests/publicApi.ts
index d274e06a36a48..f6bf529862af8 100644
--- a/src/testRunner/unittests/publicApi.ts
+++ b/src/testRunner/unittests/publicApi.ts
@@ -1,11 +1,11 @@
-import * as documents from "../_namespaces/documents";
-import * as fakes from "../_namespaces/fakes";
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as vfs from "../_namespaces/vfs";
-import { jsonToReadableText } from "./helpers";
-import { libContent } from "./helpers/contents";
-import { loadProjectFromFiles } from "./helpers/vfs";
+import * as documents from "../_namespaces/documents.js";
+import * as fakes from "../_namespaces/fakes.js";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as vfs from "../_namespaces/vfs.js";
+import { jsonToReadableText } from "./helpers.js";
+import { libContent } from "./helpers/contents.js";
+import { loadProjectFromFiles } from "./helpers/vfs.js";
describe("unittests:: Public APIs", () => {
function verifyApi(fileName: string) {
diff --git a/src/testRunner/unittests/reuseProgramStructure.ts b/src/testRunner/unittests/reuseProgramStructure.ts
index 6bbb7be41f3a1..7e940f16abe52 100644
--- a/src/testRunner/unittests/reuseProgramStructure.ts
+++ b/src/testRunner/unittests/reuseProgramStructure.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as Utils from "../_namespaces/Utils";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as Utils from "../_namespaces/Utils.js";
import {
createTestCompilerHost,
jsonToReadableText,
@@ -12,12 +12,12 @@ import {
TestCompilerHost,
updateProgram,
updateProgramText,
-} from "./helpers";
+} from "./helpers.js";
import {
createWatchedSystem,
File,
libFile,
-} from "./helpers/virtualFileSystemWithWatch";
+} from "./helpers/virtualFileSystemWithWatch.js";
describe("unittests:: reuseProgramStructure:: General", () => {
type ProgramToBaseline = ts.Program & Pick;
diff --git a/src/testRunner/unittests/semver.ts b/src/testRunner/unittests/semver.ts
index 241a2f7209e0b..c5bc9b289f3ee 100644
--- a/src/testRunner/unittests/semver.ts
+++ b/src/testRunner/unittests/semver.ts
@@ -1,5 +1,5 @@
-import * as ts from "../_namespaces/ts";
-import * as Utils from "../_namespaces/Utils";
+import * as ts from "../_namespaces/ts.js";
+import * as Utils from "../_namespaces/Utils.js";
import theory = Utils.theory;
describe("unittests:: semver", () => {
diff --git a/src/testRunner/unittests/services/cancellableLanguageServiceOperations.ts b/src/testRunner/unittests/services/cancellableLanguageServiceOperations.ts
index ca397ab02d125..9a83bb77fe673 100644
--- a/src/testRunner/unittests/services/cancellableLanguageServiceOperations.ts
+++ b/src/testRunner/unittests/services/cancellableLanguageServiceOperations.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: services:: cancellableLanguageServiceOperations", () => {
const file = `
diff --git a/src/testRunner/unittests/services/colorization.ts b/src/testRunner/unittests/services/colorization.ts
index 83ed8fbcc443e..b2fe6ea378836 100644
--- a/src/testRunner/unittests/services/colorization.ts
+++ b/src/testRunner/unittests/services/colorization.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
// lots of tests use quoted code
/* eslint-disable no-template-curly-in-string */
diff --git a/src/testRunner/unittests/services/convertToAsyncFunction.ts b/src/testRunner/unittests/services/convertToAsyncFunction.ts
index 0da12eaaa0d33..0fd0761c30736 100644
--- a/src/testRunner/unittests/services/convertToAsyncFunction.ts
+++ b/src/testRunner/unittests/services/convertToAsyncFunction.ts
@@ -1,15 +1,15 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
import {
extractTest,
newLineCharacter,
notImplementedHost,
TestProjectService,
-} from "./extract/helpers";
+} from "./extract/helpers.js";
const libFile: File = {
path: "/a/lib/lib.d.ts",
diff --git a/src/testRunner/unittests/services/documentRegistry.ts b/src/testRunner/unittests/services/documentRegistry.ts
index d9ab9e24ed956..b001d7a707e6f 100644
--- a/src/testRunner/unittests/services/documentRegistry.ts
+++ b/src/testRunner/unittests/services/documentRegistry.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: services:: DocumentRegistry", () => {
it("documents are shared between projects", () => {
diff --git a/src/testRunner/unittests/services/extract/constants.ts b/src/testRunner/unittests/services/extract/constants.ts
index a479a311b1aea..91ace16cf392d 100644
--- a/src/testRunner/unittests/services/extract/constants.ts
+++ b/src/testRunner/unittests/services/extract/constants.ts
@@ -1,8 +1,8 @@
-import * as ts from "../../../_namespaces/ts";
+import * as ts from "../../../_namespaces/ts.js";
import {
testExtractSymbol,
testExtractSymbolFailed,
-} from "./helpers";
+} from "./helpers.js";
describe("unittests:: services:: extract:: extractConstants", () => {
testExtractConstant("extractConstant_TopLevel", `let x = [#|1|];`);
diff --git a/src/testRunner/unittests/services/extract/functions.ts b/src/testRunner/unittests/services/extract/functions.ts
index 58df9dc87823f..8e5a009ae34b8 100644
--- a/src/testRunner/unittests/services/extract/functions.ts
+++ b/src/testRunner/unittests/services/extract/functions.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../../_namespaces/ts";
-import { testExtractSymbol } from "./helpers";
+import * as ts from "../../../_namespaces/ts.js";
+import { testExtractSymbol } from "./helpers.js";
describe("unittests:: services:: extract:: extractFunctions", () => {
testExtractFunction(
diff --git a/src/testRunner/unittests/services/extract/helpers.ts b/src/testRunner/unittests/services/extract/helpers.ts
index c3065e0a0d558..4a75167cd1563 100644
--- a/src/testRunner/unittests/services/extract/helpers.ts
+++ b/src/testRunner/unittests/services/extract/helpers.ts
@@ -1,13 +1,13 @@
-import { incrementalVerifier } from "../../../../harness/incrementalUtils";
-import { createHasErrorMessageLogger } from "../../../../harness/tsserverLogger";
-import * as Harness from "../../../_namespaces/Harness";
-import * as ts from "../../../_namespaces/ts";
-import { customTypesMap } from "../../helpers/typingsInstaller";
+import { incrementalVerifier } from "../../../../harness/incrementalUtils.js";
+import { createHasErrorMessageLogger } from "../../../../harness/tsserverLogger.js";
+import * as Harness from "../../../_namespaces/Harness.js";
+import * as ts from "../../../_namespaces/ts.js";
+import { customTypesMap } from "../../helpers/typingsInstaller.js";
import {
createServerHost,
libFile,
TestServerHost,
-} from "../../helpers/virtualFileSystemWithWatch";
+} from "../../helpers/virtualFileSystemWithWatch.js";
export interface TestProjectServiceOptions extends ts.server.ProjectServiceOptions {
host: TestServerHost;
diff --git a/src/testRunner/unittests/services/extract/ranges.ts b/src/testRunner/unittests/services/extract/ranges.ts
index b5c2745950333..9fd9bee8bebbe 100644
--- a/src/testRunner/unittests/services/extract/ranges.ts
+++ b/src/testRunner/unittests/services/extract/ranges.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../../_namespaces/ts";
-import { extractTest } from "./helpers";
+import * as ts from "../../../_namespaces/ts.js";
+import { extractTest } from "./helpers.js";
function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) {
return it(caption, () => {
diff --git a/src/testRunner/unittests/services/extract/symbolWalker.ts b/src/testRunner/unittests/services/extract/symbolWalker.ts
index 48a2121a4f565..e6c6591249d26 100644
--- a/src/testRunner/unittests/services/extract/symbolWalker.ts
+++ b/src/testRunner/unittests/services/extract/symbolWalker.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../../_namespaces/Harness";
-import * as ts from "../../../_namespaces/ts";
+import * as Harness from "../../../_namespaces/Harness.js";
+import * as ts from "../../../_namespaces/ts.js";
describe("unittests:: services:: extract:: Symbol Walker", () => {
function test(description: string, source: string, verifier: (file: ts.SourceFile, checker: ts.TypeChecker) => void) {
diff --git a/src/testRunner/unittests/services/hostNewLineSupport.ts b/src/testRunner/unittests/services/hostNewLineSupport.ts
index a509a29e16f48..3879e78d0bf68 100644
--- a/src/testRunner/unittests/services/hostNewLineSupport.ts
+++ b/src/testRunner/unittests/services/hostNewLineSupport.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: services:: hostNewLineSupport", () => {
function testLSWithFiles(settings: ts.CompilerOptions, files: Harness.Compiler.TestFile[]) {
diff --git a/src/testRunner/unittests/services/languageService.ts b/src/testRunner/unittests/services/languageService.ts
index 9e4e7568bb699..1c5b15f60eeb4 100644
--- a/src/testRunner/unittests/services/languageService.ts
+++ b/src/testRunner/unittests/services/languageService.ts
@@ -1,12 +1,12 @@
import { expect } from "chai";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: services:: languageService", () => {
const files: { [index: string]: string; } = {
diff --git a/src/testRunner/unittests/services/organizeImports.ts b/src/testRunner/unittests/services/organizeImports.ts
index 30c5abcfc0f58..23ce1cafe4cf5 100644
--- a/src/testRunner/unittests/services/organizeImports.ts
+++ b/src/testRunner/unittests/services/organizeImports.ts
@@ -1,13 +1,13 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
import {
newLineCharacter,
TestProjectService,
-} from "./extract/helpers";
+} from "./extract/helpers.js";
describe("unittests:: services:: organizeImports", () => {
describe("Sort imports", () => {
diff --git a/src/testRunner/unittests/services/patternMatcher.ts b/src/testRunner/unittests/services/patternMatcher.ts
index 8fc1e390157ec..7627bb416937f 100644
--- a/src/testRunner/unittests/services/patternMatcher.ts
+++ b/src/testRunner/unittests/services/patternMatcher.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: services:: PatternMatcher", () => {
describe("BreakIntoCharacterSpans", () => {
diff --git a/src/testRunner/unittests/services/preProcessFile.ts b/src/testRunner/unittests/services/preProcessFile.ts
index 4f22b123dc79a..c7c08f36920e4 100644
--- a/src/testRunner/unittests/services/preProcessFile.ts
+++ b/src/testRunner/unittests/services/preProcessFile.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
describe("unittests:: services:: PreProcessFile:", () => {
function test(sourceText: string, readImportFile: boolean, detectJavaScriptImports: boolean, expectedPreProcess: ts.PreProcessedFileInfo): void {
diff --git a/src/testRunner/unittests/services/textChanges.ts b/src/testRunner/unittests/services/textChanges.ts
index 00ad1d26943d5..bff7291664b0f 100644
--- a/src/testRunner/unittests/services/textChanges.ts
+++ b/src/testRunner/unittests/services/textChanges.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { notImplementedHost } from "./extract/helpers";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { notImplementedHost } from "./extract/helpers.js";
// Some tests have trailing whitespace
diff --git a/src/testRunner/unittests/services/transpile.ts b/src/testRunner/unittests/services/transpile.ts
index 7349aae1daa18..640923c53c65e 100644
--- a/src/testRunner/unittests/services/transpile.ts
+++ b/src/testRunner/unittests/services/transpile.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: services:: Transpile", () => {
interface TranspileTestSettings {
diff --git a/src/testRunner/unittests/services/utilities.ts b/src/testRunner/unittests/services/utilities.ts
index 91b82462b479e..2d0fc8876f23d 100644
--- a/src/testRunner/unittests/services/utilities.ts
+++ b/src/testRunner/unittests/services/utilities.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
describe("unittests:: services:: utilities", () => {
describe("Test findPrecedingMatchingToken,", () => {
diff --git a/src/testRunner/unittests/skipJSDocParsing.ts b/src/testRunner/unittests/skipJSDocParsing.ts
index 6498e6f214c44..4fd6e87819628 100644
--- a/src/testRunner/unittests/skipJSDocParsing.ts
+++ b/src/testRunner/unittests/skipJSDocParsing.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as Utils from "../_namespaces/Utils";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as Utils from "../_namespaces/Utils.js";
describe("unittests:: skipJSDocParsing", () => {
const Diff = require("diff");
diff --git a/src/testRunner/unittests/sys/symlinkWatching.ts b/src/testRunner/unittests/sys/symlinkWatching.ts
index f0deb2c0c9431..142c02fb215cc 100644
--- a/src/testRunner/unittests/sys/symlinkWatching.ts
+++ b/src/testRunner/unittests/sys/symlinkWatching.ts
@@ -1,17 +1,17 @@
import * as fs from "fs";
-import { IO } from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import { IO } from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
import {
defer,
Deferred,
-} from "../../_namespaces/Utils";
+} from "../../_namespaces/Utils.js";
import {
createWatchedSystem,
FileOrFolderOrSymLinkMap,
osFlavorToString,
TestServerHostOsFlavor,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: sys:: symlinkWatching::", () => {
function delayedOp(op: () => void, delay: number) {
ts.sys.setTimeout!(op, delay);
diff --git a/src/testRunner/unittests/transform.ts b/src/testRunner/unittests/transform.ts
index 85b10333a0fbc..4c4f84790ea63 100644
--- a/src/testRunner/unittests/transform.ts
+++ b/src/testRunner/unittests/transform.ts
@@ -1,14 +1,14 @@
-import * as documents from "../_namespaces/documents";
-import * as evaluator from "../_namespaces/evaluator";
-import * as fakes from "../_namespaces/fakes";
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
+import * as documents from "../_namespaces/documents.js";
+import * as evaluator from "../_namespaces/evaluator.js";
+import * as fakes from "../_namespaces/fakes.js";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
import {
NewLineKind,
ScriptTarget,
transpileModule,
-} from "../_namespaces/ts";
-import * as vfs from "../_namespaces/vfs";
+} from "../_namespaces/ts.js";
+import * as vfs from "../_namespaces/vfs.js";
describe("unittests:: TransformAPI", () => {
function replaceUndefinedWithVoid0(context: ts.TransformationContext) {
diff --git a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts
index d4375b95ed0b1..e221ca1130b68 100644
--- a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts
+++ b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts
@@ -1,12 +1,12 @@
-import { dedent } from "../../_namespaces/Utils";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
+import { dedent } from "../../_namespaces/Utils.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: outFile:: on amd modules with --out", () => {
function outFileFs(prepend?: boolean) {
diff --git a/src/testRunner/unittests/tsbuild/clean.ts b/src/testRunner/unittests/tsbuild/clean.ts
index da33f6c8a7255..341d08a12b20c 100644
--- a/src/testRunner/unittests/tsbuild/clean.ts
+++ b/src/testRunner/unittests/tsbuild/clean.ts
@@ -1,10 +1,10 @@
-import { noop } from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import { noop } from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeRun,
verifyTsc,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild - clean::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/commandLine.ts b/src/testRunner/unittests/tsbuild/commandLine.ts
index 1aa8cdb8daf0b..f0196213262fa 100644
--- a/src/testRunner/unittests/tsbuild/commandLine.ts
+++ b/src/testRunner/unittests/tsbuild/commandLine.ts
@@ -1,16 +1,16 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { compilerOptionsToConfigJson } from "../helpers/contents";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { compilerOptionsToConfigJson } from "../helpers/contents.js";
import {
noChangeRun,
TestTscEdit,
verifyTsc,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: commandLine::", () => {
describe("different options::", () => {
diff --git a/src/testRunner/unittests/tsbuild/configFileErrors.ts b/src/testRunner/unittests/tsbuild/configFileErrors.ts
index 4137e99475750..46fd9779fddd9 100644
--- a/src/testRunner/unittests/tsbuild/configFileErrors.ts
+++ b/src/testRunner/unittests/tsbuild/configFileErrors.ts
@@ -1,14 +1,14 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeRun,
verifyTsc,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: configFileErrors:: when tsconfig extends the missing file", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/configFileExtends.ts b/src/testRunner/unittests/tsbuild/configFileExtends.ts
index 5f396a4296d44..9a9fdbff9ed69 100644
--- a/src/testRunner/unittests/tsbuild/configFileExtends.ts
+++ b/src/testRunner/unittests/tsbuild/configFileExtends.ts
@@ -1,6 +1,6 @@
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: configFileExtends:: when tsconfig extends another config", () => {
function getConfigExtendsWithIncludeFs() {
diff --git a/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts b/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts
index 0f9081be8ea36..225c7a20c8e76 100644
--- a/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts
+++ b/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts
@@ -1,12 +1,12 @@
-import { jsonToReadableText } from "../helpers";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeOnlyRuns,
verifyTsc,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: when containerOnly project is referenced", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/declarationEmit.ts b/src/testRunner/unittests/tsbuild/declarationEmit.ts
index aee908cc055b4..98abd9ee0dd00 100644
--- a/src/testRunner/unittests/tsbuild/declarationEmit.ts
+++ b/src/testRunner/unittests/tsbuild/declarationEmit.ts
@@ -1,12 +1,12 @@
-import { dedent } from "../../_namespaces/Utils";
-import { FileSet } from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "../helpers/contents";
+import { dedent } from "../../_namespaces/Utils.js";
+import { FileSet } from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "../helpers/contents.js";
import {
noChangeOnlyRuns,
verifyTsc,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: declarationEmit", () => {
function getFiles(): FileSet {
diff --git a/src/testRunner/unittests/tsbuild/demo.ts b/src/testRunner/unittests/tsbuild/demo.ts
index b486d2ecefe9d..7e828d2b89b8c 100644
--- a/src/testRunner/unittests/tsbuild/demo.ts
+++ b/src/testRunner/unittests/tsbuild/demo.ts
@@ -1,10 +1,10 @@
-import * as vfs from "../../_namespaces/vfs";
+import * as vfs from "../../_namespaces/vfs.js";
import {
getFsContentsForDemoProjectReferencesCoreConfig,
getFsForDemoProjectReferences,
-} from "../helpers/demoProjectReferences";
-import { verifyTsc } from "../helpers/tsc";
-import { prependText } from "../helpers/vfs";
+} from "../helpers/demoProjectReferences.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { prependText } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: on demo project", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
index b1c2c0a425d65..57e4e789c4596 100644
--- a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
+++ b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts
@@ -1,11 +1,11 @@
-import { dedent } from "../../_namespaces/Utils";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
+import { dedent } from "../../_namespaces/Utils.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
import {
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: on project with emitDeclarationOnly set to true", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/emptyFiles.ts b/src/testRunner/unittests/tsbuild/emptyFiles.ts
index 77cbc6c2da39d..e1f324a941951 100644
--- a/src/testRunner/unittests/tsbuild/emptyFiles.ts
+++ b/src/testRunner/unittests/tsbuild/emptyFiles.ts
@@ -1,6 +1,6 @@
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild - empty files option in tsconfig", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts b/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts
index 933aa4a67f2cc..105821400a5f4 100644
--- a/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts
+++ b/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts
@@ -1,5 +1,5 @@
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
// https://github.com/microsoft/TypeScript/issues/33849
describe("unittests:: tsbuild:: exitCodeOnBogusFile:: test exit code", () => {
diff --git a/src/testRunner/unittests/tsbuild/extends.ts b/src/testRunner/unittests/tsbuild/extends.ts
index 5a2341306ce4a..05267388b0068 100644
--- a/src/testRunner/unittests/tsbuild/extends.ts
+++ b/src/testRunner/unittests/tsbuild/extends.ts
@@ -1,10 +1,10 @@
import {
getConfigDirExtendsSys,
getSymlinkedExtendsSys,
-} from "../helpers/extends";
-import { verifyTsc } from "../helpers/tsc";
-import { verifyTscWatch } from "../helpers/tscWatch";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/extends.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: extends::", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuild/fileDelete.ts b/src/testRunner/unittests/tsbuild/fileDelete.ts
index f360c5880485d..26b9893303bdd 100644
--- a/src/testRunner/unittests/tsbuild/fileDelete.ts
+++ b/src/testRunner/unittests/tsbuild/fileDelete.ts
@@ -1,9 +1,9 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { compilerOptionsToConfigJson } from "../helpers/contents";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { compilerOptionsToConfigJson } from "../helpers/contents.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: fileDelete::", () => {
function fs(childOptions: ts.CompilerOptions, mainOptions?: ts.CompilerOptions) {
diff --git a/src/testRunner/unittests/tsbuild/graphOrdering.ts b/src/testRunner/unittests/tsbuild/graphOrdering.ts
index 75780224aa7e0..09128e50dc147 100644
--- a/src/testRunner/unittests/tsbuild/graphOrdering.ts
+++ b/src/testRunner/unittests/tsbuild/graphOrdering.ts
@@ -1,7 +1,7 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
describe("unittests:: tsbuild - graph-ordering", () => {
let host: fakes.SolutionBuilderHost | undefined;
diff --git a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
index 78f292a10eb43..a321ad77ca822 100644
--- a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
+++ b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts
@@ -1,12 +1,12 @@
-import { dedent } from "../../_namespaces/Utils";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
+import { dedent } from "../../_namespaces/Utils.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: inferredTypeFromTransitiveModule::", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts b/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts
index 64a7c32d9179b..3cc15150bf951 100644
--- a/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts
+++ b/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts
@@ -1,7 +1,7 @@
-import * as Utils from "../../_namespaces/Utils";
-import { symbolLibContent } from "../helpers/contents";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import * as Utils from "../../_namespaces/Utils.js";
+import { symbolLibContent } from "../helpers/contents.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: javascriptProjectEmit::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts
index 61cb5d4aed5db..4c23ab332449d 100644
--- a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts
+++ b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts
@@ -1,11 +1,11 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: lateBoundSymbol:: interface is merged and contains late bound member", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/libraryResolution.ts b/src/testRunner/unittests/tsbuild/libraryResolution.ts
index ed854616c3ac2..eb747120ffd89 100644
--- a/src/testRunner/unittests/tsbuild/libraryResolution.ts
+++ b/src/testRunner/unittests/tsbuild/libraryResolution.ts
@@ -1,5 +1,5 @@
-import { getFsForLibResolution } from "../helpers/libraryResolution";
-import { verifyTsc } from "../helpers/tsc";
+import { getFsForLibResolution } from "../helpers/libraryResolution.js";
+import { verifyTsc } from "../helpers/tsc.js";
describe("unittests:: tsbuild:: libraryResolution:: library file resolution", () => {
function verify(libRedirection?: true) {
diff --git a/src/testRunner/unittests/tsbuild/moduleResolution.ts b/src/testRunner/unittests/tsbuild/moduleResolution.ts
index 95b597afac5e7..9ffac36f535c6 100644
--- a/src/testRunner/unittests/tsbuild/moduleResolution.ts
+++ b/src/testRunner/unittests/tsbuild/moduleResolution.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
-import * as Utils from "../../_namespaces/Utils";
-import { Symlink } from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import * as Utils from "../../_namespaces/Utils.js";
+import { Symlink } from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeOnlyRuns,
verifyTsc,
-} from "../helpers/tsc";
-import { verifyTscWatch } from "../helpers/tscWatch";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
import {
createWatchedSystem,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuild:: moduleResolution:: handles the modules and options from referenced project correctly", () => {
function sys(optionsToExtend?: ts.CompilerOptions) {
diff --git a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts
index b22d9a611996a..58493d3b9c2f0 100644
--- a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts
+++ b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts
@@ -1,8 +1,8 @@
-import * as Utils from "../../_namespaces/Utils";
-import { symbolLibContent } from "../helpers/contents";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
-import { libFile } from "../helpers/virtualFileSystemWithWatch";
+import * as Utils from "../../_namespaces/Utils.js";
+import { symbolLibContent } from "../helpers/contents.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
+import { libFile } from "../helpers/virtualFileSystemWithWatch.js";
// https://github.com/microsoft/TypeScript/issues/31696
describe("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers to referenced projects resolve correctly", () => {
diff --git a/src/testRunner/unittests/tsbuild/noCheck.ts b/src/testRunner/unittests/tsbuild/noCheck.ts
index 376289aeb7949..9cfef3a03ae23 100644
--- a/src/testRunner/unittests/tsbuild/noCheck.ts
+++ b/src/testRunner/unittests/tsbuild/noCheck.ts
@@ -1,13 +1,13 @@
import {
CommandLineOption,
optionDeclarations,
-} from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+} from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeRun,
verifyTsc,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
function verifyNoCheckFlag(variant: string) {
function verifyNoCheckWorker(subScenario: string, declAText: string, commandLineArgs: readonly string[]) {
diff --git a/src/testRunner/unittests/tsbuild/noEmit.ts b/src/testRunner/unittests/tsbuild/noEmit.ts
index 97747b8bb3b72..ad0a0220381a3 100644
--- a/src/testRunner/unittests/tsbuild/noEmit.ts
+++ b/src/testRunner/unittests/tsbuild/noEmit.ts
@@ -1,9 +1,9 @@
-import { jsonToReadableText } from "../helpers";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeRun,
verifyTsc,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: noEmit", () => {
function verifyNoEmitWorker(subScenario: string, aTsContent: string, commandLineArgs: readonly string[]) {
diff --git a/src/testRunner/unittests/tsbuild/noEmitOnError.ts b/src/testRunner/unittests/tsbuild/noEmitOnError.ts
index d52036dd6ad51..755e32a9335f8 100644
--- a/src/testRunner/unittests/tsbuild/noEmitOnError.ts
+++ b/src/testRunner/unittests/tsbuild/noEmitOnError.ts
@@ -1,9 +1,9 @@
-import * as vfs from "../../_namespaces/vfs";
-import { getFsForNoEmitOnError } from "../helpers/noEmitOnError";
+import * as vfs from "../../_namespaces/vfs.js";
+import { getFsForNoEmitOnError } from "../helpers/noEmitOnError.js";
import {
noChangeRun,
verifyTsc,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
describe("unittests:: tsbuild - with noEmitOnError", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts
index 1a6b801db5c39..016788a486db9 100644
--- a/src/testRunner/unittests/tsbuild/outFile.ts
+++ b/src/testRunner/unittests/tsbuild/outFile.ts
@@ -1,21 +1,21 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { createSolutionBuilderHostForBaseline } from "../helpers/solutionBuilder";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { createSolutionBuilderHostForBaseline } from "../helpers/solutionBuilder.js";
import {
noChangeOnlyRuns,
testTscCompileLike,
TscCompileSystem,
verifyTsc,
verifyTscCompileLike,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: outFile::", () => {
let outFileFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/outputPaths.ts b/src/testRunner/unittests/tsbuild/outputPaths.ts
index 0e856df73a0c6..4235de081d661 100644
--- a/src/testRunner/unittests/tsbuild/outputPaths.ts
+++ b/src/testRunner/unittests/tsbuild/outputPaths.ts
@@ -1,14 +1,14 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeRun,
TestTscEdit,
TscCompileSystem,
verifyTsc,
VerifyTscWithEditsInput,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild - output file paths", () => {
const noChangeProject: TestTscEdit = {
diff --git a/src/testRunner/unittests/tsbuild/publicApi.ts b/src/testRunner/unittests/tsbuild/publicApi.ts
index b75f378649e79..123e193665061 100644
--- a/src/testRunner/unittests/tsbuild/publicApi.ts
+++ b/src/testRunner/unittests/tsbuild/publicApi.ts
@@ -1,17 +1,17 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselinePrograms,
commandLineCallbacks,
toPathWithSystem,
-} from "../helpers/baseline";
+} from "../helpers/baseline.js";
import {
TscCompileSystem,
verifyTscBaseline,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: Public API with custom transformers when passed to build", () => {
let sys: TscCompileSystem;
diff --git a/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts b/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts
index 500ea68bf7af3..3f749ef7853da 100644
--- a/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts
+++ b/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts
@@ -1,11 +1,11 @@
-import { dedent } from "../../_namespaces/Utils";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
+import { dedent } from "../../_namespaces/Utils.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
import {
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: with rootDir of project reference in parentDirectory", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
index 6cc71087a210a..b12f0f1b4c947 100644
--- a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
+++ b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts
@@ -1,15 +1,15 @@
-import { CompilerOptions } from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { CompilerOptions } from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noChangeOnlyRuns,
verifyTsc,
VerifyTscWithEditsInput,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsbuild:: with resolveJsonModule option on project resolveJsonModuleAndComposite", () => {
function getProjFs(tsconfigFiles: object, additionalCompilerOptions?: CompilerOptions) {
diff --git a/src/testRunner/unittests/tsbuild/roots.ts b/src/testRunner/unittests/tsbuild/roots.ts
index ba6255a2012fb..4a760cc123a53 100644
--- a/src/testRunner/unittests/tsbuild/roots.ts
+++ b/src/testRunner/unittests/tsbuild/roots.ts
@@ -1,7 +1,7 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsbuild:: roots::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts
index 396ed09741a66..7740022960b1b 100644
--- a/src/testRunner/unittests/tsbuild/sample.ts
+++ b/src/testRunner/unittests/tsbuild/sample.ts
@@ -1,17 +1,17 @@
-import * as fakes from "../../_namespaces/fakes";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as fakes from "../../_namespaces/fakes.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
import {
libContent,
libPath,
-} from "../helpers/contents";
+} from "../helpers/contents.js";
import {
getFsForSampleProjectReferences,
getSysForSampleProjectReferences,
-} from "../helpers/sampleProjectReferences";
-import { createSolutionBuilderHostForBaseline } from "../helpers/solutionBuilder";
+} from "../helpers/sampleProjectReferences.js";
+import { createSolutionBuilderHostForBaseline } from "../helpers/solutionBuilder.js";
import {
noChangeOnlyRuns,
noChangeRun,
@@ -20,18 +20,18 @@ import {
TscCompileSystem,
verifyTsc,
verifyTscCompileLike,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
prependText,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
import {
changeToHostTrackingWrittenFiles,
libFile,
SerializeOutputOrder,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuild:: on 'sample1' project", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuild/transitiveReferences.ts b/src/testRunner/unittests/tsbuild/transitiveReferences.ts
index 0b062d537336c..20b310f95ca18 100644
--- a/src/testRunner/unittests/tsbuild/transitiveReferences.ts
+++ b/src/testRunner/unittests/tsbuild/transitiveReferences.ts
@@ -1,9 +1,9 @@
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
-import { getFsContentsForTransitiveReferences } from "../helpers/transitiveReferences";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
-import { libFile } from "../helpers/virtualFileSystemWithWatch";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
+import { getFsContentsForTransitiveReferences } from "../helpers/transitiveReferences.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
+import { libFile } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuild:: when project reference is referenced transitively", () => {
let projFs: vfs.FileSystem;
diff --git a/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts b/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts
index ebbc53b8a14bb..4debd528bee6b 100644
--- a/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts
+++ b/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts
@@ -1,10 +1,10 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: configFileErrors:: reports syntax errors in config file", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/demo.ts b/src/testRunner/unittests/tsbuildWatch/demo.ts
index 1c83351fefb3b..e79a2904f4a6f 100644
--- a/src/testRunner/unittests/tsbuildWatch/demo.ts
+++ b/src/testRunner/unittests/tsbuildWatch/demo.ts
@@ -1,9 +1,9 @@
-import { dedent } from "../../_namespaces/Utils";
+import { dedent } from "../../_namespaces/Utils.js";
import {
getFsContentsForDemoProjectReferencesCoreConfig,
getSysForDemoProjectReferences,
-} from "../helpers/demoProjectReferences";
-import { verifyTscWatch } from "../helpers/tscWatch";
+} from "../helpers/demoProjectReferences.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: with demo project", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/extends.ts b/src/testRunner/unittests/tsbuildWatch/extends.ts
index 5fc08c2795b0f..954ae0b3275c3 100644
--- a/src/testRunner/unittests/tsbuildWatch/extends.ts
+++ b/src/testRunner/unittests/tsbuildWatch/extends.ts
@@ -1,9 +1,9 @@
import {
getConfigDirExtendsSys,
modifyFirstExtendedConfigOfConfigDirExtendsSys,
-} from "../helpers/extends";
-import { verifyTscWatch } from "../helpers/tscWatch";
-import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/extends.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
+import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: extends::", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts b/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts
index a6391cdb9b7ee..5910a622372a1 100644
--- a/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts
+++ b/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts
@@ -1,5 +1,5 @@
-import { getSysForLibResolution } from "../helpers/libraryResolution";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import { getSysForLibResolution } from "../helpers/libraryResolution.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: libraryResolution:: library file resolution", () => {
function verify(libRedirection?: true) {
diff --git a/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts b/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts
index 8c72b41bdd2bb..65cad81476462 100644
--- a/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts
+++ b/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts
@@ -1,10 +1,10 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: moduleResolution", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/noEmit.ts b/src/testRunner/unittests/tsbuildWatch/noEmit.ts
index 2d74e68de2758..3f60b0b1ae021 100644
--- a/src/testRunner/unittests/tsbuildWatch/noEmit.ts
+++ b/src/testRunner/unittests/tsbuildWatch/noEmit.ts
@@ -1,10 +1,10 @@
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "../helpers/contents";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "../helpers/contents.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: with noEmit", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts b/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts
index 11d77047fb8bf..9a6b737c1668a 100644
--- a/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts
+++ b/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts
@@ -1,8 +1,8 @@
-import { getSysForNoEmitOnError } from "../helpers/noEmitOnError";
+import { getSysForNoEmitOnError } from "../helpers/noEmitOnError.js";
import {
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: with noEmitOnError", () => {
function change(caption: string, content: string): TscWatchCompileChange {
diff --git a/src/testRunner/unittests/tsbuildWatch/programUpdates.ts b/src/testRunner/unittests/tsbuildWatch/programUpdates.ts
index 492172dc37e84..b3a4f1cbfa78c 100644
--- a/src/testRunner/unittests/tsbuildWatch/programUpdates.ts
+++ b/src/testRunner/unittests/tsbuildWatch/programUpdates.ts
@@ -1,11 +1,11 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { FsContents } from "../helpers/contents";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { FsContents } from "../helpers/contents.js";
import {
getFsContentsForSampleProjectReferences,
getFsContentsForSampleProjectReferencesLogicConfig,
getSysForSampleProjectReferences,
-} from "../helpers/sampleProjectReferences";
+} from "../helpers/sampleProjectReferences.js";
import {
commonFile1,
commonFile2,
@@ -15,12 +15,12 @@ import {
runWatchBaseline,
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: program updates", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts b/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts
index 67385b1c70260..73275c27f28cd 100644
--- a/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts
+++ b/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
noopChange,
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: projectsBuilding", () => {
function pkgs(cb: (index: number) => T, count: number, startIndex?: number): T[] {
diff --git a/src/testRunner/unittests/tsbuildWatch/publicApi.ts b/src/testRunner/unittests/tsbuildWatch/publicApi.ts
index 6739656e67920..c842419f507dd 100644
--- a/src/testRunner/unittests/tsbuildWatch/publicApi.ts
+++ b/src/testRunner/unittests/tsbuildWatch/publicApi.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
createBaseline,
createSolutionBuilderWithWatchHostForBaseline,
runWatchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
it("unittests:: tsbuildWatch:: watchMode:: Public API with custom transformers", () => {
const solution: File = {
diff --git a/src/testRunner/unittests/tsbuildWatch/reexport.ts b/src/testRunner/unittests/tsbuildWatch/reexport.ts
index 168fc249a12be..8a86c08341f35 100644
--- a/src/testRunner/unittests/tsbuildWatch/reexport.ts
+++ b/src/testRunner/unittests/tsbuildWatch/reexport.ts
@@ -1,11 +1,11 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "../helpers/contents";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "../helpers/contents.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchMode:: with reexport when referenced project reexports definitions from another file", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts b/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts
index b431518ec8e12..ad830d0d92a82 100644
--- a/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts
+++ b/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts
@@ -1,16 +1,16 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
createBaseline,
createSolutionBuilderWithWatchHostForBaseline,
runWatchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsbuildWatch:: watchEnvironment:: tsbuild:: watchMode:: with different watch environments", () => {
it("watchFile on same file multiple times because file is part of multiple projects", () => {
diff --git a/src/testRunner/unittests/tsc/cancellationToken.ts b/src/testRunner/unittests/tsc/cancellationToken.ts
index a2df9298c5a9b..e66a2a51ab772 100644
--- a/src/testRunner/unittests/tsc/cancellationToken.ts
+++ b/src/testRunner/unittests/tsc/cancellationToken.ts
@@ -1,21 +1,21 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineBuildInfo,
CommandLineProgram,
-} from "../helpers/baseline";
+} from "../helpers/baseline.js";
import {
applyEdit,
createBaseline,
watchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc:: builder cancellationToken", () => {
verifyCancellation(/*useBuildInfo*/ true, "when emitting buildInfo");
diff --git a/src/testRunner/unittests/tsc/composite.ts b/src/testRunner/unittests/tsc/composite.ts
index 3b385290717e7..0a9dbfb7de6ff 100644
--- a/src/testRunner/unittests/tsc/composite.ts
+++ b/src/testRunner/unittests/tsc/composite.ts
@@ -1,10 +1,10 @@
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
import {
loadProjectFromFiles,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsc:: composite::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/declarationEmit.ts b/src/testRunner/unittests/tsc/declarationEmit.ts
index 7cda171565795..e0b224a6686ed 100644
--- a/src/testRunner/unittests/tsc/declarationEmit.ts
+++ b/src/testRunner/unittests/tsc/declarationEmit.ts
@@ -1,12 +1,12 @@
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
FileOrFolderOrSymLink,
isSymLink,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc:: declarationEmit::", () => {
interface VerifyDeclarationEmitInput {
diff --git a/src/testRunner/unittests/tsc/extends.ts b/src/testRunner/unittests/tsc/extends.ts
index 19cb499db6472..e1cd9d1c1152c 100644
--- a/src/testRunner/unittests/tsc/extends.ts
+++ b/src/testRunner/unittests/tsc/extends.ts
@@ -1,10 +1,10 @@
import {
getConfigDirExtendsSys,
getSymlinkedExtendsSys,
-} from "../helpers/extends";
-import { verifyTsc } from "../helpers/tsc";
-import { verifyTscWatch } from "../helpers/tscWatch";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/extends.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsc:: extends::", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts
index 79876b0c98d0d..4966d55db070a 100644
--- a/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts
+++ b/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts
@@ -1,7 +1,7 @@
-import { dedent } from "../../_namespaces/Utils";
-import { getFsContentsForMultipleErrorsForceConsistentCasingInFileNames } from "../helpers/forceConsistentCasingInFileNames";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { dedent } from "../../_namespaces/Utils.js";
+import { getFsContentsForMultipleErrorsForceConsistentCasingInFileNames } from "../helpers/forceConsistentCasingInFileNames.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsc:: forceConsistentCasingInFileNames::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts
index 58c4055e25dd7..1d6eeecc774d3 100644
--- a/src/testRunner/unittests/tsc/incremental.ts
+++ b/src/testRunner/unittests/tsc/incremental.ts
@@ -1,24 +1,24 @@
-import * as ts from "../../_namespaces/ts";
-import * as Utils from "../../_namespaces/Utils";
-import * as vfs from "../../_namespaces/vfs";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import * as Utils from "../../_namespaces/Utils.js";
+import * as vfs from "../../_namespaces/vfs.js";
+import { jsonToReadableText } from "../helpers.js";
import {
compilerOptionsToConfigJson,
libContent,
-} from "../helpers/contents";
-import { getFsForNoEmitOnError } from "../helpers/noEmitOnError";
+} from "../helpers/contents.js";
+import { getFsForNoEmitOnError } from "../helpers/noEmitOnError.js";
import {
noChangeOnlyRuns,
noChangeRun,
TestTscEdit,
verifyTsc,
-} from "../helpers/tsc";
+} from "../helpers/tsc.js";
import {
appendText,
loadProjectFromFiles,
prependText,
replaceText,
-} from "../helpers/vfs";
+} from "../helpers/vfs.js";
describe("unittests:: tsc:: incremental::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/libraryResolution.ts b/src/testRunner/unittests/tsc/libraryResolution.ts
index 10876782a5b50..23d73ceb48d7f 100644
--- a/src/testRunner/unittests/tsc/libraryResolution.ts
+++ b/src/testRunner/unittests/tsc/libraryResolution.ts
@@ -2,8 +2,8 @@ import {
getCommandLineArgsForLibResolution,
getFsForLibResolution,
getFsForLibResolutionUnknown,
-} from "../helpers/libraryResolution";
-import { verifyTsc } from "../helpers/tsc";
+} from "../helpers/libraryResolution.js";
+import { verifyTsc } from "../helpers/tsc.js";
describe("unittests:: tsc:: libraryResolution:: library file resolution", () => {
function verify(libRedirection?: true, withoutConfig?: true) {
diff --git a/src/testRunner/unittests/tsc/listFilesOnly.ts b/src/testRunner/unittests/tsc/listFilesOnly.ts
index d4a2dd6eab711..ac5a11f825982 100644
--- a/src/testRunner/unittests/tsc/listFilesOnly.ts
+++ b/src/testRunner/unittests/tsc/listFilesOnly.ts
@@ -1,9 +1,9 @@
-import * as Utils from "../../_namespaces/Utils";
+import * as Utils from "../../_namespaces/Utils.js";
import {
noChangeRun,
verifyTsc,
-} from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+} from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsc:: listFilesOnly::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/moduleResolution.ts b/src/testRunner/unittests/tsc/moduleResolution.ts
index 4eb42bf26225f..19326d2d89215 100644
--- a/src/testRunner/unittests/tsc/moduleResolution.ts
+++ b/src/testRunner/unittests/tsc/moduleResolution.ts
@@ -1,16 +1,16 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
getFsConentsForAlternateResultAtTypesPackageJson,
getFsContentsForAlternateResult,
getFsContentsForAlternateResultDts,
getFsContentsForAlternateResultPackageJson,
-} from "../helpers/alternateResult";
-import { libContent } from "../helpers/contents";
-import { verifyTsc } from "../helpers/tsc";
-import { verifyTscWatch } from "../helpers/tscWatch";
-import { loadProjectFromFiles } from "../helpers/vfs";
-import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/alternateResult.js";
+import { libContent } from "../helpers/contents.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
+import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc:: moduleResolution::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/projectReferences.ts b/src/testRunner/unittests/tsc/projectReferences.ts
index 95768a24c21b3..d1dda68e0784c 100644
--- a/src/testRunner/unittests/tsc/projectReferences.ts
+++ b/src/testRunner/unittests/tsc/projectReferences.ts
@@ -1,6 +1,6 @@
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsc:: projectReferences::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/projectReferencesConfig.ts b/src/testRunner/unittests/tsc/projectReferencesConfig.ts
index 819c777956fee..89febb5ffa34d 100644
--- a/src/testRunner/unittests/tsc/projectReferencesConfig.ts
+++ b/src/testRunner/unittests/tsc/projectReferencesConfig.ts
@@ -1,7 +1,7 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
function emptyModule() {
return "export { };";
diff --git a/src/testRunner/unittests/tsc/redirect.ts b/src/testRunner/unittests/tsc/redirect.ts
index fc35d072ffb66..3ffae289d6655 100644
--- a/src/testRunner/unittests/tsc/redirect.ts
+++ b/src/testRunner/unittests/tsc/redirect.ts
@@ -1,6 +1,6 @@
-import { jsonToReadableText } from "../helpers";
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsc:: redirect::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tsc/runWithoutArgs.ts b/src/testRunner/unittests/tsc/runWithoutArgs.ts
index ed26b9a4853fc..e8534f84997aa 100644
--- a/src/testRunner/unittests/tsc/runWithoutArgs.ts
+++ b/src/testRunner/unittests/tsc/runWithoutArgs.ts
@@ -1,5 +1,5 @@
-import { verifyTsc } from "../helpers/tsc";
-import { loadProjectFromFiles } from "../helpers/vfs";
+import { verifyTsc } from "../helpers/tsc.js";
+import { loadProjectFromFiles } from "../helpers/vfs.js";
describe("unittests:: tsc:: runWithoutArgs::", () => {
verifyTsc({
diff --git a/src/testRunner/unittests/tscWatch/consoleClearing.ts b/src/testRunner/unittests/tscWatch/consoleClearing.ts
index 6af2bb7d85857..74f88b9d11cb9 100644
--- a/src/testRunner/unittests/tscWatch/consoleClearing.ts
+++ b/src/testRunner/unittests/tscWatch/consoleClearing.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
createBaseline,
createWatchCompilerHostOfConfigFileForBaseline,
runWatchBaseline,
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: console clearing", () => {
const scenario = "consoleClearing";
diff --git a/src/testRunner/unittests/tscWatch/emit.ts b/src/testRunner/unittests/tscWatch/emit.ts
index 849ad87f06a81..78e92a1b89978 100644
--- a/src/testRunner/unittests/tscWatch/emit.ts
+++ b/src/testRunner/unittests/tscWatch/emit.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
const scenario = "emit";
describe("unittests:: tsc-watch:: emit with outFile or out setting", () => {
diff --git a/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts b/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts
index 9c9abf7cfd8a4..ac60d927026e7 100644
--- a/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts
+++ b/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts
@@ -1,15 +1,15 @@
-import { jsonToReadableText } from "../helpers";
-import { FsContents } from "../helpers/contents";
-import { getFsContentsForNoEmitOnError } from "../helpers/noEmitOnError";
+import { jsonToReadableText } from "../helpers.js";
+import { FsContents } from "../helpers/contents.js";
+import { getFsContentsForNoEmitOnError } from "../helpers/noEmitOnError.js";
import {
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: Emit times and Error updates in builder after program changes", () => {
const config: File = {
diff --git a/src/testRunner/unittests/tscWatch/extends.ts b/src/testRunner/unittests/tscWatch/extends.ts
index e325aaede2856..7f5e31ac2a778 100644
--- a/src/testRunner/unittests/tscWatch/extends.ts
+++ b/src/testRunner/unittests/tscWatch/extends.ts
@@ -2,9 +2,9 @@ import {
getConfigDirExtendsSys,
getSymlinkedExtendsSys,
modifyFirstExtendedConfigOfConfigDirExtendsSys,
-} from "../helpers/extends";
-import { verifyTscWatch } from "../helpers/tscWatch";
-import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/extends.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
+import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: extends::", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts
index e32f444ed4430..38718c9fd4fec 100644
--- a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts
+++ b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts
@@ -1,16 +1,16 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { getFsContentsForMultipleErrorsForceConsistentCasingInFileNames } from "../helpers/forceConsistentCasingInFileNames";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { getFsContentsForMultipleErrorsForceConsistentCasingInFileNames } from "../helpers/forceConsistentCasingInFileNames.js";
import {
TscWatchCompileChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: forceConsistentCasingInFileNames::", () => {
const loggerFile: File = {
diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts
index 8e86fdfb93fd8..a702d2c22f74f 100644
--- a/src/testRunner/unittests/tscWatch/incremental.ts
+++ b/src/testRunner/unittests/tscWatch/incremental.ts
@@ -1,20 +1,20 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { CommandLineProgram } from "../helpers/baseline";
-import { libContent } from "../helpers/contents";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { CommandLineProgram } from "../helpers/baseline.js";
+import { libContent } from "../helpers/contents.js";
import {
applyEdit,
createBaseline,
verifyTscWatch,
watchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: emit file --incremental", () => {
const project = "/users/username/projects/project";
diff --git a/src/testRunner/unittests/tscWatch/libraryResolution.ts b/src/testRunner/unittests/tscWatch/libraryResolution.ts
index e10962584aa6b..c66ef4e49eb8d 100644
--- a/src/testRunner/unittests/tscWatch/libraryResolution.ts
+++ b/src/testRunner/unittests/tscWatch/libraryResolution.ts
@@ -1,15 +1,15 @@
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
getCommandLineArgsForLibResolution,
getSysForLibResolution,
getSysForLibResolutionUnknown,
-} from "../helpers/libraryResolution";
+} from "../helpers/libraryResolution.js";
import {
TscWatchCompileChange,
TscWatchSystem,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
describe("unittests:: tsc-watch:: libraryResolution::", () => {
function commandLineArgs(withoutConfig: true | undefined) {
diff --git a/src/testRunner/unittests/tscWatch/moduleResolution.ts b/src/testRunner/unittests/tscWatch/moduleResolution.ts
index d11a142d876b8..8ffa7c9362f83 100644
--- a/src/testRunner/unittests/tscWatch/moduleResolution.ts
+++ b/src/testRunner/unittests/tscWatch/moduleResolution.ts
@@ -1,17 +1,17 @@
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
getFsConentsForAlternateResultAtTypesPackageJson,
getFsContentsForAlternateResult,
getFsContentsForAlternateResultDts,
getFsContentsForAlternateResultPackageJson,
-} from "../helpers/alternateResult";
-import { verifyTscWatch } from "../helpers/tscWatch";
+} from "../helpers/alternateResult.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: moduleResolution", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tscWatch/nodeNextWatch.ts b/src/testRunner/unittests/tscWatch/nodeNextWatch.ts
index 2f753a4e05170..6e5b9c0c7ea0b 100644
--- a/src/testRunner/unittests/tscWatch/nodeNextWatch.ts
+++ b/src/testRunner/unittests/tscWatch/nodeNextWatch.ts
@@ -1,11 +1,11 @@
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: nodeNextWatch:: emit when module emit is specified as nodenext", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts
index b583441801f83..600a45563b4a8 100644
--- a/src/testRunner/unittests/tscWatch/programUpdates.ts
+++ b/src/testRunner/unittests/tscWatch/programUpdates.ts
@@ -1,8 +1,8 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { commandLineCallbacks } from "../helpers/baseline";
-import { compilerOptionsToConfigJson } from "../helpers/contents";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { commandLineCallbacks } from "../helpers/baseline.js";
+import { compilerOptionsToConfigJson } from "../helpers/contents.js";
import {
commonFile1,
commonFile2,
@@ -13,14 +13,14 @@ import {
TscWatchCompileChange,
verifyTscWatch,
watchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
SymLink,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: program updates", () => {
const scenario = "programUpdates";
diff --git a/src/testRunner/unittests/tscWatch/projectsWithReferences.ts b/src/testRunner/unittests/tscWatch/projectsWithReferences.ts
index a6cc9f2ea89bf..e26fd44c774d9 100644
--- a/src/testRunner/unittests/tscWatch/projectsWithReferences.ts
+++ b/src/testRunner/unittests/tscWatch/projectsWithReferences.ts
@@ -1,23 +1,23 @@
-import { noop } from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { getProjectConfigWithNodeNext } from "../helpers/contents";
-import { getSysForSampleProjectReferences } from "../helpers/sampleProjectReferences";
+import { noop } from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { getProjectConfigWithNodeNext } from "../helpers/contents.js";
+import { getSysForSampleProjectReferences } from "../helpers/sampleProjectReferences.js";
import {
createSolutionBuilder,
solutionBuildWithBaseline,
-} from "../helpers/solutionBuilder";
+} from "../helpers/solutionBuilder.js";
import {
getFsContentsForTransitiveReferences,
getFsContentsForTransitiveReferencesAConfig,
getFsContentsForTransitiveReferencesBConfig,
getFsContentsForTransitiveReferencesRefsAdts,
-} from "../helpers/transitiveReferences";
-import { verifyTscWatch } from "../helpers/tscWatch";
+} from "../helpers/transitiveReferences.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: projects with references: invoking when references are already built", () => {
function verifySampleProject(withNodeNext: boolean) {
diff --git a/src/testRunner/unittests/tscWatch/resolutionCache.ts b/src/testRunner/unittests/tscWatch/resolutionCache.ts
index cb59a30499668..5df04803dc40d 100644
--- a/src/testRunner/unittests/tscWatch/resolutionCache.ts
+++ b/src/testRunner/unittests/tscWatch/resolutionCache.ts
@@ -1,19 +1,19 @@
-import * as ts from "../../_namespaces/ts";
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "../helpers/contents";
+import * as ts from "../../_namespaces/ts.js";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "../helpers/contents.js";
import {
createBaseline,
createWatchCompilerHostOfFilesAndCompilerOptionsForBaseline,
runWatchBaseline,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: resolutionCache:: tsc-watch module resolution caching", () => {
const scenario = "resolutionCache";
diff --git a/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts b/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts
index a5ba4c33c3d8f..0679965470a07 100644
--- a/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts
+++ b/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts
@@ -1,9 +1,9 @@
-import { jsonToReadableText } from "../helpers";
-import { verifyTscWatch } from "../helpers/tscWatch";
+import { jsonToReadableText } from "../helpers.js";
+import { verifyTscWatch } from "../helpers/tscWatch.js";
import {
createWatchedSystem,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: resolveJsonModuleWithIncremental:: emit file --incremental", () => {
verifyTscWatch({
diff --git a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts
index ba76f6f73f204..d4a524ca76266 100644
--- a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts
+++ b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts
@@ -1,20 +1,20 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { FsContents } from "../helpers/contents";
-import { getFsContentsForDemoProjectReferences } from "../helpers/demoProjectReferences";
-import { solutionBuildWithBaseline } from "../helpers/solutionBuilder";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { FsContents } from "../helpers/contents.js";
+import { getFsContentsForDemoProjectReferences } from "../helpers/demoProjectReferences.js";
+import { solutionBuildWithBaseline } from "../helpers/solutionBuilder.js";
import {
createBaseline,
createWatchCompilerHostOfConfigFileForBaseline,
runWatchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
FileOrFolderOrSymLink,
libFile,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: watchAPI:: with sourceOfProjectReferenceRedirect", () => {
interface VerifyWatchInput {
diff --git a/src/testRunner/unittests/tscWatch/symlinks.ts b/src/testRunner/unittests/tscWatch/symlinks.ts
index b7cfd8697df52..3e019bead1b9b 100644
--- a/src/testRunner/unittests/tscWatch/symlinks.ts
+++ b/src/testRunner/unittests/tscWatch/symlinks.ts
@@ -2,15 +2,15 @@ import {
buildMonorepoSymlinkedSiblingPackage1,
cleanMonorepoSymlinkedSiblingPackage1,
getMonorepoSymlinkedSiblingPackagesSys,
-} from "../helpers/monorepoSymlinkedSiblingPackages";
+} from "../helpers/monorepoSymlinkedSiblingPackages.js";
import {
noopChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
osFlavorToString,
TestServerHostOsFlavor,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: symlinks::", () => {
describe("monorepoSymlinkedSiblingPackages:: monorepo style sibling packages symlinked", () => {
diff --git a/src/testRunner/unittests/tscWatch/watchApi.ts b/src/testRunner/unittests/tscWatch/watchApi.ts
index 0498d83869ed9..45b43e1ea5e99 100644
--- a/src/testRunner/unittests/tscWatch/watchApi.ts
+++ b/src/testRunner/unittests/tscWatch/watchApi.ts
@@ -1,9 +1,9 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { commandLineCallbacks } from "../helpers/baseline";
-import { libContent } from "../helpers/contents";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { commandLineCallbacks } from "../helpers/baseline.js";
+import { libContent } from "../helpers/contents.js";
import {
applyEdit,
createBaseline,
@@ -12,12 +12,12 @@ import {
runWatchBaseline,
TscWatchSystem,
watchBaseline,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: watchAPI:: tsc-watch with custom module resolution", () => {
it("verify that module resolution with json extension works when returned without extension", () => {
diff --git a/src/testRunner/unittests/tscWatch/watchEnvironment.ts b/src/testRunner/unittests/tscWatch/watchEnvironment.ts
index 9310dbc1b3a62..de1d6dc34b562 100644
--- a/src/testRunner/unittests/tscWatch/watchEnvironment.ts
+++ b/src/testRunner/unittests/tscWatch/watchEnvironment.ts
@@ -1,11 +1,11 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
commonFile1,
commonFile2,
noopChange,
verifyTscWatch,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
createWatchedSystem,
File,
@@ -15,7 +15,7 @@ import {
TestServerHostOsFlavor,
Tsc_WatchDirectory,
Tsc_WatchFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsc-watch:: watchEnvironment:: tsc-watch with different polling/non polling options", () => {
const scenario = "watchEnvironment";
diff --git a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts
index aa164b8a68e41..03bd9121af320 100644
--- a/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts
+++ b/src/testRunner/unittests/tsserver/applyChangesToOpenFiles.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
commonFile1,
commonFile2,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
baselineTsserverLogs,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: applyChangesToOpenFiles", () => {
function fileContentWithComment(file: File) {
diff --git a/src/testRunner/unittests/tsserver/autoImportProvider.ts b/src/testRunner/unittests/tsserver/autoImportProvider.ts
index f0f8bb107d4a5..29267fd3ff8b9 100644
--- a/src/testRunner/unittests/tsserver/autoImportProvider.ts
+++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
const angularFormsDts: File = {
path: "/node_modules/@angular/forms/forms.d.ts",
diff --git a/src/testRunner/unittests/tsserver/auxiliaryProject.ts b/src/testRunner/unittests/tsserver/auxiliaryProject.ts
index b030d17429387..4571aa3865570 100644
--- a/src/testRunner/unittests/tsserver/auxiliaryProject.ts
+++ b/src/testRunner/unittests/tsserver/auxiliaryProject.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
protocolFileLocationFromSubstring,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: auxiliaryProject::", () => {
it("AuxiliaryProject does not remove scrips from InferredProject", () => {
diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts
index 56854dd05894e..44ea2d57e82c0 100644
--- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts
+++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts
@@ -1,14 +1,14 @@
-import { IncrementalVerifierCallbacks } from "../../../harness/incrementalUtils";
-import { LoggerWithInMemoryLogs } from "../../../harness/tsserverLogger";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import { IncrementalVerifierCallbacks } from "../../../harness/incrementalUtils.js";
+import { LoggerWithInMemoryLogs } from "../../../harness/tsserverLogger.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
logDiagnostics,
openFilesForSession,
setCompilerOptionsForInferredProjectsRequestForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
@@ -16,7 +16,7 @@ import {
libFile,
SymLink,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: CachingFileSystemInformation:: tsserverProjectSystem CachingFileSystemInformation", () => {
type CalledMapsWithSingleArg = "fileExists" | "directoryExists" | "getDirectories" | "readFile";
diff --git a/src/testRunner/unittests/tsserver/cancellationToken.ts b/src/testRunner/unittests/tsserver/cancellationToken.ts
index 7feaac7c930ca..b1562e039877a 100644
--- a/src/testRunner/unittests/tsserver/cancellationToken.ts
+++ b/src/testRunner/unittests/tsserver/cancellationToken.ts
@@ -1,11 +1,11 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
TestSession,
TestSessionRequest,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: cancellationToken", () => {
// Disable sourcemap support for the duration of the test, as sourcemapping the errors generated during this test is slow and not something we care to test
diff --git a/src/testRunner/unittests/tsserver/codeFix.ts b/src/testRunner/unittests/tsserver/codeFix.ts
index 3b22ca80a5c5d..fbf76a8f74b71 100644
--- a/src/testRunner/unittests/tsserver/codeFix.ts
+++ b/src/testRunner/unittests/tsserver/codeFix.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: codeFix::", () => {
function setup() {
diff --git a/src/testRunner/unittests/tsserver/compileOnSave.ts b/src/testRunner/unittests/tsserver/compileOnSave.ts
index 2d85bea12db48..2fc1754e4cd08 100644
--- a/src/testRunner/unittests/tsserver/compileOnSave.ts
+++ b/src/testRunner/unittests/tsserver/compileOnSave.ts
@@ -1,9 +1,9 @@
import {
createLoggerWithInMemoryLogs,
LoggerWithInMemoryLogs,
-} from "../../../harness/tsserverLogger";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+} from "../../../harness/tsserverLogger.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openExternalProjectForSession,
@@ -11,12 +11,12 @@ import {
protocolTextSpanFromSubstring,
TestSession,
toExternalFiles,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: compileOnSave:: affected list", () => {
describe("for configured projects", () => {
diff --git a/src/testRunner/unittests/tsserver/completions.ts b/src/testRunner/unittests/tsserver/completions.ts
index aeaee7cd1e82f..bf8f58bc3a088 100644
--- a/src/testRunner/unittests/tsserver/completions.ts
+++ b/src/testRunner/unittests/tsserver/completions.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: completions::", () => {
it("works", () => {
diff --git a/src/testRunner/unittests/tsserver/completionsIncomplete.ts b/src/testRunner/unittests/tsserver/completionsIncomplete.ts
index 3467e99090efe..a9c2d49230f94 100644
--- a/src/testRunner/unittests/tsserver/completionsIncomplete.ts
+++ b/src/testRunner/unittests/tsserver/completionsIncomplete.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
function createExportingModuleFile(path: string, exportPrefix: string, exportCount: number): File {
return {
diff --git a/src/testRunner/unittests/tsserver/configFileSearch.ts b/src/testRunner/unittests/tsserver/configFileSearch.ts
index bac7a19820298..3ee337cf11799 100644
--- a/src/testRunner/unittests/tsserver/configFileSearch.ts
+++ b/src/testRunner/unittests/tsserver/configFileSearch.ts
@@ -3,12 +3,12 @@ import {
closeFilesForSession,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: configFileSearch:: searching for config file", () => {
it("should stop at projectRootPath if given", () => {
diff --git a/src/testRunner/unittests/tsserver/configuredProjects.ts b/src/testRunner/unittests/tsserver/configuredProjects.ts
index 937dddc7ce3c6..3dbdae95c0187 100644
--- a/src/testRunner/unittests/tsserver/configuredProjects.ts
+++ b/src/testRunner/unittests/tsserver/configuredProjects.ts
@@ -1,24 +1,24 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { compilerOptionsToConfigJson } from "../helpers/contents";
-import { ensureErrorFreeBuild } from "../helpers/solutionBuilder";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { compilerOptionsToConfigJson } from "../helpers/contents.js";
+import { ensureErrorFreeBuild } from "../helpers/solutionBuilder.js";
import {
commonFile1,
commonFile2,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: ConfiguredProjects", () => {
it("create configured project without file list", () => {
diff --git a/src/testRunner/unittests/tsserver/declarationFileMaps.ts b/src/testRunner/unittests/tsserver/declarationFileMaps.ts
index f46a08399d372..f3418e893df4c 100644
--- a/src/testRunner/unittests/tsserver/declarationFileMaps.ts
+++ b/src/testRunner/unittests/tsserver/declarationFileMaps.ts
@@ -1,16 +1,16 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
protocolFileLocationFromSubstring,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
function checkDeclarationFiles(file: File, session: TestSession): void {
openFilesForSession([file], session);
diff --git a/src/testRunner/unittests/tsserver/documentRegistry.ts b/src/testRunner/unittests/tsserver/documentRegistry.ts
index 449c076118ae2..f135495ef6947 100644
--- a/src/testRunner/unittests/tsserver/documentRegistry.ts
+++ b/src/testRunner/unittests/tsserver/documentRegistry.ts
@@ -1,17 +1,17 @@
-import { reportDocumentRegistryStats } from "../../../harness/incrementalUtils";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import { reportDocumentRegistryStats } from "../../../harness/incrementalUtils.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: documentRegistry:: document registry in project service", () => {
const importModuleContent = `import {a} from "./module1"`;
diff --git a/src/testRunner/unittests/tsserver/duplicatePackages.ts b/src/testRunner/unittests/tsserver/duplicatePackages.ts
index 2a5078493127d..9997277e6977c 100644
--- a/src/testRunner/unittests/tsserver/duplicatePackages.ts
+++ b/src/testRunner/unittests/tsserver/duplicatePackages.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: duplicate packages", () => {
// Tests that 'moduleSpecifiers.ts' will import from the redirecting file, and not from the file it redirects to, if that can provide a global module specifier.
diff --git a/src/testRunner/unittests/tsserver/dynamicFiles.ts b/src/testRunner/unittests/tsserver/dynamicFiles.ts
index df1e603348be5..7267a3e171b72 100644
--- a/src/testRunner/unittests/tsserver/dynamicFiles.ts
+++ b/src/testRunner/unittests/tsserver/dynamicFiles.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -6,12 +6,12 @@ import {
protocolFileLocationFromSubstring,
setCompilerOptionsForInferredProjectsRequestForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
function verifyPathRecognizedAsDynamic(subscenario: string, path: string) {
it(subscenario, () => {
diff --git a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts
index f596808ad1232..0efdef96bae23 100644
--- a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts
+++ b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../../_namespaces/ts";
-import { jsonToReadableText } from "../../helpers";
+import * as ts from "../../../_namespaces/ts.js";
+import { jsonToReadableText } from "../../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../../helpers/tsserver";
+} from "../../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../../helpers/virtualFileSystemWithWatch";
+} from "../../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: events:: LargeFileReferencedEvent with large file", () => {
function getFileType(useLargeTsFile: boolean) {
diff --git a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts
index 86b70c73a0d93..78c8ebe54abe5 100644
--- a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts
+++ b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../../_namespaces/ts";
-import { jsonToReadableText } from "../../helpers";
+import * as ts from "../../../_namespaces/ts.js";
+import { jsonToReadableText } from "../../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../../helpers/tsserver";
+} from "../../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../../helpers/virtualFileSystemWithWatch";
+} from "../../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: events:: ProjectLanguageServiceStateEvent", () => {
it("language service disabled events are triggered", () => {
diff --git a/src/testRunner/unittests/tsserver/events/projectLoading.ts b/src/testRunner/unittests/tsserver/events/projectLoading.ts
index 928385c5d7d70..37563484175f1 100644
--- a/src/testRunner/unittests/tsserver/events/projectLoading.ts
+++ b/src/testRunner/unittests/tsserver/events/projectLoading.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../../_namespaces/ts";
-import { jsonToReadableText } from "../../helpers";
+import * as ts from "../../../_namespaces/ts.js";
+import { jsonToReadableText } from "../../helpers.js";
import {
baselineTsserverLogs,
createSessionWithCustomEventHandler,
@@ -8,13 +8,13 @@ import {
protocolLocationFromSubstring,
TestSession,
toExternalFiles,
-} from "../../helpers/tsserver";
+} from "../../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
TestServerHost,
-} from "../../helpers/virtualFileSystemWithWatch";
+} from "../../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: events:: ProjectLoadingStart and ProjectLoadingFinish events", () => {
const aTs: File = {
diff --git a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts
index 853d503d86467..dc811257d56a7 100644
--- a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts
+++ b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../../_namespaces/ts";
-import { jsonToReadableText } from "../../helpers";
+import * as ts from "../../../_namespaces/ts.js";
+import { jsonToReadableText } from "../../helpers.js";
import {
baselineTsserverLogs,
createSessionWithCustomEventHandler,
openFilesForSession,
TestSession,
-} from "../../helpers/tsserver";
+} from "../../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
TestServerHost,
-} from "../../helpers/virtualFileSystemWithWatch";
+} from "../../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: events:: ProjectsUpdatedInBackground", () => {
function verifyProjectsUpdatedInBackgroundEvent(scenario: string, createSession: (host: TestServerHost) => TestSession) {
diff --git a/src/testRunner/unittests/tsserver/events/watchEvents.ts b/src/testRunner/unittests/tsserver/events/watchEvents.ts
index fac344a166ed3..8093406908c50 100644
--- a/src/testRunner/unittests/tsserver/events/watchEvents.ts
+++ b/src/testRunner/unittests/tsserver/events/watchEvents.ts
@@ -1,25 +1,25 @@
import {
createLoggerWithInMemoryLogs,
LoggerWithInMemoryLogs,
-} from "../../../../harness/tsserverLogger";
+} from "../../../../harness/tsserverLogger.js";
import {
createWatchUtils,
Watches,
WatchUtils,
-} from "../../../../harness/watchUtils";
-import * as ts from "../../../_namespaces/ts";
+} from "../../../../harness/watchUtils.js";
+import * as ts from "../../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
createSessionWithCustomEventHandler,
openFilesForSession,
TestSession,
-} from "../../helpers/tsserver";
+} from "../../helpers/tsserver.js";
import {
createServerHost,
libFile,
TestServerHost,
-} from "../../helpers/virtualFileSystemWithWatch";
+} from "../../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: events:: watchEvents", () => {
interface TestServerHostWithCustomWatch extends TestServerHost {
diff --git a/src/testRunner/unittests/tsserver/exportMapCache.ts b/src/testRunner/unittests/tsserver/exportMapCache.ts
index 5d0e6bf375bd9..417dcb16aa68c 100644
--- a/src/testRunner/unittests/tsserver/exportMapCache.ts
+++ b/src/testRunner/unittests/tsserver/exportMapCache.ts
@@ -1,20 +1,20 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
protocol,
updateProjectIfDirty,
-} from "../../_namespaces/ts.server";
-import { jsonToReadableText } from "../helpers";
+} from "../../_namespaces/ts.server.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
const packageJson: File = {
path: "/package.json",
diff --git a/src/testRunner/unittests/tsserver/extends.ts b/src/testRunner/unittests/tsserver/extends.ts
index d3ad57a291f72..388837918b764 100644
--- a/src/testRunner/unittests/tsserver/extends.ts
+++ b/src/testRunner/unittests/tsserver/extends.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
getConfigDirExtendsSys,
getSymlinkedExtendsSys,
modifyFirstExtendedConfigOfConfigDirExtendsSys,
-} from "../helpers/extends";
+} from "../helpers/extends.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: extends::", () => {
it("resolves the symlink path", () => {
diff --git a/src/testRunner/unittests/tsserver/externalProjects.ts b/src/testRunner/unittests/tsserver/externalProjects.ts
index a134fb28e5573..8065081c1114b 100644
--- a/src/testRunner/unittests/tsserver/externalProjects.ts
+++ b/src/testRunner/unittests/tsserver/externalProjects.ts
@@ -1,6 +1,6 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -10,12 +10,12 @@ import {
TestSession,
toExternalFile,
toExternalFiles,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: externalProjects", () => {
describe("can handle tsconfig file name with difference casing", () => {
diff --git a/src/testRunner/unittests/tsserver/findAllReferences.ts b/src/testRunner/unittests/tsserver/findAllReferences.ts
index f2be8e7887a12..3ed4ee78ed4f4 100644
--- a/src/testRunner/unittests/tsserver/findAllReferences.ts
+++ b/src/testRunner/unittests/tsserver/findAllReferences.ts
@@ -1,12 +1,12 @@
-import { protocol } from "../../_namespaces/ts.server";
+import { protocol } from "../../_namespaces/ts.server.js";
import {
baselineTsserverLogs,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: services:: findAllReferences", () => {
it("does not try to open a file in a project that was updated and no longer has the file", () => {
diff --git a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts
index 90c0aa462116c..2e621e27083bf 100644
--- a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts
+++ b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts
@@ -1,7 +1,7 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { getFsContentsForMultipleErrorsForceConsistentCasingInFileNames } from "../helpers/forceConsistentCasingInFileNames";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { getFsContentsForMultipleErrorsForceConsistentCasingInFileNames } from "../helpers/forceConsistentCasingInFileNames.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -10,13 +10,13 @@ import {
protocolTextSpanFromSubstring,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: forceConsistentCasingInFileNames::", () => {
it("works when extends is specified with a case insensitive file system", () => {
diff --git a/src/testRunner/unittests/tsserver/formatSettings.ts b/src/testRunner/unittests/tsserver/formatSettings.ts
index 213ea404860f1..950ac34691618 100644
--- a/src/testRunner/unittests/tsserver/formatSettings.ts
+++ b/src/testRunner/unittests/tsserver/formatSettings.ts
@@ -1,11 +1,11 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: formatSettings", () => {
it("can be set globally", () => {
diff --git a/src/testRunner/unittests/tsserver/getApplicableRefactors.ts b/src/testRunner/unittests/tsserver/getApplicableRefactors.ts
index 92cbc2b0abd49..c08dd42107d31 100644
--- a/src/testRunner/unittests/tsserver/getApplicableRefactors.ts
+++ b/src/testRunner/unittests/tsserver/getApplicableRefactors.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: getApplicableRefactors", () => {
it("works when taking position", () => {
diff --git a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts
index 54025265b275f..e755bff4c3bed 100644
--- a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts
+++ b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
textSpanFromSubstring,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: getEditsForFileRename", () => {
it("works for host implementing 'resolveModuleNames' and 'getResolvedModuleWithFailedLookupLocationsFromCache'", () => {
diff --git a/src/testRunner/unittests/tsserver/getExportReferences.ts b/src/testRunner/unittests/tsserver/getExportReferences.ts
index 00ba5750c5bf8..acc691133ecb0 100644
--- a/src/testRunner/unittests/tsserver/getExportReferences.ts
+++ b/src/testRunner/unittests/tsserver/getExportReferences.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
protocolFileLocationFromSubstring,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: getExportReferences", () => {
function makeSampleSession() {
diff --git a/src/testRunner/unittests/tsserver/getFileReferences.ts b/src/testRunner/unittests/tsserver/getFileReferences.ts
index f83b8580a63e3..751ddec533b86 100644
--- a/src/testRunner/unittests/tsserver/getFileReferences.ts
+++ b/src/testRunner/unittests/tsserver/getFileReferences.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: getFileReferences", () => {
const importA = `import "./a";`;
diff --git a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts
index 90d7fa870edb1..4ed96447f0d30 100644
--- a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts
+++ b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: getMoveToRefactoringFileSuggestions", () => {
it("works for suggesting a list of files, excluding node_modules within a project", () => {
diff --git a/src/testRunner/unittests/tsserver/goToDefinition.ts b/src/testRunner/unittests/tsserver/goToDefinition.ts
index c08b827e7528c..2ffbde53847b3 100644
--- a/src/testRunner/unittests/tsserver/goToDefinition.ts
+++ b/src/testRunner/unittests/tsserver/goToDefinition.ts
@@ -1,12 +1,12 @@
-import { protocol } from "../../_namespaces/ts.server";
+import { protocol } from "../../_namespaces/ts.server.js";
import {
baselineTsserverLogs,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: services:: goToDefinition", () => {
it("does not issue errors on jsdoc in TS", () => {
diff --git a/src/testRunner/unittests/tsserver/importHelpers.ts b/src/testRunner/unittests/tsserver/importHelpers.ts
index 95228dd4266f4..426c385ba9494 100644
--- a/src/testRunner/unittests/tsserver/importHelpers.ts
+++ b/src/testRunner/unittests/tsserver/importHelpers.ts
@@ -3,8 +3,8 @@ import {
openExternalProjectForSession,
TestSession,
toExternalFile,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: importHelpers", () => {
it("should not crash in tsserver", () => {
diff --git a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts
index bab2c00a0e13e..e71aecc8c6da7 100644
--- a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts
+++ b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts
@@ -1,10 +1,10 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: inconsistentErrorInEditor", () => {
it("should not error", () => {
const host = createServerHost([]);
diff --git a/src/testRunner/unittests/tsserver/inferredProjects.ts b/src/testRunner/unittests/tsserver/inferredProjects.ts
index 2dcdb3019162a..696798d1720ef 100644
--- a/src/testRunner/unittests/tsserver/inferredProjects.ts
+++ b/src/testRunner/unittests/tsserver/inferredProjects.ts
@@ -1,19 +1,19 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { commonFile1 } from "../helpers/tscWatch";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { commonFile1 } from "../helpers/tscWatch.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
setCompilerOptionsForInferredProjectsRequestForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: inferredProjects", () => {
it("create inferred project", () => {
diff --git a/src/testRunner/unittests/tsserver/inlayHints.ts b/src/testRunner/unittests/tsserver/inlayHints.ts
index 98c5a4b78b81a..646ad6625a0e6 100644
--- a/src/testRunner/unittests/tsserver/inlayHints.ts
+++ b/src/testRunner/unittests/tsserver/inlayHints.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
commonFile1,
commonFile2,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
baselineTsserverLogs,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: inlayHints", () => {
const configFile: File = {
diff --git a/src/testRunner/unittests/tsserver/jsdocTag.ts b/src/testRunner/unittests/tsserver/jsdocTag.ts
index ea05b360783f2..af3a13eb8a0d7 100644
--- a/src/testRunner/unittests/tsserver/jsdocTag.ts
+++ b/src/testRunner/unittests/tsserver/jsdocTag.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: jsdocTag:: jsdoc @link ", () => {
const config: File = {
diff --git a/src/testRunner/unittests/tsserver/languageService.ts b/src/testRunner/unittests/tsserver/languageService.ts
index 72e972f67d336..a8a4f14634d5e 100644
--- a/src/testRunner/unittests/tsserver/languageService.ts
+++ b/src/testRunner/unittests/tsserver/languageService.ts
@@ -1,11 +1,11 @@
-import * as Utils from "../../_namespaces/Utils";
+import * as Utils from "../../_namespaces/Utils.js";
import {
baselineTsserverLogs,
logDiagnostics,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: languageService", () => {
it("should work correctly on case-sensitive file systems", () => {
diff --git a/src/testRunner/unittests/tsserver/libraryResolution.ts b/src/testRunner/unittests/tsserver/libraryResolution.ts
index 23c912ec834d1..510ab5dad8bae 100644
--- a/src/testRunner/unittests/tsserver/libraryResolution.ts
+++ b/src/testRunner/unittests/tsserver/libraryResolution.ts
@@ -1,10 +1,10 @@
-import { jsonToReadableText } from "../helpers";
-import { getServerHostForLibResolution } from "../helpers/libraryResolution";
+import { jsonToReadableText } from "../helpers.js";
+import { getServerHostForLibResolution } from "../helpers/libraryResolution.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
describe("unittests:: tsserver:: libraryResolution", () => {
it("with config", () => {
diff --git a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts
index 1db62cbb5fe16..ead6bf2432160 100644
--- a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts
+++ b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
setCompilerOptionsForInferredProjectsRequestForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: maxNodeModuleJsDepth for inferred projects", () => {
it("should be set to 2 if the project has js root files", () => {
diff --git a/src/testRunner/unittests/tsserver/metadataInResponse.ts b/src/testRunner/unittests/tsserver/metadataInResponse.ts
index fa40e5fdda6dc..feea1ab952e0e 100644
--- a/src/testRunner/unittests/tsserver/metadataInResponse.ts
+++ b/src/testRunner/unittests/tsserver/metadataInResponse.ts
@@ -1,15 +1,15 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: with metadataInResponse::", () => {
const metadata = "Extra Info";
diff --git a/src/testRunner/unittests/tsserver/moduleResolution.ts b/src/testRunner/unittests/tsserver/moduleResolution.ts
index 82b8294afe666..c42f4026c7d18 100644
--- a/src/testRunner/unittests/tsserver/moduleResolution.ts
+++ b/src/testRunner/unittests/tsserver/moduleResolution.ts
@@ -1,26 +1,26 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
getFsConentsForAlternateResultAtTypesPackageJson,
getFsContentsForAlternateResult,
getFsContentsForAlternateResultDts,
getFsContentsForAlternateResultPackageJson,
-} from "../helpers/alternateResult";
-import { libContent } from "../helpers/contents";
-import { solutionBuildWithBaseline } from "../helpers/solutionBuilder";
+} from "../helpers/alternateResult.js";
+import { libContent } from "../helpers/contents.js";
+import { solutionBuildWithBaseline } from "../helpers/solutionBuilder.js";
import {
baselineTsserverLogs,
openFilesForSession,
protocolTextSpanFromSubstring,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: moduleResolution", () => {
describe("package json file is edited", () => {
diff --git a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts
index 773d6c2c651d1..db0e436fffd22 100644
--- a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts
+++ b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
const packageJson: File = {
path: "/package.json",
diff --git a/src/testRunner/unittests/tsserver/navTo.ts b/src/testRunner/unittests/tsserver/navTo.ts
index 1df2f1e36e300..928e49c43d80f 100644
--- a/src/testRunner/unittests/tsserver/navTo.ts
+++ b/src/testRunner/unittests/tsserver/navTo.ts
@@ -1,15 +1,15 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: navigate-to for javascript project", () => {
it("should not include type symbols", () => {
diff --git a/src/testRunner/unittests/tsserver/occurences.ts b/src/testRunner/unittests/tsserver/occurences.ts
index c65d9c8238456..0cf6c90b406aa 100644
--- a/src/testRunner/unittests/tsserver/occurences.ts
+++ b/src/testRunner/unittests/tsserver/occurences.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: occurrence highlight on string", () => {
it("should be marked if only on string values", () => {
diff --git a/src/testRunner/unittests/tsserver/openFile.ts b/src/testRunner/unittests/tsserver/openFile.ts
index bfc32d87f0859..21f84ca257247 100644
--- a/src/testRunner/unittests/tsserver/openFile.ts
+++ b/src/testRunner/unittests/tsserver/openFile.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -8,12 +8,12 @@ import {
TestSession,
toExternalFile,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: Open-file", () => {
it("can be reloaded with empty content", () => {
diff --git a/src/testRunner/unittests/tsserver/packageJsonInfo.ts b/src/testRunner/unittests/tsserver/packageJsonInfo.ts
index f258be6cab492..28aedef03d6de 100644
--- a/src/testRunner/unittests/tsserver/packageJsonInfo.ts
+++ b/src/testRunner/unittests/tsserver/packageJsonInfo.ts
@@ -1,13 +1,13 @@
-import { jsonToReadableText } from "../helpers";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
const tsConfig: File = {
path: "/tsconfig.json",
diff --git a/src/testRunner/unittests/tsserver/partialSemanticServer.ts b/src/testRunner/unittests/tsserver/partialSemanticServer.ts
index 23264937e22ed..ef01610da836a 100644
--- a/src/testRunner/unittests/tsserver/partialSemanticServer.ts
+++ b/src/testRunner/unittests/tsserver/partialSemanticServer.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -6,12 +6,12 @@ import {
protocolFileLocationFromSubstring,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: Semantic operations on partialSemanticServer", () => {
function setup() {
diff --git a/src/testRunner/unittests/tsserver/plugins.ts b/src/testRunner/unittests/tsserver/plugins.ts
index 9d24ecb3c1aaf..c0c5c43cdd7b4 100644
--- a/src/testRunner/unittests/tsserver/plugins.ts
+++ b/src/testRunner/unittests/tsserver/plugins.ts
@@ -1,17 +1,17 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: plugins:: loading", () => {
const testProtocolCommand = "testProtocolCommand";
diff --git a/src/testRunner/unittests/tsserver/pluginsAsync.ts b/src/testRunner/unittests/tsserver/pluginsAsync.ts
index 7c4b912fbd798..647f0bbbde684 100644
--- a/src/testRunner/unittests/tsserver/pluginsAsync.ts
+++ b/src/testRunner/unittests/tsserver/pluginsAsync.ts
@@ -1,18 +1,18 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
defer,
Deferred,
-} from "../../_namespaces/Utils";
+} from "../../_namespaces/Utils.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: pluginsAsync:: async loaded plugins", () => {
function setup(globalPlugins: string[]) {
diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts
index 552da6a0875b3..d5adbef939760 100644
--- a/src/testRunner/unittests/tsserver/projectErrors.ts
+++ b/src/testRunner/unittests/tsserver/projectErrors.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -11,14 +11,14 @@ import {
toExternalFiles,
verifyGetErrRequest,
verifyGetErrScenario,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
Folder,
libFile,
TestServerHostOsFlavor,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: projectErrors::", () => {
it("external project - diagnostics for missing files", () => {
diff --git a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts
index 80cf128b37c82..a22c539d567d6 100644
--- a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts
+++ b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts
@@ -1,17 +1,17 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
-import { ensureErrorFreeBuild } from "../helpers/solutionBuilder";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
+import { ensureErrorFreeBuild } from "../helpers/solutionBuilder.js";
import {
baselineTsserverLogs,
openFilesForSession,
protocolToLocation,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: with project references and compile on save", () => {
const dependecyLocation = `/user/username/projects/myproject/dependency`;
diff --git a/src/testRunner/unittests/tsserver/projectReferenceErrors.ts b/src/testRunner/unittests/tsserver/projectReferenceErrors.ts
index d8950ebe20f87..98b1506ad8ac9 100644
--- a/src/testRunner/unittests/tsserver/projectReferenceErrors.ts
+++ b/src/testRunner/unittests/tsserver/projectReferenceErrors.ts
@@ -1,19 +1,19 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "../helpers/contents";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "../helpers/contents.js";
import {
baselineTsserverLogs,
GetErrForProjectDiagnostics,
openFilesForSession,
TestSession,
verifyGetErrScenario,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: projectReferenceErrors:: with project references and error reporting", () => {
const dependecyLocation = `/user/username/projects/myproject/dependency`;
diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts
index e54644c40ed96..4f692d60cb2f4 100644
--- a/src/testRunner/unittests/tsserver/projectReferences.ts
+++ b/src/testRunner/unittests/tsserver/projectReferences.ts
@@ -1,7 +1,7 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { solutionBuildWithBaseline } from "../helpers/solutionBuilder";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { solutionBuildWithBaseline } from "../helpers/solutionBuilder.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -11,13 +11,13 @@ import {
protocolLocationFromSubstring,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: with project references and tsbuild", () => {
describe("with container project", () => {
diff --git a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts
index c02a39264febe..cf8ea4992218b 100644
--- a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts
+++ b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -7,13 +7,13 @@ import {
openFilesForSession,
TestSession,
TestSessionRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: projectReferencesSourcemap:: with project references and tsbuild source map", () => {
const dependecyLocation = `/user/username/projects/myproject/dependency`;
diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts
index 6dac7fa3763ab..61c1ceb4c3bcb 100644
--- a/src/testRunner/unittests/tsserver/projects.ts
+++ b/src/testRunner/unittests/tsserver/projects.ts
@@ -1,10 +1,10 @@
-import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
commonFile1,
commonFile2,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -17,14 +17,14 @@ import {
toExternalFile,
toExternalFiles,
verifyGetErrRequest,
-} from "../helpers/tsserver";
-import { customTypesMap } from "../helpers/typingsInstaller";
+} from "../helpers/tsserver.js";
+import { customTypesMap } from "../helpers/typingsInstaller.js";
import {
createServerHost,
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: projects::", () => {
it("handles the missing files - that were added to program because they were added with ///[ {
diff --git a/src/testRunner/unittests/tsserver/projectsWithReferences.ts b/src/testRunner/unittests/tsserver/projectsWithReferences.ts
index 66e11ebcc9187..6617d814afbbe 100644
--- a/src/testRunner/unittests/tsserver/projectsWithReferences.ts
+++ b/src/testRunner/unittests/tsserver/projectsWithReferences.ts
@@ -1,15 +1,15 @@
-import { jsonToReadableText } from "../helpers";
-import { getFsContentsForSampleProjectReferences } from "../helpers/sampleProjectReferences";
+import { jsonToReadableText } from "../helpers.js";
+import { getFsContentsForSampleProjectReferences } from "../helpers/sampleProjectReferences.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: projects with references: invoking when references are already built", () => {
it("on sample project", () => {
diff --git a/src/testRunner/unittests/tsserver/refactors.ts b/src/testRunner/unittests/tsserver/refactors.ts
index 59dbbce0c66bf..141c03c0197c2 100644
--- a/src/testRunner/unittests/tsserver/refactors.ts
+++ b/src/testRunner/unittests/tsserver/refactors.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: refactors", () => {
it("use formatting options", () => {
diff --git a/src/testRunner/unittests/tsserver/reload.ts b/src/testRunner/unittests/tsserver/reload.ts
index e7b610c7bdcf1..9e7e74b24d39e 100644
--- a/src/testRunner/unittests/tsserver/reload.ts
+++ b/src/testRunner/unittests/tsserver/reload.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: reload", () => {
it("should work with temp file", () => {
diff --git a/src/testRunner/unittests/tsserver/reloadProjects.ts b/src/testRunner/unittests/tsserver/reloadProjects.ts
index 5c0a8b4934a9d..9e20342e6991b 100644
--- a/src/testRunner/unittests/tsserver/reloadProjects.ts
+++ b/src/testRunner/unittests/tsserver/reloadProjects.ts
@@ -1,18 +1,18 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openExternalProjectForSession,
openFilesForSession,
setCompilerOptionsForInferredProjectsRequestForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
TestServerHost,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: reloadProjects", () => {
const configFile: File = {
diff --git a/src/testRunner/unittests/tsserver/rename.ts b/src/testRunner/unittests/tsserver/rename.ts
index a46816203ece4..433e26f061121 100644
--- a/src/testRunner/unittests/tsserver/rename.ts
+++ b/src/testRunner/unittests/tsserver/rename.ts
@@ -1,18 +1,18 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { libContent } from "../helpers/contents";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { libContent } from "../helpers/contents.js";
import {
baselineTsserverLogs,
openFilesForSession,
protocolFileLocationFromSubstring,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: rename", () => {
it("works with fileToRename", () => {
diff --git a/src/testRunner/unittests/tsserver/resolutionCache.ts b/src/testRunner/unittests/tsserver/resolutionCache.ts
index 507e236f6cd50..ba95fda4f5b8b 100644
--- a/src/testRunner/unittests/tsserver/resolutionCache.ts
+++ b/src/testRunner/unittests/tsserver/resolutionCache.ts
@@ -1,7 +1,7 @@
-import * as ts from "../../_namespaces/ts";
-import * as Utils from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
-import { compilerOptionsToConfigJson } from "../helpers/contents";
+import * as ts from "../../_namespaces/ts.js";
+import * as Utils from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
+import { compilerOptionsToConfigJson } from "../helpers/contents.js";
import {
baselineTsserverLogs,
openExternalProjectForSession,
@@ -10,12 +10,12 @@ import {
TestSession,
toExternalFiles,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: resolutionCache:: tsserverProjectSystem extra resolution pass in server host", () => {
it("can load typings that are proper modules", () => {
diff --git a/src/testRunner/unittests/tsserver/session.ts b/src/testRunner/unittests/tsserver/session.ts
index bc1f17167d58a..e25464bab471d 100644
--- a/src/testRunner/unittests/tsserver/session.ts
+++ b/src/testRunner/unittests/tsserver/session.ts
@@ -1,12 +1,12 @@
import { expect } from "chai";
-import { incrementalVerifier } from "../../../harness/incrementalUtils";
+import { incrementalVerifier } from "../../../harness/incrementalUtils.js";
import {
createHasErrorMessageLogger,
nullLogger,
-} from "../../../harness/tsserverLogger";
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+} from "../../../harness/tsserverLogger.js";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
let lastWrittenToHost: string;
const noopFileWatcher: ts.FileWatcher = { close: ts.noop };
diff --git a/src/testRunner/unittests/tsserver/skipLibCheck.ts b/src/testRunner/unittests/tsserver/skipLibCheck.ts
index e31d8103fbfb8..fc792a329662c 100644
--- a/src/testRunner/unittests/tsserver/skipLibCheck.ts
+++ b/src/testRunner/unittests/tsserver/skipLibCheck.ts
@@ -1,13 +1,13 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openExternalProjectForSession,
openFilesForSession,
TestSession,
toExternalFiles,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: with skipLibCheck", () => {
it("should be turned on for js-only inferred projects", () => {
diff --git a/src/testRunner/unittests/tsserver/smartSelection.ts b/src/testRunner/unittests/tsserver/smartSelection.ts
index b784c611520b2..94d738be3544f 100644
--- a/src/testRunner/unittests/tsserver/smartSelection.ts
+++ b/src/testRunner/unittests/tsserver/smartSelection.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
// More tests in fourslash/smartSelection_*
describe("unittests:: tsserver:: smartSelection", () => {
diff --git a/src/testRunner/unittests/tsserver/symLinks.ts b/src/testRunner/unittests/tsserver/symLinks.ts
index 2b25999573e9b..77ba8c49c28d1 100644
--- a/src/testRunner/unittests/tsserver/symLinks.ts
+++ b/src/testRunner/unittests/tsserver/symLinks.ts
@@ -1,11 +1,11 @@
-import * as ts from "../../_namespaces/ts";
-import { dedent } from "../../_namespaces/Utils";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { dedent } from "../../_namespaces/Utils.js";
+import { jsonToReadableText } from "../helpers.js";
import {
buildMonorepoSymlinkedSiblingPackage1,
cleanMonorepoSymlinkedSiblingPackage1,
getMonorepoSymlinkedSiblingPackagesSys,
-} from "../helpers/monorepoSymlinkedSiblingPackages";
+} from "../helpers/monorepoSymlinkedSiblingPackages.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -13,7 +13,7 @@ import {
protocolLocationFromSubstring,
TestSession,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
@@ -22,7 +22,7 @@ import {
SymLink,
TestServerHost,
TestServerHostOsFlavor,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: symLinks::", () => {
it("rename in common file renames all project", () => {
diff --git a/src/testRunner/unittests/tsserver/symlinkCache.ts b/src/testRunner/unittests/tsserver/symlinkCache.ts
index fd004772ee9c0..41bf308d299ad 100644
--- a/src/testRunner/unittests/tsserver/symlinkCache.ts
+++ b/src/testRunner/unittests/tsserver/symlinkCache.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
SymLink,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: symlinkCache", () => {
it("contains symlinks discovered by project references resolution after program creation", () => {
diff --git a/src/testRunner/unittests/tsserver/syntacticServer.ts b/src/testRunner/unittests/tsserver/syntacticServer.ts
index 53e9a25099d19..4f87f42987a6c 100644
--- a/src/testRunner/unittests/tsserver/syntacticServer.ts
+++ b/src/testRunner/unittests/tsserver/syntacticServer.ts
@@ -1,4 +1,4 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -6,12 +6,12 @@ import {
protocolFileLocationFromSubstring,
TestSession,
TestSessionRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: Semantic operations on Syntax server", () => {
function setup() {
diff --git a/src/testRunner/unittests/tsserver/syntaxOperations.ts b/src/testRunner/unittests/tsserver/syntaxOperations.ts
index 853b69fbf378f..4adc2c1ed19fa 100644
--- a/src/testRunner/unittests/tsserver/syntaxOperations.ts
+++ b/src/testRunner/unittests/tsserver/syntaxOperations.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: syntax operations", () => {
it("works when file is removed and added with different content", () => {
diff --git a/src/testRunner/unittests/tsserver/telemetry.ts b/src/testRunner/unittests/tsserver/telemetry.ts
index 6dab706cab254..e4cb6d611769d 100644
--- a/src/testRunner/unittests/tsserver/telemetry.ts
+++ b/src/testRunner/unittests/tsserver/telemetry.ts
@@ -1,5 +1,5 @@
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -7,11 +7,11 @@ import {
openFilesForSession,
TestSession,
toExternalFiles,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: project telemetry", () => {
it("does nothing for inferred project", () => {
diff --git a/src/testRunner/unittests/tsserver/textStorage.ts b/src/testRunner/unittests/tsserver/textStorage.ts
index e3a617e430760..23ae4d210ddb4 100644
--- a/src/testRunner/unittests/tsserver/textStorage.ts
+++ b/src/testRunner/unittests/tsserver/textStorage.ts
@@ -1,10 +1,10 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: Text storage", () => {
const f = {
diff --git a/src/testRunner/unittests/tsserver/typeAquisition.ts b/src/testRunner/unittests/tsserver/typeAquisition.ts
index f8f543a1511bb..a4a32407ee0c2 100644
--- a/src/testRunner/unittests/tsserver/typeAquisition.ts
+++ b/src/testRunner/unittests/tsserver/typeAquisition.ts
@@ -1,12 +1,12 @@
-import { jsonToReadableText } from "../helpers";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openExternalProjectForSession,
openFilesForSession,
TestSession,
toExternalFile,
-} from "../helpers/tsserver";
-import { createServerHost } from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/tsserver.js";
+import { createServerHost } from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: typeAquisition:: autoDiscovery", () => {
it("does not depend on extension", () => {
diff --git a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts
index 41c35cd0ffe92..d2fe43b15b522 100644
--- a/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts
+++ b/src/testRunner/unittests/tsserver/typeOnlyImportChains.ts
@@ -1,14 +1,14 @@
-import * as ts from "../../_namespaces/ts";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: typeOnlyImportChains", () => {
it("named export -> type-only namespace import -> named export -> named import", () => {
diff --git a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts
index af0757d12889f..f78772759bde4 100644
--- a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts
+++ b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts
@@ -1,14 +1,14 @@
-import { jsonToReadableText } from "../helpers";
+import { jsonToReadableText } from "../helpers.js";
import {
baselineTsserverLogs,
openFilesForSession,
TestSession,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: typeReferenceDirectives", () => {
it("when typeReferenceDirective contains UpperCasePackage", () => {
diff --git a/src/testRunner/unittests/tsserver/typingsInstaller.ts b/src/testRunner/unittests/tsserver/typingsInstaller.ts
index cc4c9633e5347..38d05aa1ee1b0 100644
--- a/src/testRunner/unittests/tsserver/typingsInstaller.ts
+++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts
@@ -1,8 +1,8 @@
import {
createLoggerWithInMemoryLogs,
replaceAll,
-} from "../../../harness/tsserverLogger";
-import * as ts from "../../_namespaces/ts";
+} from "../../../harness/tsserverLogger.js";
+import * as ts from "../../_namespaces/ts.js";
import {
baselineTsserverLogs,
closeFilesForSession,
@@ -13,24 +13,24 @@ import {
TestSession,
TestSessionRequest,
toExternalFile,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createTypesRegistry,
customTypesMap,
FileWithPackageName,
loggerToTypingsInstallerLog,
-} from "../helpers/typingsInstaller";
+} from "../helpers/typingsInstaller.js";
import {
changeToHostTrackingWrittenFiles,
createServerHost,
File,
libFile,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
import validatePackageName = ts.JsTyping.validatePackageName;
import NameValidationResult = ts.JsTyping.NameValidationResult;
-import { stringifyIndented } from "../../_namespaces/ts.server";
-import { jsonToReadableText } from "../helpers";
+import { stringifyIndented } from "../../_namespaces/ts.server.js";
+import { jsonToReadableText } from "../helpers.js";
describe("unittests:: tsserver:: typingsInstaller:: local module", () => {
it("should not be picked up", () => {
diff --git a/src/testRunner/unittests/tsserver/versionCache.ts b/src/testRunner/unittests/tsserver/versionCache.ts
index fefccff86f876..aa89a12f416b3 100644
--- a/src/testRunner/unittests/tsserver/versionCache.ts
+++ b/src/testRunner/unittests/tsserver/versionCache.ts
@@ -1,5 +1,5 @@
-import * as Harness from "../../_namespaces/Harness";
-import * as ts from "../../_namespaces/ts";
+import * as Harness from "../../_namespaces/Harness.js";
+import * as ts from "../../_namespaces/ts.js";
function editFlat(position: number, deletedLength: number, newText: string, source: string) {
return source.substring(0, position) + newText + source.substring(position + deletedLength, source.length);
diff --git a/src/testRunner/unittests/tsserver/watchEnvironment.ts b/src/testRunner/unittests/tsserver/watchEnvironment.ts
index 58136c4aaa88a..4e6ccfa7319ac 100644
--- a/src/testRunner/unittests/tsserver/watchEnvironment.ts
+++ b/src/testRunner/unittests/tsserver/watchEnvironment.ts
@@ -1,13 +1,13 @@
import {
createLoggerWithInMemoryLogs,
LoggerWithInMemoryLogs,
-} from "../../../harness/tsserverLogger";
-import * as ts from "../../_namespaces/ts";
-import { jsonToReadableText } from "../helpers";
+} from "../../../harness/tsserverLogger.js";
+import * as ts from "../../_namespaces/ts.js";
+import { jsonToReadableText } from "../helpers.js";
import {
commonFile1,
commonFile2,
-} from "../helpers/tscWatch";
+} from "../helpers/tscWatch.js";
import {
baselineTsserverLogs,
openExternalProjectForSession,
@@ -17,14 +17,14 @@ import {
TestSession,
toExternalFiles,
verifyGetErrRequest,
-} from "../helpers/tsserver";
+} from "../helpers/tsserver.js";
import {
createServerHost,
File,
libFile,
TestServerHostOsFlavor,
Tsc_WatchDirectory,
-} from "../helpers/virtualFileSystemWithWatch";
+} from "../helpers/virtualFileSystemWithWatch.js";
describe("unittests:: tsserver:: watchEnvironment:: tsserverProjectSystem watchDirectories implementation", () => {
function verifyCompletionListWithNewFileInSubFolder(scenario: string, tscWatchDirectory: Tsc_WatchDirectory) {
diff --git a/src/testRunner/unittests/typeParameterIsPossiblyReferenced.ts b/src/testRunner/unittests/typeParameterIsPossiblyReferenced.ts
index b97d9ffcb951f..d0c4a26a16e04 100644
--- a/src/testRunner/unittests/typeParameterIsPossiblyReferenced.ts
+++ b/src/testRunner/unittests/typeParameterIsPossiblyReferenced.ts
@@ -1,8 +1,8 @@
-import * as documents from "../_namespaces/documents";
-import * as fakes from "../_namespaces/fakes";
-import * as Harness from "../_namespaces/Harness";
-import * as ts from "../_namespaces/ts";
-import * as vfs from "../_namespaces/vfs";
+import * as documents from "../_namespaces/documents.js";
+import * as fakes from "../_namespaces/fakes.js";
+import * as Harness from "../_namespaces/Harness.js";
+import * as ts from "../_namespaces/ts.js";
+import * as vfs from "../_namespaces/vfs.js";
describe("unittests :: internalApi :: typeParameterIsPossiblyReferenced", () => {
it("with type parameter aliasing", () => {
diff --git a/src/tsc/_namespaces/ts.ts b/src/tsc/_namespaces/ts.ts
index b9fd7c710ab69..67be3307c1ecc 100644
--- a/src/tsc/_namespaces/ts.ts
+++ b/src/tsc/_namespaces/ts.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
+export * from "../../compiler/_namespaces/ts.js";
diff --git a/src/tsc/tsc.ts b/src/tsc/tsc.ts
index d7c3c42a01f61..f3f22307e3e67 100644
--- a/src/tsc/tsc.ts
+++ b/src/tsc/tsc.ts
@@ -1,4 +1,4 @@
-import * as ts from "./_namespaces/ts";
+import * as ts from "./_namespaces/ts.js";
// This file actually uses arguments passed on commandline and executes it
diff --git a/src/tsserver/common.ts b/src/tsserver/common.ts
index bdf6ca2a17ea0..01fd6db7dcf7c 100644
--- a/src/tsserver/common.ts
+++ b/src/tsserver/common.ts
@@ -1,4 +1,4 @@
-import * as ts from "../typescript/typescript";
+import * as ts from "../typescript/typescript.js";
/** @internal */
export function getLogLevel(level: string | undefined) {
diff --git a/src/tsserver/nodeServer.ts b/src/tsserver/nodeServer.ts
index 15b45588c9a5a..280b0d3b630df 100644
--- a/src/tsserver/nodeServer.ts
+++ b/src/tsserver/nodeServer.ts
@@ -23,13 +23,13 @@ import {
validateLocaleAndSetLanguage,
versionMajorMinor,
WatchOptions,
-} from "../typescript/typescript";
-import * as ts from "../typescript/typescript";
+} from "../typescript/typescript.js";
+import * as ts from "../typescript/typescript.js";
import {
getLogLevel,
StartInput,
StartSessionOptions,
-} from "./common";
+} from "./common.js";
interface LogOptions {
file?: string;
diff --git a/src/tsserver/server.ts b/src/tsserver/server.ts
index 3049187b8be1a..dac80d8496f2f 100644
--- a/src/tsserver/server.ts
+++ b/src/tsserver/server.ts
@@ -1,6 +1,6 @@
-import * as ts from "../typescript/typescript";
-import { StartInput } from "./common";
-import { initializeNodeSystem } from "./nodeServer";
+import * as ts from "../typescript/typescript.js";
+import { StartInput } from "./common.js";
+import { initializeNodeSystem } from "./nodeServer.js";
function findArgumentStringArray(argName: string): readonly string[] {
const arg = ts.server.findArgument(argName);
diff --git a/src/typescript/_namespaces/ts.server.ts b/src/typescript/_namespaces/ts.server.ts
index 21b0d0335fbd0..6e53b0a9aef37 100644
--- a/src/typescript/_namespaces/ts.server.ts
+++ b/src/typescript/_namespaces/ts.server.ts
@@ -1,4 +1,4 @@
/* Generated file to emulate the ts.server namespace. */
-export * from "../../jsTyping/_namespaces/ts.server";
-export * from "../../server/_namespaces/ts.server";
+export * from "../../jsTyping/_namespaces/ts.server.js";
+export * from "../../server/_namespaces/ts.server.js";
diff --git a/src/typescript/_namespaces/ts.ts b/src/typescript/_namespaces/ts.ts
index 3060a64378787..1c1a9fcb82264 100644
--- a/src/typescript/_namespaces/ts.ts
+++ b/src/typescript/_namespaces/ts.ts
@@ -1,8 +1,8 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-export * from "../../jsTyping/_namespaces/ts";
-export * from "../../services/_namespaces/ts";
-export * from "../../server/_namespaces/ts";
-import * as server from "./ts.server";
+export * from "../../compiler/_namespaces/ts.js";
+export * from "../../jsTyping/_namespaces/ts.js";
+export * from "../../services/_namespaces/ts.js";
+export * from "../../server/_namespaces/ts.js";
+import * as server from "./ts.server.js";
export { server };
diff --git a/src/typescript/typescript.ts b/src/typescript/typescript.ts
index 0df80b850032d..9e54bbe9c15b0 100644
--- a/src/typescript/typescript.ts
+++ b/src/typescript/typescript.ts
@@ -1,7 +1,7 @@
import {
Debug,
LogLevel,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
// enable deprecation logging
declare const console: any;
@@ -22,4 +22,4 @@ if (typeof console !== "undefined") {
};
}
-export * from "./_namespaces/ts";
+export * from "./_namespaces/ts.js";
diff --git a/src/typingsInstaller/nodeTypingsInstaller.ts b/src/typingsInstaller/nodeTypingsInstaller.ts
index 7fb5b38e73367..836b64473cb05 100644
--- a/src/typingsInstaller/nodeTypingsInstaller.ts
+++ b/src/typingsInstaller/nodeTypingsInstaller.ts
@@ -11,8 +11,8 @@ import {
sys,
toPath,
version,
-} from "../typescript/typescript";
-import * as ts from "../typescript/typescript";
+} from "../typescript/typescript.js";
+import * as ts from "../typescript/typescript.js";
class FileLog implements ts.server.typingsInstaller.Log {
constructor(private logFile: string | undefined) {
diff --git a/src/typingsInstallerCore/_namespaces/ts.server.ts b/src/typingsInstallerCore/_namespaces/ts.server.ts
index 252296d2335cf..ca409c9f6cf20 100644
--- a/src/typingsInstallerCore/_namespaces/ts.server.ts
+++ b/src/typingsInstallerCore/_namespaces/ts.server.ts
@@ -1,5 +1,5 @@
/* Generated file to emulate the ts.server namespace. */
-export * from "../../jsTyping/_namespaces/ts.server";
-import * as typingsInstaller from "./ts.server.typingsInstaller";
+export * from "../../jsTyping/_namespaces/ts.server.js";
+import * as typingsInstaller from "./ts.server.typingsInstaller.js";
export { typingsInstaller };
diff --git a/src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts b/src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts
index 2964824604001..fb809d455542a 100644
--- a/src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts
+++ b/src/typingsInstallerCore/_namespaces/ts.server.typingsInstaller.ts
@@ -1,3 +1,3 @@
/* Generated file to emulate the ts.server.typingsInstaller namespace. */
-export * from "../typingsInstaller";
+export * from "../typingsInstaller.js";
diff --git a/src/typingsInstallerCore/_namespaces/ts.ts b/src/typingsInstallerCore/_namespaces/ts.ts
index aa90e7daa8eae..aaadedb2ed647 100644
--- a/src/typingsInstallerCore/_namespaces/ts.ts
+++ b/src/typingsInstallerCore/_namespaces/ts.ts
@@ -1,6 +1,6 @@
/* Generated file to emulate the ts namespace. */
-export * from "../../compiler/_namespaces/ts";
-export * from "../../jsTyping/_namespaces/ts";
-import * as server from "./ts.server";
+export * from "../../compiler/_namespaces/ts.js";
+export * from "../../jsTyping/_namespaces/ts.js";
+import * as server from "./ts.server.js";
export { server };
diff --git a/src/typingsInstallerCore/typingsInstaller.ts b/src/typingsInstallerCore/typingsInstaller.ts
index 412faeb4b42d1..6b49ab576392c 100644
--- a/src/typingsInstallerCore/typingsInstaller.ts
+++ b/src/typingsInstallerCore/typingsInstaller.ts
@@ -18,7 +18,7 @@ import {
Version,
version,
versionMajorMinor,
-} from "./_namespaces/ts";
+} from "./_namespaces/ts.js";
import {
ActionPackageInstalled,
ActionSet,
@@ -39,7 +39,7 @@ import {
TypesRegistryResponse,
TypingInstallerRequestUnion,
WatchTypingLocations,
-} from "./_namespaces/ts.server";
+} from "./_namespaces/ts.server.js";
interface NpmConfig {
devDependencies: MapLike;
]