From fc515fef903c165e3e87d097dc8072c34a62aa13 Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 3 Aug 2026 16:12:16 -0700 Subject: [PATCH 1/3] Convert TypeScript sources to NodeNext ESM Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2af8a1f5-c78a-435b-805d-0328d6cd4106 --- .vscode/launch.json | 12 +- __mocks__/vscode.ts | 6 +- baseJestConfig.mjs | 23 ++- eslint.config.mjs | 10 +- package.json | 24 ++- src/activateOmniSharp.ts | 18 +- src/activateRoslyn.ts | 40 ++-- src/checkSupportedPlatform.ts | 4 +- src/common.ts | 2 +- src/compositeDisposable.ts | 2 +- src/coreclrDebug/activate.ts | 26 +-- src/coreclrDebug/util.ts | 6 +- src/csharpExtensionExports.ts | 8 +- src/eventStream.ts | 2 +- src/installRuntimeDependencies.ts | 14 +- src/lsptoolshost/activate.ts | 55 ++--- src/lsptoolshost/autoInsert/onAutoInsert.ts | 4 +- .../autoInsert/onAutoInsertFeature.ts | 2 +- src/lsptoolshost/commands.ts | 26 +-- src/lsptoolshost/copilot/contextProviders.ts | 6 +- src/lsptoolshost/copilot/copilotChatSurvey.ts | 8 +- src/lsptoolshost/debugger/debugger.ts | 18 +- ...slynWorkspaceDebugConfigurationProvider.ts | 12 +- .../diagnostics/buildDiagnosticsService.ts | 2 +- .../diagnostics/buildResultReporterService.ts | 2 +- .../diagnostics/diagnosticMiddleware.ts | 2 +- .../diagnostics/fixAllCodeAction.ts | 10 +- .../diagnostics/nestedCodeAction.ts | 11 +- .../dotnetRuntimeExtensionResolver.ts | 16 +- .../extensions/builtInComponents.ts | 5 +- .../roslynLanguageServerExportChannel.ts | 2 +- .../generators/sourceGeneratorsRefresh.ts | 6 +- .../handlers/showToastNotification.ts | 10 +- src/lsptoolshost/logging/collectLogs.ts | 10 +- src/lsptoolshost/logging/loggingUtils.ts | 8 +- src/lsptoolshost/logging/profiling.ts | 2 +- .../options/configurationMiddleware.ts | 4 +- src/lsptoolshost/options/optionChanges.ts | 12 +- .../projectContext/projectContextCommands.ts | 6 +- .../projectContext/projectContextFeature.ts | 2 +- .../projectContext/projectContextService.ts | 16 +- .../projectContext/projectContextStatus.ts | 10 +- src/lsptoolshost/projectRestore/restore.ts | 8 +- .../razor/documentContentsRequest.ts | 2 +- src/lsptoolshost/razor/htmlDocument.ts | 2 +- .../razor/htmlDocumentContentProvider.ts | 6 +- src/lsptoolshost/razor/htmlDocumentManager.ts | 14 +- src/lsptoolshost/razor/razorEndpoints.ts | 34 ++-- .../razor/showGeneratedDocumentCommand.ts | 12 +- .../server/languageServerEvents.ts | 2 +- .../server/roslynLanguageClient.ts | 14 +- .../server/roslynLanguageServer.ts | 69 ++++--- src/lsptoolshost/server/roslynProtocol.ts | 2 +- src/lsptoolshost/server/serverCommands.ts | 4 +- .../serviceBroker/brokeredServicesHosting.ts | 2 +- .../solutionSnapshotProvider.ts | 4 +- src/lsptoolshost/testing/unitTesting.ts | 12 +- .../workspace/miscellaneousFileNotifier.ts | 8 +- .../workspace/workspaceCommands.ts | 6 +- src/lsptoolshost/workspace/workspaceStatus.ts | 6 +- src/main.ts | 56 ++--- src/networkSettings.ts | 2 +- src/omnisharp/dotnetResolver.ts | 8 +- src/omnisharp/engines/IEngine.ts | 16 +- src/omnisharp/engines/lspEngine.ts | 87 ++++---- src/omnisharp/engines/stdioEngine.ts | 82 ++++---- src/omnisharp/features/abstractProvider.ts | 6 +- src/omnisharp/features/changeForwarding.ts | 10 +- src/omnisharp/features/codeActionProvider.ts | 16 +- src/omnisharp/features/codeLensProvider.ts | 16 +- src/omnisharp/features/commands.ts | 28 +-- src/omnisharp/features/completionProvider.ts | 14 +- .../definitionMetadataDocumentProvider.ts | 120 +++++------ src/omnisharp/features/definitionProvider.ts | 16 +- src/omnisharp/features/diagnosticsProvider.ts | 24 +-- .../features/documentHighlightProvider.ts | 8 +- .../features/documentSymbolProvider.ts | 8 +- src/omnisharp/features/documentation.ts | 2 +- src/omnisharp/features/dotnetTest.ts | 26 +-- .../features/fileOpenCloseProvider.ts | 10 +- src/omnisharp/features/fixAll.ts | 2 +- src/omnisharp/features/fixAllProvider.ts | 18 +- .../features/formattingEditProvider.ts | 6 +- src/omnisharp/features/hoverProvider.ts | 8 +- .../features/implementationProvider.ts | 8 +- src/omnisharp/features/inlayHintProvider.ts | 16 +- src/omnisharp/features/referenceProvider.ts | 14 +- src/omnisharp/features/renameProvider.ts | 8 +- .../features/semanticTokensProvider.ts | 14 +- .../features/signatureHelpProvider.ts | 8 +- .../sourceGeneratedDocumentProvider.ts | 8 +- src/omnisharp/features/structureProvider.ts | 6 +- .../features/virtualDocumentTracker.ts | 14 +- .../features/workspaceSymbolProvider.ts | 192 +++++++++--------- .../fileOperationsResponseEditBuilder.ts | 6 +- src/omnisharp/languageMiddlewareFeature.ts | 2 +- src/omnisharp/launcher.ts | 8 +- .../backgroundWorkStatusBarObserver.ts | 10 +- .../observers/baseStatusBarItemObserver.ts | 4 +- .../observers/csharpLoggerObserver.ts | 8 +- .../observers/dotnetChannelObserver.ts | 6 +- .../observers/dotnetLoggerObserver.ts | 8 +- .../observers/dotnetTestChannelObserver.ts | 6 +- .../observers/dotnetTestLoggerObserver.ts | 10 +- .../observers/errorMessageObserver.ts | 10 +- .../observers/informationMessageObserver.ts | 10 +- .../observers/omnisharpChannelObserver.ts | 10 +- .../omnisharpDebugModeLoggerObserver.ts | 8 +- .../observers/omnisharpLoggerObserver.ts | 12 +- .../observers/omnisharpStatusBarObserver.ts | 8 +- .../observers/projectStatusBarObserver.ts | 8 +- .../observers/razorLoggerObserver.ts | 8 +- src/omnisharp/observers/telemetryObserver.ts | 18 +- .../observers/warningMessageObserver.ts | 10 +- src/omnisharp/omniSharpMonoResolver.ts | 8 +- src/omnisharp/omnisharpDownloader.ts | 24 +-- src/omnisharp/omnisharpLanguageServer.ts | 82 ++++---- src/omnisharp/omnisharpLoggingEvents.ts | 12 +- src/omnisharp/omnisharpManager.ts | 8 +- src/omnisharp/omnisharpOptionChanges.ts | 8 +- src/omnisharp/omnisharpPackageCreator.ts | 2 +- ...isharpWorkspaceDebugInformationProvider.ts | 10 +- src/omnisharp/prioritization.ts | 2 +- src/omnisharp/protocol.ts | 2 +- src/omnisharp/requestQueue.ts | 6 +- src/omnisharp/requirementCheck.ts | 10 +- src/omnisharp/server.ts | 52 ++--- src/omnisharp/typeConversion.ts | 2 +- src/omnisharp/utils.ts | 6 +- src/packageManager/IInstallDependencies.ts | 2 +- src/packageManager/absolutePathPackage.ts | 6 +- .../downloadAndInstallPackages.ts | 30 +-- src/packageManager/fileDownloader.ts | 10 +- .../getAbsolutePathPackagesToInstall.ts | 8 +- src/packageManager/isValidDownload.ts | 4 +- src/packageManager/package.ts | 2 +- src/packageManager/packageError.ts | 4 +- src/packageManager/packageFilterer.ts | 6 +- src/packageManager/zipInstaller.ts | 14 +- src/razor/razorOmnisharp.ts | 4 +- src/razor/razorOmnisharpDownloader.ts | 18 +- .../blazorDebugConfigurationProvider.ts | 22 +- .../src/blazorDebug/terminateDebugHandler.ts | 2 +- .../colorPresentationHandler.ts | 8 +- .../serializableColorPresentation.ts | 2 +- .../serializableColorPresentationParams.ts | 4 +- .../src/documentColor/documentColorHandler.ts | 4 +- .../serializableColorInformation.ts | 2 +- src/razor/src/folding/foldingRangeHandler.ts | 2 +- src/razor/src/formatting/formattingHandler.ts | 6 +- .../serializableFormattingResponse.ts | 2 +- src/razor/src/razorLanguage.ts | 2 +- src/razor/src/razorLanguageConfiguration.ts | 2 +- src/razor/src/rpc/serializableRange.ts | 2 +- src/razor/src/rpc/serializableTextEdit.ts | 2 +- src/shared/assets.ts | 10 +- src/shared/configurationProvider.ts | 14 +- .../constants/IHostExecutableResolver.ts | 2 +- src/shared/dotnetConfigurationProvider.ts | 14 +- src/shared/limitedActivationStatus.ts | 6 +- src/shared/loggingEvents.ts | 4 +- src/shared/migrateOptions.ts | 6 +- src/shared/observables/createOptionStream.ts | 2 +- src/shared/observers/baseChannelObserver.ts | 4 +- src/shared/observers/baseLoggerObserver.ts | 6 +- src/shared/observers/csharpChannelObserver.ts | 6 +- src/shared/observers/csharpLoggerObserver.ts | 8 +- src/shared/observers/optionChangeObserver.ts | 4 +- src/shared/observers/utils/showMessage.ts | 2 +- src/shared/platform.ts | 8 +- src/shared/processPicker.ts | 6 +- src/shared/projectConfiguration.ts | 10 +- src/shared/reportIssue.ts | 8 +- src/shared/telemetryReporter.ts | 6 +- src/shared/utils.ts | 2 +- src/shared/utils/getDotnetInfo.ts | 6 +- src/shared/workspaceConfigurationProvider.ts | 12 +- src/statusBarItemAdapter.ts | 2 +- src/textEditorAdapter.ts | 2 +- src/tools/runtimeDependencyPackageUtils.ts | 8 +- src/tools/updatePackageDependencies.ts | 14 +- src/utils/dotnetDevCertsHttps.ts | 4 +- src/utils/getCSharpDevKit.ts | 4 +- src/utils/getMonoVersion.ts | 2 +- src/utils/getMsBuildInfo.ts | 4 +- tasks/compilation/copyEsmSupportFiles.ts | 12 ++ tasks/components/publishRoslynCopilot.ts | 6 +- tasks/debugger/fixLocUrls.ts | 2 +- tasks/debugger/generateOptionsSchema.ts | 4 +- tasks/debugger/updatePackageDependencies.ts | 4 +- .../publishLocalizationContent.ts | 2 +- tasks/packaging/installDependencies.ts | 4 +- tasks/packaging/installDependenciesClean.ts | 4 +- tasks/packaging/offlinePackagingTasks.ts | 26 +-- tasks/packaging/updateRoslynVersion.ts | 6 +- tasks/packaging/vsceTasks.ts | 6 +- tasks/packaging/vsixReleasePackage.ts | 4 +- tasks/profiling/profiling.ts | 6 +- tasks/projectPaths.ts | 7 +- tasks/signing/installSignPlugin.ts | 6 +- tasks/signing/signJs.ts | 6 +- tasks/signing/signVsix.ts | 6 +- tasks/signing/signingTasks.ts | 2 +- tasks/signing/verifyVsix.ts | 4 +- tasks/snap/incrementVersion.ts | 4 +- tasks/snap/snapTasks.ts | 2 +- tasks/snap/updateChangelog.ts | 6 +- tasks/snap/updateVersionForStableRelease.ts | 4 +- tasks/spawnNode.ts | 2 +- tasks/tags/createTags.ts | 8 +- tasks/tests/omnisharptest.ts | 4 +- tasks/tests/omnisharptestIntegration.ts | 4 +- tasks/tests/omnisharptestTasks.ts | 4 +- tasks/tests/omnisharptestUnit.ts | 4 +- tasks/tests/test.ts | 4 +- tasks/tests/testArtifacts.ts | 4 +- tasks/tests/testHelpers.ts | 8 +- tasks/tests/testIntegrationCsharp.ts | 4 +- tasks/tests/testIntegrationDevkit.ts | 4 +- tasks/tests/testIntegrationRazorCohost.ts | 4 +- tasks/tests/testIntegrationUntrusted.ts | 4 +- tasks/tests/testTasks.ts | 2 +- tasks/tests/testUnit.ts | 4 +- test/createTmpAsset.ts | 6 +- test/fakes.ts | 8 +- test/lsptoolshost/artifactTests/vsix.test.ts | 4 +- .../buildDiagnostics.integration.test.ts | 6 +- .../classification.integration.test.ts | 4 +- .../codeactions.integration.test.ts | 4 +- .../codelens.integration.test.ts | 4 +- .../commandEnablement.integration.test.ts | 6 +- .../completion.integration.test.ts | 4 +- .../integrationTests/diagnosticsHelpers.ts | 2 +- .../documentDiagnostics.integration.test.ts | 8 +- ...documentSymbolProvider.integration.test.ts | 4 +- .../fileBasedPrograms.integration.test.ts | 6 +- .../formatting.integration.test.ts | 6 +- ...formattingEditorConfig.integration.test.ts | 6 +- .../gotoDefinition.integration.test.ts | 4 +- .../gotoImplementation.integration.test.ts | 4 +- .../hover.integration.test.ts | 4 +- test/lsptoolshost/integrationTests/index.ts | 2 +- .../integrationTests/integrationHelpers.ts | 8 +- .../integrationTests/jest.config.mjs | 4 +- .../lspInlayHints.integration.test.ts | 4 +- .../onAutoInsert.integration.test.ts | 4 +- .../references.integration.test.ts | 4 +- .../signatureHelp.integration.test.ts | 4 +- .../sourceGenerator.integration.test.ts | 4 +- .../integrationTests/testAssets/razorApp.ts | 2 +- .../testAssets/singleCsproj.ts | 2 +- .../testAssets/slnFilterWithCsproj.ts | 2 +- .../testAssets/slnWithCsproj.ts | 2 +- .../testAssets/slnWithGenerator.ts | 2 +- .../testAssets/testAssetWorkspace.ts | 12 +- .../integrationTests/testAssets/testAssets.ts | 6 +- .../unitTests.integration.test.ts | 6 +- .../workspaceDiagnostics.integration.test.ts | 8 +- .../unitTests/captureActivityLogs.test.ts | 2 +- .../unitTests/configurationMiddleware.test.ts | 2 +- .../unitTests/csharpChannelObserver.test.ts | 6 +- .../unitTests/csharpLoggerObserver.test.ts | 12 +- test/lsptoolshost/unitTests/jest.config.mjs | 1 + test/lsptoolshost/unitTests/json.test.ts | 2 +- ...languageServerConfigChangeObserver.test.ts | 4 +- .../unitTests/migrateOptions.test.ts | 29 ++- .../unitTests/roslynLanguageClient.test.ts | 9 +- .../advisor.integration.test.ts | 6 +- .../codeActionRename.integration.test.ts | 8 +- .../codeLensProvider.integration.test.ts | 6 +- .../completionProvider.integration.test.ts | 6 +- .../definitionProvider.test.ts | 10 +- .../diagnostics.integration.test.ts | 8 +- ...documentSymbolProvider.integration.test.ts | 4 +- ...nCommentAutoFormatting.integration.test.ts | 2 +- .../dotnetTest.integration.test.ts | 14 +- .../hoverProvider.integration.test.ts | 4 +- .../implementationProvider.test.ts | 6 +- .../omnisharpIntegrationTests/index.ts | 2 +- .../inlayHints.integration.test.ts | 12 +- .../integrationHelpers.ts | 8 +- .../omnisharpIntegrationTests/jest.config.mjs | 4 +- .../languageMiddleware.integration.test.ts | 6 +- .../launchConfiguration.integration.test.ts | 10 +- .../launcher.test.ts | 4 +- .../omnisharpCommands.integration.test.ts | 9 +- .../parsedEnvironmentFile.test.ts | 2 +- .../reAnalyze.integration.test.ts | 16 +- .../referenceProvider.test.ts | 6 +- .../semanticTokensProvider.test.ts | 4 +- .../signatureHelp.integration.test.ts | 4 +- .../sourceGeneratorDefinitionProvider.test.ts | 8 +- .../testAssets/activeTestAssetWorkspace.ts | 14 +- .../testAssets/omnisharpTestAssetWorkspace.ts | 15 +- .../typeDefinitionProvider.test.ts | 10 +- ...virtualDocumentTracker.integration.test.ts | 6 +- ...orkspaceSymbolProvider.integration.test.ts | 4 +- .../omnisharpUnitTests/absolutePath.test.ts | 4 +- .../omnisharpUnitTests/assets.test.ts | 8 +- .../blazorWebAssemblyDetection.test.ts | 10 +- .../omnisharpUnitTests/common.test.ts | 2 +- .../coreclrDebug/targetArchitecture.test.ts | 6 +- .../fakes/fakeDotnetResolver.ts | 4 +- .../fakes/fakeMonoResolver.ts | 4 +- .../features/reportIssue.test.ts | 8 +- .../informationMessageObserver.test.ts | 4 +- .../installRuntimeDependencies.test.ts | 16 +- .../omnisharpUnitTests/jest.config.mjs | 1 + .../backgroundWorkStatusBarObserver.test.ts | 8 +- .../logging/dotnetChannelObserver.test.ts | 6 +- .../logging/dotnetLoggerObserver.test.ts | 8 +- .../logging/dotnetTestChannelObserver.test.ts | 8 +- .../logging/dotnetTestLoggerObserver.test.ts | 10 +- .../logging/errorMessageObserver.test.ts | 10 +- .../logging/omnisharpChannelObserver.test.ts | 8 +- .../omnisharpDebugModeLoggerObserver.test.ts | 8 +- .../logging/omnisharpLoggerObserver.test.ts | 10 +- .../omnisharpStatusBarObserver.test.ts | 8 +- .../logging/projectStatusBarObserver.test.ts | 8 +- .../logging/razorLoggerObserver.test.ts | 6 +- .../logging/telemetryObserver.test.ts | 16 +- .../logging/warningMessageObserver.test.ts | 6 +- .../omnisharp/omniSharpMonoResolver.test.ts | 4 +- .../omnisharpDownloader.test.ts | 26 +-- .../omnisharpManager.test.ts | 24 +-- .../omnisharpPackageCreator.test.ts | 8 +- .../optionChangeObserver.test.ts | 4 +- .../omnisharpUnitTests/optionStream.test.ts | 4 +- .../omnisharpUnitTests/options.test.ts | 4 +- .../downloadAndInstallPackages.test.ts | 26 +-- .../packages/fileDownloader.test.ts | 12 +- .../packages/isValidDownload.test.ts | 4 +- .../packages/packageFilterer.test.ts | 30 +-- .../omnisharpUnitTests/packages/proxy.test.ts | 2 +- .../packages/zipInstaller.test.ts | 22 +- .../omnisharpUnitTests/platform.test.ts | 2 +- .../omnisharpUnitTests/processPicker.test.ts | 2 +- .../testAssets/getConfigChangeEvent.ts | 2 +- .../testAssets/mockHttpsServer.ts | 7 +- .../testAssets/testEventBus.ts | 6 +- .../omnisharpUnitTests/testAssets/testZip.ts | 2 +- test/omnisharp/runFeatureTests.ts | 6 +- .../completion.integration.test.ts | 4 +- .../formatting.integration.test.ts | 4 +- .../hover.integration.test.ts | 4 +- test/razor/razorIntegrationTests/index.ts | 2 +- .../razorIntegrationTests/jest.config.mjs | 4 +- .../reference.integration.test.ts | 4 +- .../rename.integration.test.ts | 4 +- .../testAssets/testAssetWorkspace.ts | 5 +- .../tests/addTagHelperDirective.ts | 2 +- .../tests/attributeDirective.ts | 2 +- .../tests/codeBlock.ts | 2 +- .../tests/codeDirective.ts | 2 +- .../tests/doStatement.ts | 2 +- .../tests/elsePart.ts | 2 +- .../tests/explicitExpressionInAttribute.ts | 2 +- .../tests/explicitExpressions.ts | 2 +- .../tests/forStatement.ts | 2 +- .../tests/foreachStatement.ts | 2 +- .../tests/functionsDirective.ts | 2 +- .../tests/grammarTests.test.ts | 78 +++---- .../tests/htmlDynamicAttribute.ts | 2 +- .../tests/ifStatement.ts | 2 +- .../tests/implementsDirective.ts | 2 +- .../tests/implicitExpressionInAttribute.ts | 2 +- .../tests/implicitExpressions.ts | 2 +- .../tests/infrastructure/snapshotFactory.ts | 2 +- .../tests/infrastructure/testUtilities.ts | 4 +- .../tokenizedContentProvider.ts | 14 +- .../tests/inheritsDirective.ts | 2 +- .../tests/injectDirective.ts | 2 +- .../tests/layoutDirective.ts | 2 +- .../tests/lockStatement.ts | 2 +- .../tests/modelDirective.ts | 2 +- .../tests/namespaceDirective.ts | 2 +- .../tests/pageDirective.ts | 2 +- .../tests/preservewhitespaceDirective.ts | 2 +- .../tests/razorComment.ts | 2 +- .../tests/razorTemplate.ts | 2 +- .../tests/removeTagHelperDirective.ts | 2 +- .../tests/rendermodeDirective.ts | 2 +- .../tests/scriptBlock.ts | 2 +- .../tests/sectionDirective.ts | 2 +- .../tests/styleBlock.ts | 2 +- .../tests/switchStatement.ts | 2 +- .../tests/tagHelperPrefixDirective.ts | 2 +- .../tests/transitions.ts | 2 +- .../tests/tryStatement.ts | 2 +- .../tests/typeparamDirective.ts | 2 +- .../tests/usingDirective.ts | 2 +- .../tests/usingStatement.ts | 2 +- .../tests/whileStatement.ts | 2 +- test/runIntegrationTests.ts | 2 +- test/tasks/versionHelper.test.ts | 2 +- .../integrationTests/index.ts | 2 +- .../integrationTests/jest.config.mjs | 4 +- .../untrustedWorkspace.integration.test.ts | 2 +- test/vsCodeEnvironment.ts | 2 +- test/vsCodeFramework.ts | 1 + test/vsCodeUnitFramework.ts | 10 + test/vscodeLauncher.ts | 2 +- tsconfig.jest.json | 7 + tsconfig.json | 5 +- wallaby.js | 36 ++-- 405 files changed, 1871 insertions(+), 1751 deletions(-) create mode 100644 tasks/compilation/copyEsmSupportFiles.ts create mode 100644 test/vsCodeUnitFramework.ts create mode 100644 tsconfig.jest.json diff --git a/.vscode/launch.json b/.vscode/launch.json index 4bd7e13161..05202901da 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -24,7 +24,7 @@ "csharp-test-profile", "${workspaceRoot}/test/untrustedWorkspace/integrationTests/testAssets/empty/.vscode/empty.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/untrustedWorkspace/integrationTests", + "--extensionTestsPath=${workspaceRoot}/out/test/untrustedWorkspace/integrationTests/index.js", "--log", "ms-dotnettools.csharp:trace" ], @@ -56,7 +56,7 @@ "csharp-test-profile", "${workspaceRoot}/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/slnWithCsproj.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/lsptoolshost/integrationTests", + "--extensionTestsPath=${workspaceRoot}/out/test/lsptoolshost/integrationTests/index.js", "--log", "ms-dotnettools.csharp:trace" ], @@ -84,7 +84,7 @@ "csharp-test-profile", "${workspaceRoot}/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj/.vscode/devkit_slnWithCsproj.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/lsptoolshost/integrationTests", + "--extensionTestsPath=${workspaceRoot}/out/test/lsptoolshost/integrationTests/index.js", "--log", "ms-dotnettools.csharp:trace" ], @@ -112,7 +112,7 @@ "csharp-test-profile", "${workspaceRoot}/test/razor/razorIntegrationTests/testAssets/RazorApp/.vscode/RazorApp.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/razor/razorIntegrationTests", + "--extensionTestsPath=${workspaceRoot}/out/test/razor/razorIntegrationTests/index.js", "--log", "ms-dotnettools.csharp:trace" ], @@ -139,7 +139,7 @@ "csharp-test-profile", "${workspaceRoot}/test/omnisharp/omnisharpIntegrationTests/testAssets/${input:omnisharpAssetName}/.vscode/omnisharp_${input:omnisharpAssetName}.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/omnisharp/omnisharpIntegrationTests" + "--extensionTestsPath=${workspaceRoot}/out/test/omnisharp/omnisharpIntegrationTests/index.js" ], "env": { "CODE_EXTENSIONS_PATH": "${workspaceRoot}", @@ -164,7 +164,7 @@ "csharp-test-profile", "${workspaceRoot}/test/omnisharp/omnisharpIntegrationTests/testAssets/${input:omnisharpAssetName}/.vscode/omnisharp_lsp_${input:omnisharpAssetName}.code-workspace", "--extensionDevelopmentPath=${workspaceRoot}", - "--extensionTestsPath=${workspaceRoot}/out/test/omnisharp/omnisharpIntegrationTests" + "--extensionTestsPath=${workspaceRoot}/out/test/omnisharp/omnisharpIntegrationTests/index.js" ], "env": { "CODE_EXTENSIONS_PATH": "${workspaceRoot}", diff --git a/__mocks__/vscode.ts b/__mocks__/vscode.ts index bdd05e7de5..1bb6b270c5 100644 --- a/__mocks__/vscode.ts +++ b/__mocks__/vscode.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from '../src/vscodeAdapter'; -import { getFakeVsCode } from '../test/fakes'; +import * as vscodeAdapter from '../src/vscodeAdapter.js'; +import { getFakeVsCode } from '../test/fakes.js'; // This module creates a manual mock for the vscode module for running in unit tests. // Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules. @@ -12,4 +12,4 @@ import { getFakeVsCode } from '../test/fakes'; // We can consider switching to an actual jest mock (instead of this manual fake) once we entirely // remove the old test framework (mocha/chai). const vscode: vscodeAdapter.vscode = getFakeVsCode(); -module.exports = vscode; +export const { commands, languages, window, workspace, extensions, Uri, version, env, l10n } = vscode; diff --git a/baseJestConfig.mjs b/baseJestConfig.mjs index 0d444b10a3..ce082ca89e 100644 --- a/baseJestConfig.mjs +++ b/baseJestConfig.mjs @@ -3,14 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { readFileSync } from 'node:fs'; +import { fileURLToPath } from 'node:url'; import { createDefaultEsmPreset, createDefaultPreset } from 'ts-jest'; const packageJson = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')); +const tsconfigPath = fileURLToPath(new URL('./tsconfig.json', import.meta.url)); +const jestTsconfigPath = fileURLToPath(new URL('./tsconfig.jest.json', import.meta.url)); // The override lets tooling validate the ESM transform before the repository package type changes. const useESM = packageJson.type === 'module' || process.env.JEST_USE_ESM === 'true'; const tsJestPreset = useESM - ? createDefaultEsmPreset({ tsconfig: './tsconfig.json' }) - : createDefaultPreset({ tsconfig: './tsconfig.json' }); + ? createDefaultEsmPreset({ tsconfig: tsconfigPath }) + : createDefaultPreset({ tsconfig: tsconfigPath }); +const commonProjectConfig = { + testEnvironment: 'node', + transformIgnorePatterns: ['/dist/.+\\.js'], +}; /** * Defines a base project config that we can re-use across the project specific jest configs. @@ -19,8 +26,7 @@ const tsJestPreset = useESM /** @type {import('jest').Config} */ export const baseProjectConfig = { ...tsJestPreset, - testEnvironment: 'node', - transformIgnorePatterns: ['/dist/.+\\.js'], + ...commonProjectConfig, ...(useESM ? { moduleNameMapper: { @@ -29,3 +35,12 @@ export const baseProjectConfig = { } : {}), }; + +// VS Code's packaged extension host strips the Node flag required by Jest's VM-module ESM runtime. +export const baseIntegrationProjectConfig = { + ...createDefaultPreset({ tsconfig: jestTsconfigPath }), + ...commonProjectConfig, + moduleNameMapper: { + '^(\\.{1,2}/.*)\\.js$': '$1', + }, +}; diff --git a/eslint.config.mjs b/eslint.config.mjs index ea8a9c6f6c..2dab5865ca 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -23,7 +23,15 @@ const compatibleHeaderPlugin = fixupPluginRules({ export default defineConfig([ { - ignores: ['out/**', 'dist/**', 'wallaby.js', 'eslint.config.mjs', 'esbuild.mjs', '**/*.d.ts'], + ignores: [ + 'out/**', + 'dist/**', + '.vscode-test/**', + 'wallaby.js', + 'eslint.config.mjs', + 'esbuild.mjs', + '**/*.d.ts', + ], }, { files: ['**/*.ts'], diff --git a/package.json b/package.json index f39ec10691..160b3e710f 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "csharp", "publisher": "ms-dotnettools", "version": "42.42.42-placeholder", + "type": "module", "description": "Base language support for C#", "displayName": "C#", "author": "Microsoft Corporation", @@ -64,8 +65,9 @@ } ], "scripts": { - "compile": "tsc -p tsconfig.json && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", - "compileDev": "tsc -p tsconfig.json && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compile": "tsc -p tsconfig.json && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compileDev": "tsc -p tsconfig.json && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compile:copyEsmSupportFiles": "node --import tsx tasks/compilation/copyEsmSupportFiles.ts", "compile:razorTextMate": "npx js-yaml src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml > src/razor/syntaxes/aspnetcorerazor.tmLanguage.json", "createTags": "npx tsx tasks/tags/createTags.ts", "fixLocUrls": "npx tsx tasks/debugger/fixLocUrls.ts", @@ -78,9 +80,9 @@ "l10nDevGenerateXlf": "npx @vscode/l10n-dev generate-xlf ./package.nls.json ./l10n/bundle.l10n.json --outFile ./loc/vscode-csharp.xlf", "l10nDevImportXlf": "npx @vscode/l10n-dev import-xlf ./loc/vscode-csharp.*.xlf --outDir ./l10n && move l10n\\package.nls.*.json .", "lint": "npx eslint ./", - "omnisharptest": "npm run packageDev && npx tsx tasks/tests/omnisharptest.ts", - "omnisharptest:integration": "npm run packageDev && npx tsx tasks/tests/omnisharptestIntegration.ts", - "omnisharptest:unit": "npm run compileDev && npx tsx tasks/tests/omnisharptestUnit.ts", + "omnisharptest": "npm run packageDev && node --experimental-vm-modules --import tsx tasks/tests/omnisharptest.ts", + "omnisharptest:integration": "npm run packageDev && node --experimental-vm-modules --import tsx tasks/tests/omnisharptestIntegration.ts", + "omnisharptest:unit": "npm run compileDev && node --experimental-vm-modules --import tsx tasks/tests/omnisharptestUnit.ts", "package": "npm run compile && node esbuild.mjs --production && npm run signJs", "packageDev": "npm run compileDev && node esbuild.mjs", "prepare": "npm run installDependencies", @@ -90,13 +92,13 @@ "signJs": "npx tsx tasks/signing/signJs.ts", "signVsix": "npx tsx tasks/signing/signVsix.ts", "test": "npm run test:unit && npm run test:artifacts", - "test:artifacts": "npm run compileDev && npx tsx tasks/tests/testArtifacts.ts", + "test:artifacts": "npm run compileDev && node --experimental-vm-modules --import tsx tasks/tests/testArtifacts.ts", "test:integration": "npm run test:integration:csharp && npm run test:integration:devkit && npm run test:integration:razor:cohost && npm run test:integration:untrusted", - "test:integration:csharp": "npm run packageDev && npx tsx tasks/tests/testIntegrationCsharp.ts", - "test:integration:devkit": "npm run packageDev && npx tsx tasks/tests/testIntegrationDevkit.ts", - "test:integration:razor:cohost": "npm run packageDev && npx tsx tasks/tests/testIntegrationRazorCohost.ts", - "test:integration:untrusted": "npm run packageDev && npx tsx tasks/tests/testIntegrationUntrusted.ts", - "test:unit": "npm run compileDev && npx tsx tasks/tests/testUnit.ts", + "test:integration:csharp": "npm run packageDev && node --experimental-vm-modules --import tsx tasks/tests/testIntegrationCsharp.ts", + "test:integration:devkit": "npm run packageDev && node --experimental-vm-modules --import tsx tasks/tests/testIntegrationDevkit.ts", + "test:integration:razor:cohost": "npm run packageDev && node --experimental-vm-modules --import tsx tasks/tests/testIntegrationRazorCohost.ts", + "test:integration:untrusted": "npm run packageDev && node --experimental-vm-modules --import tsx tasks/tests/testIntegrationUntrusted.ts", + "test:unit": "npm run compileDev && node --experimental-vm-modules --import tsx tasks/tests/testUnit.ts", "updateChangelog": "npx tsx tasks/snap/updateChangelog.ts", "updatePackageDependencies": "npx tsx tasks/debugger/updatePackageDependencies.ts", "updateRoslynVersion": "npx tsx tasks/packaging/updateRoslynVersion.ts", diff --git a/src/activateOmniSharp.ts b/src/activateOmniSharp.ts index 5358fcaab1..4111cd36f8 100644 --- a/src/activateOmniSharp.ts +++ b/src/activateOmniSharp.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { OmnisharpExtensionExports } from './csharpExtensionExports'; -import { PlatformInformation } from './shared/platform'; +import { OmnisharpExtensionExports } from './csharpExtensionExports.js'; +import { PlatformInformation } from './shared/platform.js'; import { Observable } from 'rxjs'; -import { NetworkSettingsProvider } from './networkSettings'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { activateOmniSharpLanguageServer } from './omnisharp/omnisharpLanguageServer'; -import { EventStream } from './eventStream'; -import { razorOptions } from './shared/options'; -import { activateRazorOmniSharpExtension } from './razor/razorOmnisharp'; +import { NetworkSettingsProvider } from './networkSettings.js'; +import { ITelemetryReporter } from './shared/telemetryReporter.js'; +import { activateOmniSharpLanguageServer } from './omnisharp/omnisharpLanguageServer.js'; +import { EventStream } from './eventStream.js'; +import { razorOptions } from './shared/options.js'; +import { activateRazorOmniSharpExtension } from './razor/razorOmnisharp.js'; export function activateOmniSharp( context: vscode.ExtensionContext, @@ -21,7 +21,7 @@ export function activateOmniSharp( networkSettingsProvider: NetworkSettingsProvider, eventStream: EventStream, csharpChannel: vscode.OutputChannel, - reporter: TelemetryReporter, + reporter: ITelemetryReporter, getCoreClrDebugPromise: (languageServerStarted: Promise) => Promise ): OmnisharpExtensionExports { // activate language services diff --git a/src/activateRoslyn.ts b/src/activateRoslyn.ts index d17fb65a9d..d928592c53 100644 --- a/src/activateRoslyn.ts +++ b/src/activateRoslyn.ts @@ -4,27 +4,27 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { CSharpExtensionExports } from './csharpExtensionExports'; -import { PlatformInformation } from './shared/platform'; +import { CSharpExtensionExports } from './csharpExtensionExports.js'; +import { PlatformInformation } from './shared/platform.js'; import { Observable } from 'rxjs'; -import { EventStream } from './eventStream'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { RoslynLanguageServer } from './lsptoolshost/server/roslynLanguageServer'; -import { CSharpDevKitExports } from './csharpDevKitExports'; -import { RoslynLanguageServerEvents, ServerState } from './lsptoolshost/server/languageServerEvents'; -import { activateRoslynLanguageServer, createCaptureActivityLogs } from './lsptoolshost/activate'; -import Descriptors from './lsptoolshost/solutionSnapshot/descriptors'; -import { getBrokeredServiceContainer } from './lsptoolshost/serviceBroker/brokeredServicesHosting'; -import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker'; -import { RoslynLanguageServerExport } from './lsptoolshost/extensions/roslynLanguageServerExportChannel'; -import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider'; -import { languageServerOptions } from './shared/options'; -import { csharpDevkitExtensionId } from './utils/getCSharpDevKit'; +import { EventStream } from './eventStream.js'; +import { ITelemetryReporterWithLevel } from './shared/telemetryReporter.js'; +import { RoslynLanguageServer } from './lsptoolshost/server/roslynLanguageServer.js'; +import { CSharpDevKitExports } from './csharpDevKitExports.js'; +import { RoslynLanguageServerEvents, ServerState } from './lsptoolshost/server/languageServerEvents.js'; +import { activateRoslynLanguageServer, createCaptureActivityLogs } from './lsptoolshost/activate.js'; +import Descriptors from './lsptoolshost/solutionSnapshot/descriptors.js'; +import { getBrokeredServiceContainer } from './lsptoolshost/serviceBroker/brokeredServicesHosting.js'; +import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker.js'; +import { RoslynLanguageServerExport } from './lsptoolshost/extensions/roslynLanguageServerExportChannel.js'; +import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider.js'; +import { languageServerOptions } from './shared/options.js'; +import { csharpDevkitExtensionId } from './utils/getCSharpDevKit.js'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; -import { SolutionSnapshotProvider } from './lsptoolshost/solutionSnapshot/solutionSnapshotProvider'; -import { BuildResultDiagnostics } from './lsptoolshost/diagnostics/buildResultReporterService'; -import { getComponentFolder } from './lsptoolshost/extensions/builtInComponents'; -import { ObservableLogOutputChannel } from './lsptoolshost/logging/observableLogOutputChannel'; +import { SolutionSnapshotProvider } from './lsptoolshost/solutionSnapshot/solutionSnapshotProvider.js'; +import { BuildResultDiagnostics } from './lsptoolshost/diagnostics/buildResultReporterService.js'; +import { getComponentFolder } from './lsptoolshost/extensions/builtInComponents.js'; +import { ObservableLogOutputChannel } from './lsptoolshost/logging/observableLogOutputChannel.js'; export function activateRoslyn( context: vscode.ExtensionContext, @@ -32,7 +32,7 @@ export function activateRoslyn( optionStream: Observable, eventStream: EventStream, csharpChannel: vscode.LogOutputChannel, - reporter: TelemetryReporter, + reporter: ITelemetryReporterWithLevel, csharpDevkitExtension: vscode.Extension | undefined, getCoreClrDebugPromise: (languageServerStarted: Promise) => Promise ): CSharpExtensionExports { diff --git a/src/checkSupportedPlatform.ts b/src/checkSupportedPlatform.ts index 36fb5b8bc9..d1bbc52b52 100644 --- a/src/checkSupportedPlatform.ts +++ b/src/checkSupportedPlatform.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { PlatformInformation } from './shared/platform'; -import { ActionOption, showErrorMessage } from './shared/observers/utils/showMessage'; +import { PlatformInformation } from './shared/platform.js'; +import { ActionOption, showErrorMessage } from './shared/observers/utils/showMessage.js'; export function checkIsSupportedPlatform(context: vscode.ExtensionContext, platformInfo: PlatformInformation): boolean { if (!isSupportedPlatform(platformInfo)) { diff --git a/src/common.ts b/src/common.ts index d3dc6d33e9..918786ee4e 100644 --- a/src/common.ts +++ b/src/common.ts @@ -7,7 +7,7 @@ import * as cp from 'child_process'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import { AbsolutePath } from './packageManager/absolutePath'; +import { AbsolutePath } from './packageManager/absolutePath.js'; let extensionPath: string; diff --git a/src/compositeDisposable.ts b/src/compositeDisposable.ts index 799577d1d7..7eff8f5bea 100644 --- a/src/compositeDisposable.ts +++ b/src/compositeDisposable.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Subscription } from 'rxjs'; -import Disposable, { IDisposable } from './disposable'; +import Disposable, { IDisposable } from './disposable.js'; export default class CompositeDisposable extends Disposable { private disposables = new Subscription(); diff --git a/src/coreclrDebug/activate.ts b/src/coreclrDebug/activate.ts index de2355afb5..1085b42ef7 100644 --- a/src/coreclrDebug/activate.ts +++ b/src/coreclrDebug/activate.ts @@ -5,23 +5,23 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import * as common from '../common'; -import { CoreClrDebugUtil, getTargetArchitecture, MINIMUM_SUPPORT_MACOS_DISPLAY_NAME } from './util'; -import { PlatformInformation } from '../shared/platform'; +import * as common from '../common.js'; +import { CoreClrDebugUtil, getTargetArchitecture, MINIMUM_SUPPORT_MACOS_DISPLAY_NAME } from './util.js'; +import { PlatformInformation } from '../shared/platform.js'; import { DebuggerPrerequisiteWarning, DebuggerPrerequisiteFailure, DebuggerNotInstalledFailure, -} from '../shared/loggingEvents'; -import { EventStream } from '../eventStream'; -import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { RemoteAttachPicker } from '../shared/processPicker'; -import CompositeDisposable from '../compositeDisposable'; -import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider'; -import { omnisharpOptions } from '../shared/options'; -import { ActionOption, CommandOption, showErrorMessage } from '../shared/observers/utils/showMessage'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit'; +} from '../shared/loggingEvents.js'; +import { EventStream } from '../eventStream.js'; +import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils.js'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; +import { RemoteAttachPicker } from '../shared/processPicker.js'; +import CompositeDisposable from '../compositeDisposable.js'; +import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider.js'; +import { omnisharpOptions } from '../shared/options.js'; +import { ActionOption, CommandOption, showErrorMessage } from '../shared/observers/utils/showMessage.js'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit.js'; export async function activate( thisExtension: vscode.Extension, diff --git a/src/coreclrDebug/util.ts b/src/coreclrDebug/util.ts index 9dd9b67213..c18d0699a7 100644 --- a/src/coreclrDebug/util.ts +++ b/src/coreclrDebug/util.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import * as fs from 'fs'; import * as semver from 'semver'; import * as os from 'os'; -import { PlatformInformation } from '../shared/platform'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { DotnetInfo } from '../shared/utils/dotnetInfo'; +import { PlatformInformation } from '../shared/platform.js'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; +import { DotnetInfo } from '../shared/utils/dotnetInfo.js'; const MINIMUM_SUPPORTED_DOTNET_CLI = '1.0.0'; diff --git a/src/csharpExtensionExports.ts b/src/csharpExtensionExports.ts index 7c34d28cd9..8ee2569c30 100644 --- a/src/csharpExtensionExports.ts +++ b/src/csharpExtensionExports.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { Advisor } from './omnisharp/features/diagnosticsProvider'; -import { EventStream } from './eventStream'; -import TestManager from './omnisharp/features/dotnetTest'; +import { Advisor } from './omnisharp/features/diagnosticsProvider.js'; +import { EventStream } from './eventStream.js'; +import TestManager from './omnisharp/features/dotnetTest.js'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; -import { LanguageServerEvents } from './lsptoolshost/server/languageServerEvents'; +import { LanguageServerEvents } from './lsptoolshost/server/languageServerEvents.js'; import { PartialResultParams, ProtocolRequestType, RequestParam, RequestType } from 'vscode-languageclient'; export interface LimitedExtensionExports { diff --git a/src/eventStream.ts b/src/eventStream.ts index 946370b936..efd24a4567 100644 --- a/src/eventStream.ts +++ b/src/eventStream.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Subject, Subscription } from 'rxjs'; -import { BaseEvent } from './shared/loggingEvents'; +import { BaseEvent } from './shared/loggingEvents.js'; export class EventStream { private sink: Subject; diff --git a/src/installRuntimeDependencies.ts b/src/installRuntimeDependencies.ts index 3cdab86cd2..54ff862e71 100644 --- a/src/installRuntimeDependencies.ts +++ b/src/installRuntimeDependencies.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from './shared/platform'; -import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents'; -import { EventStream } from './eventStream'; -import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall'; -import { DependencyInstallationStatus, IInstallDependencies } from './packageManager/IInstallDependencies'; -import { AbsolutePathPackage } from './packageManager/absolutePathPackage'; +import { PlatformInformation } from './shared/platform.js'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents.js'; +import { EventStream } from './eventStream.js'; +import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils.js'; +import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall.js'; +import { DependencyInstallationStatus, IInstallDependencies } from './packageManager/IInstallDependencies.js'; +import { AbsolutePathPackage } from './packageManager/absolutePathPackage.js'; export async function installRuntimeDependencies( packageJSON: any, diff --git a/src/lsptoolshost/activate.ts b/src/lsptoolshost/activate.ts index cf5d8aee8d..aa0698ec10 100644 --- a/src/lsptoolshost/activate.ts +++ b/src/lsptoolshost/activate.ts @@ -6,32 +6,33 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; -import { registerCommands } from './commands'; -import { registerDebugger } from './debugger/debugger'; -import { PlatformInformation } from '../shared/platform'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit'; -import { DotnetRuntimeExtensionResolver } from './dotnetRuntime/dotnetRuntimeExtensionResolver'; -import { registerUnitTestingCommands } from './testing/unitTesting'; -import { registerLanguageServerOptionChanges } from './options/optionChanges'; +import { fileURLToPath } from 'url'; +import { registerCommands } from './commands.js'; +import { registerDebugger } from './debugger/debugger.js'; +import { PlatformInformation } from '../shared/platform.js'; +import { ITelemetryReporterWithLevel } from '../shared/telemetryReporter.js'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit.js'; +import { DotnetRuntimeExtensionResolver } from './dotnetRuntime/dotnetRuntimeExtensionResolver.js'; +import { registerUnitTestingCommands } from './testing/unitTesting.js'; +import { registerLanguageServerOptionChanges } from './options/optionChanges.js'; import { Observable } from 'rxjs'; -import { RoslynLanguageServerEvents } from './server/languageServerEvents'; -import { registerCodeActionFixAllCommands } from './diagnostics/fixAllCodeAction'; -import { commonOptions, languageServerOptions } from '../shared/options'; -import { registerNestedCodeActionCommands } from './diagnostics/nestedCodeAction'; -import { registerRestoreCommands } from './projectRestore/restore'; -import { registerMiscellaneousFileNotifier } from './workspace/miscellaneousFileNotifier'; -import { TelemetryEventNames } from '../shared/telemetryEventNames'; -import { WorkspaceStatus } from './workspace/workspaceStatus'; -import { ProjectContextStatus } from './projectContext/projectContextStatus'; -import { RoslynLanguageServer } from './server/roslynLanguageServer'; -import { registerCopilotContextProviders } from './copilot/contextProviders'; -import { registerCopilotChatSurvey } from './copilot/copilotChatSurvey'; -import { registerRazorEndpoints } from './razor/razorEndpoints'; -import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel'; -import { registerSourceGeneratorRefresh } from './generators/sourceGeneratorsRefresh'; -import { ActivityLogCapture } from '../csharpExtensionExports'; -import { createActivityLogCapture } from './logging/loggingUtils'; +import { RoslynLanguageServerEvents } from './server/languageServerEvents.js'; +import { registerCodeActionFixAllCommands } from './diagnostics/fixAllCodeAction.js'; +import { commonOptions, languageServerOptions } from '../shared/options.js'; +import { registerNestedCodeActionCommands } from './diagnostics/nestedCodeAction.js'; +import { registerRestoreCommands } from './projectRestore/restore.js'; +import { registerMiscellaneousFileNotifier } from './workspace/miscellaneousFileNotifier.js'; +import { TelemetryEventNames } from '../shared/telemetryEventNames.js'; +import { WorkspaceStatus } from './workspace/workspaceStatus.js'; +import { ProjectContextStatus } from './projectContext/projectContextStatus.js'; +import { RoslynLanguageServer } from './server/roslynLanguageServer.js'; +import { registerCopilotContextProviders } from './copilot/contextProviders.js'; +import { registerCopilotChatSurvey } from './copilot/copilotChatSurvey.js'; +import { registerRazorEndpoints } from './razor/razorEndpoints.js'; +import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel.js'; +import { registerSourceGeneratorRefresh } from './generators/sourceGeneratorsRefresh.js'; +import { ActivityLogCapture } from '../csharpExtensionExports.js'; +import { createActivityLogCapture } from './logging/loggingUtils.js'; let _channel: ObservableLogOutputChannel; let _traceChannel: ObservableLogOutputChannel; @@ -45,7 +46,7 @@ export async function activateRoslynLanguageServer( platformInfo: PlatformInformation, optionObservable: Observable, outputChannel: ObservableLogOutputChannel, - reporter: TelemetryReporter, + reporter: ITelemetryReporterWithLevel, languageServerEvents: RoslynLanguageServerEvents ): Promise { // Create a channel for outputting general logs from the language server. @@ -158,7 +159,7 @@ export function getServerPath(platformInfo: PlatformInformation) { } function getInstalledServerPath(platformInfo: PlatformInformation): string { - const clientRoot = __dirname; + const clientRoot = path.dirname(fileURLToPath(import.meta.url)); const serverFilePath = path.join(clientRoot, '..', '.roslyn', 'Microsoft.CodeAnalysis.LanguageServer'); let extension = ''; diff --git a/src/lsptoolshost/autoInsert/onAutoInsert.ts b/src/lsptoolshost/autoInsert/onAutoInsert.ts index e0d9d94a7b..2a3c2edd59 100644 --- a/src/lsptoolshost/autoInsert/onAutoInsert.ts +++ b/src/lsptoolshost/autoInsert/onAutoInsert.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as RoslynProtocol from '../server/roslynProtocol'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import * as RoslynProtocol from '../server/roslynProtocol.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; import { FormattingOptions, InsertTextFormat, Range, TextDocumentIdentifier } from 'vscode-languageclient'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts b/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts index a68a9acb6b..cefc84e30a 100644 --- a/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts +++ b/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts @@ -21,7 +21,7 @@ import { ServerCapabilities, } from 'vscode-languageclient'; -import * as RoslynProtocol from '../server/roslynProtocol'; +import * as RoslynProtocol from '../server/roslynProtocol.js'; import { randomUUID } from 'crypto'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/commands.ts b/src/lsptoolshost/commands.ts index baf2e95aab..89deada5bb 100644 --- a/src/lsptoolshost/commands.ts +++ b/src/lsptoolshost/commands.ts @@ -4,23 +4,23 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from './server/roslynLanguageServer'; -import reportIssue from '../shared/reportIssue'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { registerWorkspaceCommands } from './workspace/workspaceCommands'; -import { registerServerCommands } from './server/serverCommands'; +import { RoslynLanguageServer } from './server/roslynLanguageServer.js'; +import reportIssue from '../shared/reportIssue.js'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; +import { registerWorkspaceCommands } from './workspace/workspaceCommands.js'; +import { registerServerCommands } from './server/serverCommands.js'; import { changeProjectContext, changeProjectContextCommandName, changeProjectContextEditor, changeProjectContextFileExplorer, openAndChangeProjectContext, -} from './projectContext/projectContextCommands'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { TelemetryEventNames } from '../shared/telemetryEventNames'; -import { registerCollectLogsCommand } from './logging/collectLogs'; -import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel'; +} from './projectContext/projectContextCommands.js'; +import { ITelemetryReporter } from '../shared/telemetryReporter.js'; +import { TelemetryEventNames } from '../shared/telemetryEventNames.js'; +import { registerCollectLogsCommand } from './logging/collectLogs.js'; +import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel.js'; export function registerCommands( context: vscode.ExtensionContext, @@ -28,7 +28,7 @@ export function registerCommands( hostExecutableResolver: IHostExecutableResolver, outputChannel: ObservableLogOutputChannel, csharpTraceChannel: ObservableLogOutputChannel, - reporter: TelemetryReporter + reporter: ITelemetryReporter ) { registerExtensionCommands( context, @@ -51,7 +51,7 @@ function registerExtensionCommands( hostExecutableResolver: IHostExecutableResolver, outputChannel: ObservableLogOutputChannel, csharpTraceChannel: ObservableLogOutputChannel, - reporter: TelemetryReporter + reporter: ITelemetryReporter ) { context.subscriptions.push( vscode.commands.registerCommand( diff --git a/src/lsptoolshost/copilot/contextProviders.ts b/src/lsptoolshost/copilot/contextProviders.ts index 12f1c5c806..6f73555fbd 100644 --- a/src/lsptoolshost/copilot/contextProviders.ts +++ b/src/lsptoolshost/copilot/contextProviders.ts @@ -10,9 +10,9 @@ import { } from '@github/copilot-language-server'; import * as vscode from 'vscode'; import * as lsp from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { CSharpExtensionId } from '../../constants/csharpExtensionId'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { CSharpExtensionId } from '../../constants/csharpExtensionId.js'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; type ActiveExperiments = { [name: string]: string | number | boolean | string[] }; diff --git a/src/lsptoolshost/copilot/copilotChatSurvey.ts b/src/lsptoolshost/copilot/copilotChatSurvey.ts index 2365699d8d..9e40176362 100644 --- a/src/lsptoolshost/copilot/copilotChatSurvey.ts +++ b/src/lsptoolshost/copilot/copilotChatSurvey.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import type { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { LanguageServerEvents, ServerState } from '../server/languageServerEvents'; -import { ITelemetryReporter } from '../../shared/telemetryReporter'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames'; +import type { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { LanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; +import { ITelemetryReporter } from '../../shared/telemetryReporter.js'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames.js'; // Stored under separate keys so a snooze write can never overwrite a terminal "shown" // value set in another window (globalState.update replaces the whole value for a key). diff --git a/src/lsptoolshost/debugger/debugger.ts b/src/lsptoolshost/debugger/debugger.ts index 47ccce90e1..c972d2cf95 100644 --- a/src/lsptoolshost/debugger/debugger.ts +++ b/src/lsptoolshost/debugger/debugger.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { addAssetsIfNecessary, generateAssets } from '../../shared/assets'; -import { DotnetWorkspaceConfigurationProvider } from '../../shared/workspaceConfigurationProvider'; -import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { RoslynWorkspaceDebugInformationProvider } from '../debugger/roslynWorkspaceDebugConfigurationProvider'; -import { PlatformInformation } from '../../shared/platform'; -import { DotnetConfigurationResolver } from '../../shared/dotnetConfigurationProvider'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; -import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents'; +import { addAssetsIfNecessary, generateAssets } from '../../shared/assets.js'; +import { DotnetWorkspaceConfigurationProvider } from '../../shared/workspaceConfigurationProvider.js'; +import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RoslynWorkspaceDebugInformationProvider } from '../debugger/roslynWorkspaceDebugConfigurationProvider.js'; +import { PlatformInformation } from '../../shared/platform.js'; +import { DotnetConfigurationResolver } from '../../shared/dotnetConfigurationProvider.js'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; export function registerDebugger( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts b/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts index b3bbb45ae1..1cacdf2b9f 100644 --- a/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts +++ b/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { mapAsync } from '../../common'; +import { mapAsync } from '../../common.js'; import { IWorkspaceDebugInformationProvider, ProjectDebugInformation, -} from '../../shared/IWorkspaceDebugInformationProvider'; +} from '../../shared/IWorkspaceDebugInformationProvider.js'; import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyHostedServer, isBlazorWebAssemblyProject, isWebProject, -} from '../../shared/utils'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +} from '../../shared/utils.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; import { ProjectDebugConfiguration, WorkspaceDebugConfigurationParams, WorkspaceDebugConfigurationRequest, -} from '../server/roslynProtocol'; -import { UriConverter } from '../utils/uriConverter'; +} from '../server/roslynProtocol.js'; +import { UriConverter } from '../utils/uriConverter.js'; export class RoslynWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { constructor( diff --git a/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts b/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts index 70458d3bd5..99f6633b16 100644 --- a/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts +++ b/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { languageServerOptions } from '../../shared/options'; +import { languageServerOptions } from '../../shared/options.js'; export enum AnalysisSetting { FullSolution = 'fullSolution', diff --git a/src/lsptoolshost/diagnostics/buildResultReporterService.ts b/src/lsptoolshost/diagnostics/buildResultReporterService.ts index ed2587e661..258432a755 100644 --- a/src/lsptoolshost/diagnostics/buildResultReporterService.ts +++ b/src/lsptoolshost/diagnostics/buildResultReporterService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { CancellationToken } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; import * as vscode from 'vscode'; interface IBuildResultDiagnostics { diff --git a/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts b/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts index 5adba60290..e36a2ec97a 100644 --- a/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts +++ b/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { ProvideDiagnosticSignature, ProvideWorkspaceDiagnosticSignature, vsdiag } from 'vscode-languageclient'; -import { languageServerOptions } from '../../shared/options'; +import { languageServerOptions } from '../../shared/options.js'; export async function provideDiagnostics( document: vscode.TextDocument | vscode.Uri, diff --git a/src/lsptoolshost/diagnostics/fixAllCodeAction.ts b/src/lsptoolshost/diagnostics/fixAllCodeAction.ts index e3cc327f5f..378823e947 100644 --- a/src/lsptoolshost/diagnostics/fixAllCodeAction.ts +++ b/src/lsptoolshost/diagnostics/fixAllCodeAction.ts @@ -4,11 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as RoslynProtocol from '../server/roslynProtocol'; +import * as RoslynProtocol from '../server/roslynProtocol.js'; import { LSPAny } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { URIConverter, createConverter } from 'vscode-languageclient/protocolConverter'; -import { UriConverter } from '../utils/uriConverter'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; export function registerCodeActionFixAllCommands( context: vscode.ExtensionContext, @@ -56,9 +54,7 @@ export async function getFixAllResponse( ); if (response.edit) { - const uriConverter: URIConverter = (value: string): vscode.Uri => UriConverter.deserialize(value); - const protocolConverter = createConverter(uriConverter, true, true, true); - const fixAllEdit = await protocolConverter.asWorkspaceEdit(response.edit); + const fixAllEdit = await languageServer.protocol2CodeConverter.asWorkspaceEdit(response.edit); if (!(await vscode.workspace.applyEdit(fixAllEdit))) { const componentName = '[roslyn.client.fixAllCodeAction]'; const errorMessage = 'Failed to make a fix all edit for completion.'; diff --git a/src/lsptoolshost/diagnostics/nestedCodeAction.ts b/src/lsptoolshost/diagnostics/nestedCodeAction.ts index 0d2d7650ff..b49d551705 100644 --- a/src/lsptoolshost/diagnostics/nestedCodeAction.ts +++ b/src/lsptoolshost/diagnostics/nestedCodeAction.ts @@ -5,10 +5,8 @@ import * as vscode from 'vscode'; import { CodeAction, CodeActionResolveRequest, LSPAny } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { URIConverter, createConverter } from 'vscode-languageclient/protocolConverter'; -import { UriConverter } from '../utils/uriConverter'; -import { getFixAllResponse } from './fixAllCodeAction'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { getFixAllResponse } from './fixAllCodeAction.js'; export function registerNestedCodeActionCommands( context: vscode.ExtensionContext, @@ -72,10 +70,7 @@ async function registerNestedResolveCodeAction( throw new Error('Tried to retrieve a code action edit, but an error occurred.'); } - const uriConverter: URIConverter = (value: string): vscode.Uri => - UriConverter.deserialize(value); - const protocolConverter = createConverter(uriConverter, true, true, true); - const fixAllEdit = await protocolConverter.asWorkspaceEdit(response.edit); + const fixAllEdit = await languageServer.protocol2CodeConverter.asWorkspaceEdit(response.edit); if (!(await vscode.workspace.applyEdit(fixAllEdit))) { const componentName = '[roslyn.client.nestedCodeAction]'; const errorMessage = 'Failed to make am edit for completion.'; diff --git a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts index aebfa77e19..3e5588236f 100644 --- a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts +++ b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts @@ -5,21 +5,21 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { HostExecutableInformation } from '../../shared/constants/hostExecutableInformation'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { PlatformInformation } from '../../shared/platform'; -import { languageServerOptions } from '../../shared/options'; +import { HostExecutableInformation } from '../../shared/constants/hostExecutableInformation.js'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; +import { PlatformInformation } from '../../shared/platform.js'; +import { languageServerOptions } from '../../shared/options.js'; import { existsSync } from 'fs'; -import { CSharpExtensionId } from '../../constants/csharpExtensionId'; +import { CSharpExtensionId } from '../../constants/csharpExtensionId.js'; import { readFile } from 'fs/promises'; import { DotnetInstallMode, IDotnetAcquireContext, IDotnetAcquireResult, IDotnetFindPathContext, -} from './dotnetRuntimeExtensionApi'; -import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +} from './dotnetRuntimeExtensionApi.js'; +import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion.js'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; const DotNetMajorVersion = '10'; const DotNetMinorVersion = '0'; diff --git a/src/lsptoolshost/extensions/builtInComponents.ts b/src/lsptoolshost/extensions/builtInComponents.ts index 26d170326d..7575300ec5 100644 --- a/src/lsptoolshost/extensions/builtInComponents.ts +++ b/src/lsptoolshost/extensions/builtInComponents.ts @@ -6,7 +6,8 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; -import { LanguageServerOptions } from '../../shared/options'; +import { fileURLToPath } from 'url'; +import { LanguageServerOptions } from '../../shared/options.js'; interface ComponentInfo { defaultFolderName: string; @@ -80,5 +81,5 @@ function getComponentFolderPath(component: ComponentInfo, options: LanguageServe } } - return path.join(__dirname, '..', component.defaultFolderName); + return path.join(path.dirname(fileURLToPath(import.meta.url)), '..', component.defaultFolderName); } diff --git a/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts b/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts index b158753b9f..b1946c7b7b 100644 --- a/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts +++ b/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; import { ParameterStructures, PartialResultParams, diff --git a/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts b/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts index a006fa06b8..34df95aa23 100644 --- a/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts +++ b/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; -import { RefreshSourceGeneratorsNotification } from '../server/roslynProtocol'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; +import { RefreshSourceGeneratorsNotification } from '../server/roslynProtocol.js'; export function registerSourceGeneratorRefresh( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/handlers/showToastNotification.ts b/src/lsptoolshost/handlers/showToastNotification.ts index e11f52d1b9..4da2fbb66f 100644 --- a/src/lsptoolshost/handlers/showToastNotification.ts +++ b/src/lsptoolshost/handlers/showToastNotification.ts @@ -4,10 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageClient } from '../server/roslynLanguageClient'; +import { RoslynLanguageClient } from '../server/roslynLanguageClient.js'; import { MessageType } from 'vscode-languageclient'; -import { ShowToastNotification } from '../server/roslynProtocol'; -import { showErrorMessage, showInformationMessage, showWarningMessage } from '../../shared/observers/utils/showMessage'; +import { ShowToastNotification } from '../server/roslynProtocol.js'; +import { + showErrorMessage, + showInformationMessage, + showWarningMessage, +} from '../../shared/observers/utils/showMessage.js'; export function registerShowToastNotification(client: RoslynLanguageClient) { client.onNotification(ShowToastNotification.type, async (notification) => { diff --git a/src/lsptoolshost/logging/collectLogs.ts b/src/lsptoolshost/logging/collectLogs.ts index fff9750de0..4df967ca28 100644 --- a/src/lsptoolshost/logging/collectLogs.ts +++ b/src/lsptoolshost/logging/collectLogs.ts @@ -6,9 +6,9 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage.js'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel.js'; import { DumpRequest, collectDumps, @@ -21,8 +21,8 @@ import { createActivityLogCapture, generateReadmeContent, LogsToCollect, -} from './loggingUtils'; -import { runDotnetTraceInTerminal } from './profiling'; +} from './loggingUtils.js'; +import { runDotnetTraceInTerminal } from './profiling.js'; /** Represents the types of data the user can choose to collect */ type CollectOption = 'activityLogs' | 'performanceTrace' | 'memoryDump' | 'gcDump'; diff --git a/src/lsptoolshost/logging/loggingUtils.ts b/src/lsptoolshost/logging/loggingUtils.ts index 33e1d3b6ee..7b234b8146 100644 --- a/src/lsptoolshost/logging/loggingUtils.ts +++ b/src/lsptoolshost/logging/loggingUtils.ts @@ -7,10 +7,10 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import archiver from 'archiver'; -import { execChildProcess } from '../../common'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel'; -import { ActivityLogCapture, ActivityLogResult } from '../../csharpExtensionExports'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { execChildProcess } from '../../common.js'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel.js'; +import { ActivityLogCapture, ActivityLogResult } from '../../csharpExtensionExports.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; /** * Configuration for a dump tool. diff --git a/src/lsptoolshost/logging/profiling.ts b/src/lsptoolshost/logging/profiling.ts index 0ed2d5cb0d..33d8e74bb5 100644 --- a/src/lsptoolshost/logging/profiling.ts +++ b/src/lsptoolshost/logging/profiling.ts @@ -7,7 +7,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import { EOL } from 'os'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel.js'; const TraceTerminalName = 'dotnet-trace'; diff --git a/src/lsptoolshost/options/configurationMiddleware.ts b/src/lsptoolshost/options/configurationMiddleware.ts index e8bfc1bd89..528676c55e 100644 --- a/src/lsptoolshost/options/configurationMiddleware.ts +++ b/src/lsptoolshost/options/configurationMiddleware.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { ConfigurationParams } from 'vscode-languageclient'; -import { convertServerOptionNameToClientConfigurationName as convertServerOptionNameToClientConfigurationName } from './optionNameConverter'; -import { readEquivalentVsCodeConfiguration } from './universalEditorConfigProvider'; +import { convertServerOptionNameToClientConfigurationName as convertServerOptionNameToClientConfigurationName } from './optionNameConverter.js'; +import { readEquivalentVsCodeConfiguration } from './universalEditorConfigProvider.js'; export function readConfigurations(params: ConfigurationParams): (string | null)[] { // Note: null means there is no such configuration in client. diff --git a/src/lsptoolshost/options/optionChanges.ts b/src/lsptoolshost/options/optionChanges.ts index 0bc5f878d4..5596ef9489 100644 --- a/src/lsptoolshost/options/optionChanges.ts +++ b/src/lsptoolshost/options/optionChanges.ts @@ -5,10 +5,14 @@ import * as vscode from 'vscode'; import { Observable } from 'rxjs'; -import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../../shared/options'; -import { HandleOptionChanges, OptionChangeObserver, OptionChanges } from '../../shared/observers/optionChangeObserver'; -import Disposable from '../../disposable'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; +import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../../shared/options.js'; +import { + HandleOptionChanges, + OptionChangeObserver, + OptionChanges, +} from '../../shared/observers/optionChangeObserver.js'; +import Disposable from '../../disposable.js'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.js'; export function registerLanguageServerOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { diff --git a/src/lsptoolshost/projectContext/projectContextCommands.ts b/src/lsptoolshost/projectContext/projectContextCommands.ts index 4715f74ab5..2acfc515a7 100644 --- a/src/lsptoolshost/projectContext/projectContextCommands.ts +++ b/src/lsptoolshost/projectContext/projectContextCommands.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { isRelevantDocument } from './projectContextService'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { VSProjectContext } from '../server/roslynProtocol'; +import { isRelevantDocument } from './projectContextService.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { VSProjectContext } from '../server/roslynProtocol.js'; import { CancellationToken } from 'vscode-languageclient'; export const changeProjectContextCommandName = 'csharp.changeProjectContext'; diff --git a/src/lsptoolshost/projectContext/projectContextFeature.ts b/src/lsptoolshost/projectContext/projectContextFeature.ts index e8759839fc..a3d91df426 100644 --- a/src/lsptoolshost/projectContext/projectContextFeature.ts +++ b/src/lsptoolshost/projectContext/projectContextFeature.ts @@ -22,7 +22,7 @@ import { TextDocumentRegistrationOptions, } from 'vscode-languageclient'; -import * as RoslynProtocol from '../server/roslynProtocol'; +import * as RoslynProtocol from '../server/roslynProtocol.js'; import { randomUUID } from 'crypto'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/projectContext/projectContextService.ts b/src/lsptoolshost/projectContext/projectContextService.ts index 53df227d52..dc7b5828bb 100644 --- a/src/lsptoolshost/projectContext/projectContextService.ts +++ b/src/lsptoolshost/projectContext/projectContextService.ts @@ -4,20 +4,20 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; import { ProjectContextRefreshRequest, VSGetProjectContextsRequest, VSProjectContext, VSProjectContextList, -} from '../server/roslynProtocol'; +} from '../server/roslynProtocol.js'; import { TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter'; -import { LanguageServerEvents, ServerState } from '../server/languageServerEvents'; -import { RoslynLanguageClient } from '../server/roslynLanguageClient'; -import { languageServerOptions } from '../../shared/options'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; -import { RazorLanguage } from '../../razor/src/razorLanguage'; +import { UriConverter } from '../utils/uriConverter.js'; +import { LanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; +import { RoslynLanguageClient } from '../server/roslynLanguageClient.js'; +import { languageServerOptions } from '../../shared/options.js'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.js'; +import { RazorLanguage } from '../../razor/src/razorLanguage.js'; export interface ProjectContextChangeEvent { document: vscode.TextDocument; diff --git a/src/lsptoolshost/projectContext/projectContextStatus.ts b/src/lsptoolshost/projectContext/projectContextStatus.ts index 7c3028962a..5dc66fce74 100644 --- a/src/lsptoolshost/projectContext/projectContextStatus.ts +++ b/src/lsptoolshost/projectContext/projectContextStatus.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { languageServerOptions } from '../../shared/options'; -import { RazorLanguage } from '../../razor/src/razorLanguage'; -import { ServerState } from '../server/languageServerEvents'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { languageServerOptions } from '../../shared/options.js'; +import { RazorLanguage } from '../../razor/src/razorLanguage.js'; +import { ServerState } from '../server/languageServerEvents.js'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.js'; export class ProjectContextStatus { static createStatusItem(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { diff --git a/src/lsptoolshost/projectRestore/restore.ts b/src/lsptoolshost/projectRestore/restore.ts index dbabc0b2d1..2763c923db 100644 --- a/src/lsptoolshost/projectRestore/restore.ts +++ b/src/lsptoolshost/projectRestore/restore.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { RestorableProjects, RestoreParams, RestoreRequest } from '../server/roslynProtocol'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RestorableProjects, RestoreParams, RestoreRequest } from '../server/roslynProtocol.js'; import path from 'path'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage.js'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; import { CancellationToken } from 'vscode-languageclient'; let _restoreInProgress = false; diff --git a/src/lsptoolshost/razor/documentContentsRequest.ts b/src/lsptoolshost/razor/documentContentsRequest.ts index ea9584b05f..9843b947b3 100644 --- a/src/lsptoolshost/razor/documentContentsRequest.ts +++ b/src/lsptoolshost/razor/documentContentsRequest.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { TextDocumentIdentifier } from 'vscode-languageclient'; -import { GeneratedDocumentKind } from './generatedDocumentKind'; +import { GeneratedDocumentKind } from './generatedDocumentKind.js'; export class DocumentContentsRequest { constructor( diff --git a/src/lsptoolshost/razor/htmlDocument.ts b/src/lsptoolshost/razor/htmlDocument.ts index e39f2e9773..1357ef0d25 100644 --- a/src/lsptoolshost/razor/htmlDocument.ts +++ b/src/lsptoolshost/razor/htmlDocument.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getUriPath } from '../../razor/src/uriPaths'; +import { getUriPath } from '../../razor/src/uriPaths.js'; export class HtmlDocument { public readonly path: string; diff --git a/src/lsptoolshost/razor/htmlDocumentContentProvider.ts b/src/lsptoolshost/razor/htmlDocumentContentProvider.ts index 1401a6d05e..17e6e43f76 100644 --- a/src/lsptoolshost/razor/htmlDocumentContentProvider.ts +++ b/src/lsptoolshost/razor/htmlDocumentContentProvider.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; -import { HtmlDocumentManager } from './htmlDocumentManager'; -import { getUriPath } from '../../razor/src/uriPaths'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; +import { HtmlDocumentManager } from './htmlDocumentManager.js'; +import { getUriPath } from '../../razor/src/uriPaths.js'; export class HtmlDocumentContentProvider implements vscode.TextDocumentContentProvider { public static readonly scheme = 'razor-html'; diff --git a/src/lsptoolshost/razor/htmlDocumentManager.ts b/src/lsptoolshost/razor/htmlDocumentManager.ts index 69f0f8531b..72fdd431e2 100644 --- a/src/lsptoolshost/razor/htmlDocumentManager.ts +++ b/src/lsptoolshost/razor/htmlDocumentManager.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { PlatformInformation } from '../../shared/platform'; -import { getUriPath } from '../../razor/src/uriPaths'; -import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider'; -import { HtmlDocument } from './htmlDocument'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; +import { PlatformInformation } from '../../shared/platform.js'; +import { getUriPath } from '../../razor/src/uriPaths.js'; +import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider.js'; +import { HtmlDocument } from './htmlDocument.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; import { RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter'; +import { UriConverter } from '../utils/uriConverter.js'; const virtualHtmlSuffix = '__virtual.html'; diff --git a/src/lsptoolshost/razor/razorEndpoints.ts b/src/lsptoolshost/razor/razorEndpoints.ts index 3c619c4f18..6fba7a97c5 100644 --- a/src/lsptoolshost/razor/razorEndpoints.ts +++ b/src/lsptoolshost/razor/razorEndpoints.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; import { ColorPresentationRequest, CompletionRequest, @@ -29,21 +29,21 @@ import { SignatureHelp, SignatureHelpRequest, } from 'vscode-languageclient'; -import { HtmlUpdateParameters } from './htmlUpdateParameters'; -import { UriConverter } from '../utils/uriConverter'; -import { PlatformInformation } from '../../shared/platform'; -import { HtmlDocumentManager } from './htmlDocumentManager'; -import { DocumentColorHandler } from '../../razor/src/documentColor/documentColorHandler'; -import { ColorPresentationHandler } from '../../razor/src/colorPresentation/colorPresentationHandler'; -import { convertRangeToSerializable } from '../../razor/src/rpc/serializableRange'; -import { FoldingRangeHandler } from '../../razor/src/folding/foldingRangeHandler'; -import { CompletionHandler } from '../../razor/src/completion/completionHandler'; -import { FormattingHandler } from '../../razor/src/formatting/formattingHandler'; -import { HtmlDocument } from './htmlDocument'; -import { HtmlForwardedRequest } from './htmlForwardedRequest'; -import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider'; -import { ShowGeneratedDocumentCommand } from './showGeneratedDocumentCommand'; -import { RazorLanguageConfiguration } from '../../razor/src/razorLanguageConfiguration'; +import { HtmlUpdateParameters } from './htmlUpdateParameters.js'; +import { UriConverter } from '../utils/uriConverter.js'; +import { PlatformInformation } from '../../shared/platform.js'; +import { HtmlDocumentManager } from './htmlDocumentManager.js'; +import { DocumentColorHandler } from '../../razor/src/documentColor/documentColorHandler.js'; +import { ColorPresentationHandler } from '../../razor/src/colorPresentation/colorPresentationHandler.js'; +import { convertRangeToSerializable } from '../../razor/src/rpc/serializableRange.js'; +import { FoldingRangeHandler } from '../../razor/src/folding/foldingRangeHandler.js'; +import { CompletionHandler } from '../../razor/src/completion/completionHandler.js'; +import { FormattingHandler } from '../../razor/src/formatting/formattingHandler.js'; +import { HtmlDocument } from './htmlDocument.js'; +import { HtmlForwardedRequest } from './htmlForwardedRequest.js'; +import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider.js'; +import { ShowGeneratedDocumentCommand } from './showGeneratedDocumentCommand.js'; +import { RazorLanguageConfiguration } from '../../razor/src/razorLanguageConfiguration.js'; export function registerRazorEndpoints( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts b/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts index de5f8afab9..a52730152d 100644 --- a/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts +++ b/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RazorLanguage } from '../../razor/src/razorLanguage'; -import { getUriPath } from '../../razor/src/uriPaths'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { DocumentContentsRequest } from './documentContentsRequest'; +import { RazorLanguage } from '../../razor/src/razorLanguage.js'; +import { getUriPath } from '../../razor/src/uriPaths.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { DocumentContentsRequest } from './documentContentsRequest.js'; import { CancellationToken, RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter'; -import { GeneratedDocumentKind } from './generatedDocumentKind'; +import { UriConverter } from '../utils/uriConverter.js'; +import { GeneratedDocumentKind } from './generatedDocumentKind.js'; export class ShowGeneratedDocumentCommand { private static requestType = new RequestType( diff --git a/src/lsptoolshost/server/languageServerEvents.ts b/src/lsptoolshost/server/languageServerEvents.ts index 3aa9756ef3..3f06222ed5 100644 --- a/src/lsptoolshost/server/languageServerEvents.ts +++ b/src/lsptoolshost/server/languageServerEvents.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IDisposable } from '../../disposable'; +import { IDisposable } from '../../disposable.js'; export enum ServerState { Stopped = 0, diff --git a/src/lsptoolshost/server/roslynLanguageClient.ts b/src/lsptoolshost/server/roslynLanguageClient.ts index d063636fea..3b371114a5 100644 --- a/src/lsptoolshost/server/roslynLanguageClient.ts +++ b/src/lsptoolshost/server/roslynLanguageClient.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; import { CancellationToken, ErrorHandler, LanguageClientOptions, MessageSignature, State } from 'vscode-languageclient'; -import CompositeDisposable from '../../compositeDisposable'; -import { IDisposable } from '../../disposable'; -import { languageServerOptions } from '../../shared/options'; -import { RoslynLspErrorCodes } from './roslynProtocol'; -import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage'; -import { ITelemetryReporter } from '../../shared/telemetryReporter'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames'; +import CompositeDisposable from '../../compositeDisposable.js'; +import { IDisposable } from '../../disposable.js'; +import { languageServerOptions } from '../../shared/options.js'; +import { RoslynLspErrorCodes } from './roslynProtocol.js'; +import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage.js'; +import { ITelemetryReporter } from '../../shared/telemetryReporter.js'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames.js'; /** * Implementation of the base LanguageClient type that allows for additional items to be disposed of diff --git a/src/lsptoolshost/server/roslynLanguageServer.ts b/src/lsptoolshost/server/roslynLanguageServer.ts index bd7fab303f..58d3ddf2cb 100644 --- a/src/lsptoolshost/server/roslynLanguageServer.ts +++ b/src/lsptoolshost/server/roslynLanguageServer.ts @@ -12,6 +12,7 @@ import { NotificationHandler0, NotificationType, PartialResultParams, + Protocol2CodeConverter, ProtocolRequestType, RequestHandler, RequestParam, @@ -22,37 +23,37 @@ import { Trace, } from 'vscode-languageclient'; import { Executable, TransportKind } from 'vscode-languageclient/node'; -import { PlatformInformation } from '../../shared/platform'; -import { readConfigurations } from '../options/configurationMiddleware'; -import * as RoslynProtocol from './roslynProtocol'; -import { CSharpDevKitExports } from '../../csharpDevKitExports'; -import { SolutionSnapshotId } from '../solutionSnapshot/ISolutionSnapshotProvider'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { csharpDevkitExtensionId, getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { PlatformInformation } from '../../shared/platform.js'; +import { readConfigurations } from '../options/configurationMiddleware.js'; +import * as RoslynProtocol from './roslynProtocol.js'; +import { CSharpDevKitExports } from '../../csharpDevKitExports.js'; +import { SolutionSnapshotId } from '../solutionSnapshot/ISolutionSnapshotProvider.js'; +import { ITelemetryReporterWithLevel } from '../../shared/telemetryReporter.js'; +import { csharpDevkitExtensionId, getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; import { randomUUID } from 'crypto'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { RoslynLanguageClient } from './roslynLanguageClient'; -import { provideDiagnostics, provideWorkspaceDiagnostics } from '../diagnostics/diagnosticMiddleware'; -import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; -import { DotnetInfo } from '../../shared/utils/dotnetInfo'; -import { RoslynLanguageServerEvents, ServerState } from './languageServerEvents'; -import { registerShowToastNotification } from '../handlers/showToastNotification'; -import { registerOnAutoInsert } from '../autoInsert/onAutoInsert'; -import { commonOptions, languageServerOptions, omnisharpOptions } from '../../shared/options'; -import { VSTextDocumentIdentifier } from './roslynProtocol'; -import { IDisposable } from '../../disposable'; -import { BuildDiagnosticsService } from '../diagnostics/buildDiagnosticsService'; -import { getComponentPaths } from '../extensions/builtInComponents'; -import { OnAutoInsertFeature } from '../autoInsert/onAutoInsertFeature'; -import { ProjectContextService } from '../projectContext/projectContextService'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames'; -import { getProfilingEnvVars } from '../logging/profiling'; -import { getServerPath } from '../activate'; -import { UriConverter } from '../utils/uriConverter'; -import { ProjectContextFeature } from '../projectContext/projectContextFeature'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; +import { RoslynLanguageClient } from './roslynLanguageClient.js'; +import { provideDiagnostics, provideWorkspaceDiagnostics } from '../diagnostics/diagnosticMiddleware.js'; +import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration.js'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.js'; +import { DotnetInfo } from '../../shared/utils/dotnetInfo.js'; +import { RoslynLanguageServerEvents, ServerState } from './languageServerEvents.js'; +import { registerShowToastNotification } from '../handlers/showToastNotification.js'; +import { registerOnAutoInsert } from '../autoInsert/onAutoInsert.js'; +import { commonOptions, languageServerOptions, omnisharpOptions } from '../../shared/options.js'; +import { VSTextDocumentIdentifier } from './roslynProtocol.js'; +import { IDisposable } from '../../disposable.js'; +import { BuildDiagnosticsService } from '../diagnostics/buildDiagnosticsService.js'; +import { getComponentPaths } from '../extensions/builtInComponents.js'; +import { OnAutoInsertFeature } from '../autoInsert/onAutoInsertFeature.js'; +import { ProjectContextService } from '../projectContext/projectContextService.js'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.js'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames.js'; +import { getProfilingEnvVars } from '../logging/profiling.js'; +import { getServerPath } from '../activate.js'; +import { UriConverter } from '../utils/uriConverter.js'; +import { ProjectContextFeature } from '../projectContext/projectContextFeature.js'; // Flag indicating if C# Devkit was installed the last time we activated. // Used to determine if we need to restart the server on extension changes. @@ -91,7 +92,7 @@ export class RoslynLanguageServer { private _languageClient: RoslynLanguageClient, private _platformInfo: PlatformInformation, private _context: vscode.ExtensionContext, - private _telemetryReporter: TelemetryReporter, + private _telemetryReporter: ITelemetryReporterWithLevel, private _languageServerEvents: RoslynLanguageServerEvents, private _channel: vscode.LogOutputChannel, private _traceChannel: vscode.LogOutputChannel @@ -125,6 +126,10 @@ export class RoslynLanguageServer { return this._state; } + public get protocol2CodeConverter(): Protocol2CodeConverter { + return this._languageClient.protocol2CodeConverter; + } + public static get processId(): number | undefined { return RoslynLanguageServer._processId; } @@ -265,7 +270,7 @@ export class RoslynLanguageServer { platformInfo: PlatformInformation, hostExecutableResolver: IHostExecutableResolver, context: vscode.ExtensionContext, - telemetryReporter: TelemetryReporter, + telemetryReporter: ITelemetryReporterWithLevel, additionalExtensionPaths: string[], languageServerEvents: RoslynLanguageServerEvents, channel: vscode.LogOutputChannel, @@ -641,7 +646,7 @@ export class RoslynLanguageServer { platformInfo: PlatformInformation, hostExecutableResolver: IHostExecutableResolver, context: vscode.ExtensionContext, - telemetryReporter: TelemetryReporter, + telemetryReporter: ITelemetryReporterWithLevel, additionalExtensionPaths: string[], channel: vscode.LogOutputChannel, csharpDevKitExtensionExports?: CSharpDevKitExports diff --git a/src/lsptoolshost/server/roslynProtocol.ts b/src/lsptoolshost/server/roslynProtocol.ts index d54d74c6c6..7d155b93d0 100644 --- a/src/lsptoolshost/server/roslynProtocol.ts +++ b/src/lsptoolshost/server/roslynProtocol.ts @@ -25,7 +25,7 @@ import { URI, WorkDoneProgressParams, } from 'vscode-languageclient'; -import { ProjectConfigurationMessage } from '../../shared/projectConfiguration'; +import { ProjectConfigurationMessage } from '../../shared/projectConfiguration.js'; export interface VSProjectContextList { _vs_projectContexts: VSProjectContext[]; diff --git a/src/lsptoolshost/server/serverCommands.ts b/src/lsptoolshost/server/serverCommands.ts index 17cf5914a6..eaae7174f3 100644 --- a/src/lsptoolshost/server/serverCommands.ts +++ b/src/lsptoolshost/server/serverCommands.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { UriConverter } from '../utils/uriConverter'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { UriConverter } from '../utils/uriConverter.js'; import * as languageClient from 'vscode-languageclient'; /** diff --git a/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts b/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts index f0da662abc..77c7ef1580 100644 --- a/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts +++ b/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts @@ -11,7 +11,7 @@ import { ServiceMoniker, ServiceRegistration, } from '@microsoft/servicehub-framework'; -import Descriptors from '../solutionSnapshot/descriptors'; +import Descriptors from '../solutionSnapshot/descriptors.js'; export class CSharpExtensionServiceBroker extends GlobalBrokeredServiceContainer { registerExternalServices(...monikers: ServiceMoniker[]) { diff --git a/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts b/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts index f346bed7ac..76c7520768 100644 --- a/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts +++ b/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider.js'; /** * Brokered service implementation. diff --git a/src/lsptoolshost/testing/unitTesting.ts b/src/lsptoolshost/testing/unitTesting.ts index f6a396ba02..714dadf3c3 100644 --- a/src/lsptoolshost/testing/unitTesting.ts +++ b/src/lsptoolshost/testing/unitTesting.ts @@ -7,12 +7,12 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import * as languageClient from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from '../server/roslynProtocol'; -import { commonOptions } from '../../shared/options'; -import { UriConverter } from '../utils/uriConverter'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from '../server/roslynProtocol.js'; +import { commonOptions } from '../../shared/options.js'; +import { UriConverter } from '../utils/uriConverter.js'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage.js'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; export function registerUnitTestingCommands(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { if (getCSharpDevKit()) { diff --git a/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts b/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts index d1c5833328..cf699e4793 100644 --- a/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts +++ b/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import * as crypto from 'crypto'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ActionOption, showWarningMessage } from '../../shared/observers/utils/showMessage'; -import { languageServerOptions } from '../../shared/options'; -import { ServerState } from '../server/languageServerEvents'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { ActionOption, showWarningMessage } from '../../shared/observers/utils/showMessage.js'; +import { languageServerOptions } from '../../shared/options.js'; +import { ServerState } from '../server/languageServerEvents.js'; const SuppressMiscellaneousFilesToastsOption = 'dotnet.server.suppressMiscellaneousFilesToasts'; const NotifiedDocuments = new Set(); diff --git a/src/lsptoolshost/workspace/workspaceCommands.ts b/src/lsptoolshost/workspace/workspaceCommands.ts index 73ee7764d1..a3b9de19c8 100644 --- a/src/lsptoolshost/workspace/workspaceCommands.ts +++ b/src/lsptoolshost/workspace/workspaceCommands.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { createLaunchTargetForSolution } from '../../shared/launchTarget'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { createLaunchTargetForSolution } from '../../shared/launchTarget.js'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; /** * Register commands that drive the workspace. diff --git a/src/lsptoolshost/workspace/workspaceStatus.ts b/src/lsptoolshost/workspace/workspaceStatus.ts index f23c81f9d3..cd1962b867 100644 --- a/src/lsptoolshost/workspace/workspaceStatus.ts +++ b/src/lsptoolshost/workspace/workspaceStatus.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; -import { languageServerOptions } from '../../shared/options'; +import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.js'; +import { languageServerOptions } from '../../shared/options.js'; export class WorkspaceStatus { static createStatusItem(context: vscode.ExtensionContext, languageServerEvents: RoslynLanguageServerEvents) { diff --git a/src/main.ts b/src/main.ts index 8d81e8327b..280b475474 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,30 +3,36 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as coreclrdebug from './coreclrDebug/activate'; -import * as util from './common'; +import * as coreclrdebug from './coreclrDebug/activate.js'; +import * as util from './common.js'; import * as vscode from 'vscode'; -import { ActivationFailure } from './shared/loggingEvents'; -import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver'; -import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver'; -import { EventStream } from './eventStream'; -import { PlatformInformation } from './shared/platform'; -import TelemetryReporter from '@vscode/extension-telemetry'; -import { vscodeNetworkSettingsProvider } from './networkSettings'; -import createOptionStream from './shared/observables/createOptionStream'; -import { AbsolutePathPackage } from './packageManager/absolutePathPackage'; -import { IInstallDependencies } from './packageManager/IInstallDependencies'; -import { installRuntimeDependencies } from './installRuntimeDependencies'; -import { MigrateOptions } from './shared/migrateOptions'; -import { CSharpExtensionExports, LimitedExtensionExports, OmnisharpExtensionExports } from './csharpExtensionExports'; -import { getCSharpDevKit } from './utils/getCSharpDevKit'; -import { commonOptions, omnisharpOptions } from './shared/options'; -import { TelemetryEventNames } from './shared/telemetryEventNames'; -import { checkDotNetRuntimeExtensionVersion } from './checkDotNetRuntimeExtensionVersion'; -import { checkIsSupportedPlatform } from './checkSupportedPlatform'; -import { activateRoslyn } from './activateRoslyn'; -import { LimitedActivationStatus } from './shared/limitedActivationStatus'; +import { ActivationFailure } from './shared/loggingEvents.js'; +import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver.js'; +import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver.js'; +import { EventStream } from './eventStream.js'; +import { PlatformInformation } from './shared/platform.js'; +import telemetryReporterModule from '@vscode/extension-telemetry'; +import { vscodeNetworkSettingsProvider } from './networkSettings.js'; +import createOptionStream from './shared/observables/createOptionStream.js'; +import { AbsolutePathPackage } from './packageManager/absolutePathPackage.js'; +import { IInstallDependencies } from './packageManager/IInstallDependencies.js'; +import { installRuntimeDependencies } from './installRuntimeDependencies.js'; +import { MigrateOptions } from './shared/migrateOptions.js'; +import { + CSharpExtensionExports, + LimitedExtensionExports, + OmnisharpExtensionExports, +} from './csharpExtensionExports.js'; +import { getCSharpDevKit } from './utils/getCSharpDevKit.js'; +import { commonOptions, omnisharpOptions } from './shared/options.js'; +import { TelemetryEventNames } from './shared/telemetryEventNames.js'; +import { checkDotNetRuntimeExtensionVersion } from './checkDotNetRuntimeExtensionVersion.js'; +import { checkIsSupportedPlatform } from './checkSupportedPlatform.js'; +import { activateRoslyn } from './activateRoslyn.js'; +import { LimitedActivationStatus } from './shared/limitedActivationStatus.js'; + +const TelemetryReporter = telemetryReporterModule.default; export async function activate( context: vscode.ExtensionContext @@ -85,8 +91,8 @@ export async function activate( const installDependencies: IInstallDependencies = async (dependencies: AbsolutePathPackage[]) => { // Defer loading the download/zip stack (yauzl, proxy agents, fs-extra, etc.) until a // component actually needs to be downloaded, which normally never happens after install. - const { downloadAndInstallPackages } = await import('./packageManager/downloadAndInstallPackages'); - const { isValidDownload } = await import('./packageManager/isValidDownload'); + const { downloadAndInstallPackages } = await import('./packageManager/downloadAndInstallPackages.js'); + const { isValidDownload } = await import('./packageManager/isValidDownload.js'); return downloadAndInstallPackages( dependencies, networkSettingsProvider, @@ -152,7 +158,7 @@ export async function activate( } else { // Defer loading the OmniSharp implementation and its module graph until we actually // activate it, so the default Roslyn activations don't pay to compile/execute it. - const { activateOmniSharp } = await import('./activateOmniSharp'); + const { activateOmniSharp } = await import('./activateOmniSharp.js'); exports = activateOmniSharp( context, platformInfo, diff --git a/src/networkSettings.ts b/src/networkSettings.ts index f94e0b5f23..a6002be0a7 100644 --- a/src/networkSettings.ts +++ b/src/networkSettings.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from './vscodeAdapter'; +import { vscode } from './vscodeAdapter.js'; export default class NetworkSettings { constructor( diff --git a/src/omnisharp/dotnetResolver.ts b/src/omnisharp/dotnetResolver.ts index 741f42254e..2f6b1a68f9 100644 --- a/src/omnisharp/dotnetResolver.ts +++ b/src/omnisharp/dotnetResolver.ts @@ -7,10 +7,10 @@ import { exec } from 'child_process'; import * as path from 'path'; import * as semver from 'semver'; import { promisify } from 'util'; -import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { PlatformInformation } from '../shared/platform'; -import { omnisharpOptions } from '../shared/options'; +import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation.js'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; +import { PlatformInformation } from '../shared/platform.js'; +import { omnisharpOptions } from '../shared/options.js'; export class DotnetResolver implements IHostExecutableResolver { private readonly minimumDotnetVersion = '6.0.100'; diff --git a/src/omnisharp/engines/IEngine.ts b/src/omnisharp/engines/IEngine.ts index 48affd1778..d75d5101b6 100644 --- a/src/omnisharp/engines/IEngine.ts +++ b/src/omnisharp/engines/IEngine.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CancellationToken } from '../../vscodeAdapter'; -import { LaunchTarget } from '../../shared/launchTarget'; -import Disposable from '../../disposable'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { Advisor } from '../features/diagnosticsProvider'; -import TestManager from '../features/dotnetTest'; -import { EventStream } from '../../eventStream'; +import { CancellationToken } from '../../vscodeAdapter.js'; +import { LaunchTarget } from '../../shared/launchTarget.js'; +import Disposable from '../../disposable.js'; +import { OmniSharpServer } from '../server.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { Advisor } from '../features/diagnosticsProvider.js'; +import TestManager from '../features/dotnetTest.js'; +import { EventStream } from '../../eventStream.js'; export interface IEngine { start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string): Promise; diff --git a/src/omnisharp/engines/lspEngine.ts b/src/omnisharp/engines/lspEngine.ts index 793d542ac9..3d63ddac69 100644 --- a/src/omnisharp/engines/lspEngine.ts +++ b/src/omnisharp/engines/lspEngine.ts @@ -3,37 +3,43 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; -import { CancellationToken } from '../../vscodeAdapter'; -import { configure } from '../launcher'; -import { LaunchTarget } from '../../shared/launchTarget'; +import * as protocol from '../protocol.js'; +import { CancellationToken } from '../../vscodeAdapter.js'; +import { configure } from '../launcher.js'; +import { LaunchTarget } from '../../shared/launchTarget.js'; import { EventEmitter } from 'events'; import { setTimeout } from 'timers'; -import * as ObservableEvents from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import CompositeDisposable from '../../compositeDisposable'; -import Disposable from '../../disposable'; +import * as ObservableEvents from '../omnisharpLoggingEvents.js'; +import { EventStream } from '../../eventStream.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import Disposable from '../../disposable.js'; import { ExtensionContext, CancellationTokenSource, LogOutputChannel, Location, CodeLens, Uri } from 'vscode'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { Events, OmniSharpServer } from '../server'; -import { IEngine } from './IEngine'; -import { PlatformInformation } from '../../shared/platform'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { Command, RequestType, Trace } from 'vscode-languageclient'; -import { DynamicFeature, LanguageClientOptions, StaticFeature } from 'vscode-languageclient'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { Events, OmniSharpServer } from '../server.js'; +import { IEngine } from './IEngine.js'; +import { PlatformInformation } from '../../shared/platform.js'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; +import { + CallHierarchyPrepareRequest, + Command, + DeclarationRequest, + DidChangeWorkspaceFoldersNotification, + DocumentColorRequest, + DocumentDiagnosticRequest, + DocumentLinkRequest, + DynamicFeature, + InlineValueRequest, + LanguageClientOptions, + NotebookDocumentSyncRegistrationType, + RequestType, + SelectionRangeRequest, + StaticFeature, + Trace, + TypeHierarchyPrepareRequest, +} from 'vscode-languageclient'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; -import { SelectionRangeFeature } from 'vscode-languageclient/selectionRange'; -import { ColorProviderFeature } from 'vscode-languageclient/colorProvider'; -import { WorkspaceFoldersFeature } from 'vscode-languageclient/workspaceFolder'; -import { DeclarationFeature } from 'vscode-languageclient/declaration'; -import { DocumentLinkFeature } from 'vscode-languageclient/documentLink'; -import { InlineValueFeature } from 'vscode-languageclient/inlineValue'; -import { DiagnosticFeature } from 'vscode-languageclient/diagnostic'; -import { NotebookDocumentSyncFeature } from 'vscode-languageclient/notebook'; -import { TypeHierarchyFeature } from 'vscode-languageclient/typeHierarchy'; -import { CallHierarchyFeature } from 'vscode-languageclient/callHierarchy'; -import { Advisor } from '../features/diagnosticsProvider'; -import dotnetTest from '../features/dotnetTest'; +import { Advisor } from '../features/diagnosticsProvider.js'; +import dotnetTest from '../features/dotnetTest.js'; export class LspEngine implements IEngine { client: LanguageClient | undefined; @@ -246,41 +252,44 @@ export class LspEngine implements IEngine { // The goal here is to disable all the features and light them up over time. const features: (StaticFeature | DynamicFeature)[] = (client as any)._features; - function disableFeature(ctor: { new (...args: any[]): StaticFeature | DynamicFeature }): void { - const index = features.findIndex((z) => z instanceof ctor); + function disableFeature(featureId: string): void { + const index = features.findIndex((feature) => { + const state = feature.getState(); + return state.kind !== 'static' && state.id === featureId; + }); if (index > -1) { features.splice(index, 1); } } - disableFeature(CallHierarchyFeature); // Not implemented in O# + disableFeature(CallHierarchyPrepareRequest.method); // Not implemented in O# //disableFeature(CodeActionFeature); //disableFeature(CodeLensFeature); // Only supports Reference codelens at this time. Does not support Run/Debug Test codelens. - disableFeature(ColorProviderFeature); // Not implemented in O# + disableFeature(DocumentColorRequest.method); // Not implemented in O# //disableFeature(CompletionItemFeature); - disableFeature(DeclarationFeature); // Not implemented in O# + disableFeature(DeclarationRequest.method); // Not implemented in O# //disableFeature(DefinitionFeature); // Needs metadata document/source generated document support - disableFeature(DiagnosticFeature); + disableFeature(DocumentDiagnosticRequest.method); //disableFeature(DocumentFormattingFeature); //disableFeature(DocumentRangeFormattingFeature); //disableFeature(DocumentOnTypeFormattingFeature); // This feature does not seem to be triggering //disableFeature(DocumentHighlightFeature); - disableFeature(DocumentLinkFeature); // Not implemented in O# + disableFeature(DocumentLinkRequest.method); // Not implemented in O# //disableFeature(DocumentSymbolFeature); //disableFeature(FoldingRangeFeature); //disableFeature(HoverFeature); // This feature does not always seem to be working. Wonder if requests are coming in too early. //disableFeature(ImplementationFeature); // Needs metadata document/source generated document support //disableFeature(InlayHintsFeature); // The csharp-language-server-protocol library needs to update with 3.17 changes - disableFeature(InlineValueFeature); // Not implemented in O# - disableFeature(NotebookDocumentSyncFeature); // Not implemented in O# + disableFeature(InlineValueRequest.method); // Not implemented in O# + disableFeature(NotebookDocumentSyncRegistrationType.method); // Not implemented in O# //disableFeature(ReferencesFeature); // Needs metadata document/source generated document support //disableFeature(RenameFeature); - disableFeature(SelectionRangeFeature); // Not implemented in O# + disableFeature(SelectionRangeRequest.method); // Not implemented in O# //disableFeature(SemanticTokensFeature); // This feature does not always seem to be working. Wonder if requests are coming in too early. //disableFeature(SignatureHelpFeature); //disableFeature(TypeDefinitionFeature); // Needs metadata document/source generated document support - disableFeature(TypeHierarchyFeature); // Not implemented in O# - disableFeature(WorkspaceFoldersFeature); // Not implemented in O# + disableFeature(TypeHierarchyPrepareRequest.method); // Not implemented in O# + disableFeature(DidChangeWorkspaceFoldersNotification.method); // Not implemented in O# //disableFeature(WorkspaceSymbolFeature); const interopFeature = this.createInteropFeature(client); diff --git a/src/omnisharp/engines/stdioEngine.ts b/src/omnisharp/engines/stdioEngine.ts index 5fa9640d8e..dd151a7eba 100644 --- a/src/omnisharp/engines/stdioEngine.ts +++ b/src/omnisharp/engines/stdioEngine.ts @@ -3,52 +3,52 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; -import * as utils from '../../common'; -import { CancellationToken } from '../../vscodeAdapter'; +import * as protocol from '../protocol.js'; +import * as utils from '../../common.js'; +import { CancellationToken } from '../../vscodeAdapter.js'; import { ChildProcess, exec } from 'child_process'; -import { LaunchTarget } from '../../shared/launchTarget'; +import { LaunchTarget } from '../../shared/launchTarget.js'; import { ReadLine, createInterface } from 'readline'; -import { Request, RequestQueueCollection } from '../requestQueue'; +import { Request, RequestQueueCollection } from '../requestQueue.js'; import { EventEmitter } from 'events'; -import { omnisharpOptions } from '../../shared/options'; -import { PlatformInformation } from '../../shared/platform'; -import { launchOmniSharp } from '../launcher'; +import { omnisharpOptions } from '../../shared/options.js'; +import { PlatformInformation } from '../../shared/platform.js'; +import { launchOmniSharp } from '../launcher.js'; import { setTimeout } from 'timers'; -import * as ObservableEvents from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import CompositeDisposable from '../../compositeDisposable'; -import Disposable from '../../disposable'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { removeBOMFromBuffer, removeBOMFromString } from '../../utils/removeBom'; -import { IEngine } from './IEngine'; -import { Events, OmniSharpServer } from '../server'; -import DefinitionMetadataDocumentProvider from '../features/definitionMetadataDocumentProvider'; -import SourceGeneratedDocumentProvider from '../features/sourceGeneratedDocumentProvider'; +import * as ObservableEvents from '../omnisharpLoggingEvents.js'; +import { EventStream } from '../../eventStream.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import Disposable from '../../disposable.js'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; +import { removeBOMFromBuffer, removeBOMFromString } from '../../utils/removeBom.js'; +import { IEngine } from './IEngine.js'; +import { Events, OmniSharpServer } from '../server.js'; +import DefinitionMetadataDocumentProvider from '../features/definitionMetadataDocumentProvider.js'; +import SourceGeneratedDocumentProvider from '../features/sourceGeneratedDocumentProvider.js'; import * as vscode from 'vscode'; -import OmniSharpCodeLensProvider from '../features/codeLensProvider'; -import OmniSharpDocumentHighlightProvider from '../features/documentHighlightProvider'; -import OmniSharpDocumentSymbolProvider from '../features/documentSymbolProvider'; -import OmniSharpHoverProvider from '../features/hoverProvider'; -import OmniSharpRenameProvider from '../features/renameProvider'; -import OmniSharpFormatProvider from '../features/formattingEditProvider'; -import OmniSharpWorkspaceSymbolProvider from '../features/workspaceSymbolProvider'; -import OmniSharpSignatureHelpProvider from '../features/signatureHelpProvider'; -import { OmniSharpFixAllProvider } from '../features/fixAllProvider'; -import OmniSharpCompletionProvider, { CompletionAfterInsertCommand } from '../features/completionProvider'; -import OmniSharpReferenceProvider from '../features/referenceProvider'; -import OmniSharpImplementationProvider from '../features/implementationProvider'; -import OmniSharpSemanticTokensProvider from '../features/semanticTokensProvider'; -import OmniSharpInlayHintProvider from '../features/inlayHintProvider'; -import fileOpenClose from '../features/fileOpenCloseProvider'; -import trackVirtualDocuments from '../features/virtualDocumentTracker'; -import OmniSharpCodeActionProvider from '../features/codeActionProvider'; -import forwardChanges from '../features/changeForwarding'; -import OmniSharpDefinitionProvider from '../features/definitionProvider'; -import reportDiagnostics, { Advisor } from '../features/diagnosticsProvider'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import TestManager from '../features/dotnetTest'; -import { OmniSharpStructureProvider } from '../features/structureProvider'; +import OmniSharpCodeLensProvider from '../features/codeLensProvider.js'; +import OmniSharpDocumentHighlightProvider from '../features/documentHighlightProvider.js'; +import OmniSharpDocumentSymbolProvider from '../features/documentSymbolProvider.js'; +import OmniSharpHoverProvider from '../features/hoverProvider.js'; +import OmniSharpRenameProvider from '../features/renameProvider.js'; +import OmniSharpFormatProvider from '../features/formattingEditProvider.js'; +import OmniSharpWorkspaceSymbolProvider from '../features/workspaceSymbolProvider.js'; +import OmniSharpSignatureHelpProvider from '../features/signatureHelpProvider.js'; +import { OmniSharpFixAllProvider } from '../features/fixAllProvider.js'; +import OmniSharpCompletionProvider, { CompletionAfterInsertCommand } from '../features/completionProvider.js'; +import OmniSharpReferenceProvider from '../features/referenceProvider.js'; +import OmniSharpImplementationProvider from '../features/implementationProvider.js'; +import OmniSharpSemanticTokensProvider from '../features/semanticTokensProvider.js'; +import OmniSharpInlayHintProvider from '../features/inlayHintProvider.js'; +import fileOpenClose from '../features/fileOpenCloseProvider.js'; +import trackVirtualDocuments from '../features/virtualDocumentTracker.js'; +import OmniSharpCodeActionProvider from '../features/codeActionProvider.js'; +import forwardChanges from '../features/changeForwarding.js'; +import OmniSharpDefinitionProvider from '../features/definitionProvider.js'; +import reportDiagnostics, { Advisor } from '../features/diagnosticsProvider.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import TestManager from '../features/dotnetTest.js'; +import { OmniSharpStructureProvider } from '../features/structureProvider.js'; export class StdioEngine implements IEngine { private static _nextId = 1; diff --git a/src/omnisharp/features/abstractProvider.ts b/src/omnisharp/features/abstractProvider.ts index 02ae33c313..05520298c1 100644 --- a/src/omnisharp/features/abstractProvider.ts +++ b/src/omnisharp/features/abstractProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server'; -import CompositeDisposable from '../../compositeDisposable'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { OmniSharpServer } from '../server.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; export default abstract class AbstractProvider { protected _server: OmniSharpServer; diff --git a/src/omnisharp/features/changeForwarding.ts b/src/omnisharp/features/changeForwarding.ts index b07394c43b..84686a5918 100644 --- a/src/omnisharp/features/changeForwarding.ts +++ b/src/omnisharp/features/changeForwarding.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { Uri, workspace } from 'vscode'; -import { OmniSharpServer } from '../server'; -import * as serverUtils from '../utils'; -import { FileChangeType } from '../protocol'; -import { IDisposable } from '../../disposable'; -import CompositeDisposable from '../../compositeDisposable'; +import { OmniSharpServer } from '../server.js'; +import * as serverUtils from '../utils.js'; +import { FileChangeType } from '../protocol.js'; +import { IDisposable } from '../../disposable.js'; +import CompositeDisposable from '../../compositeDisposable.js'; function forwardDocumentChanges(server: OmniSharpServer): IDisposable { return workspace.onDidChangeTextDocument((event) => { diff --git a/src/omnisharp/features/codeActionProvider.ts b/src/omnisharp/features/codeActionProvider.ts index 736457a937..eade6470f0 100644 --- a/src/omnisharp/features/codeActionProvider.ts +++ b/src/omnisharp/features/codeActionProvider.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { OmniSharpServer } from '../server'; -import AbstractProvider from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import CompositeDisposable from '../../compositeDisposable'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { buildEditForResponse } from '../fileOperationsResponseEditBuilder'; -import { omnisharpOptions } from '../../shared/options'; +import { OmniSharpServer } from '../server.js'; +import AbstractProvider from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { buildEditForResponse } from '../fileOperationsResponseEditBuilder.js'; +import { omnisharpOptions } from '../../shared/options.js'; export default class OmniSharpCodeActionProvider extends AbstractProvider diff --git a/src/omnisharp/features/codeLensProvider.ts b/src/omnisharp/features/codeLensProvider.ts index be46b9bf63..202d7e13d4 100644 --- a/src/omnisharp/features/codeLensProvider.ts +++ b/src/omnisharp/features/codeLensProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; import * as vscode from 'vscode'; -import { toLocation } from '../typeConversion'; -import AbstractProvider from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import { omnisharpOptions } from '../../shared/options'; -import TestManager from './dotnetTest'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { toLocation } from '../typeConversion.js'; +import AbstractProvider from './abstractProvider.js'; +import { OmniSharpServer } from '../server.js'; +import { omnisharpOptions } from '../../shared/options.js'; +import TestManager from './dotnetTest.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; diff --git a/src/omnisharp/features/commands.ts b/src/omnisharp/features/commands.ts index 8f26d58031..ebbf730eb3 100644 --- a/src/omnisharp/features/commands.ts +++ b/src/omnisharp/features/commands.ts @@ -3,30 +3,30 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server'; -import * as serverUtils from '../utils'; -import { findLaunchTargets } from '../launcher'; -import { LaunchTarget } from '../../shared/launchTarget'; +import { OmniSharpServer } from '../server.js'; +import * as serverUtils from '../utils.js'; +import { findLaunchTargets } from '../launcher.js'; +import { LaunchTarget } from '../../shared/launchTarget.js'; import * as cp from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; -import * as protocol from '../protocol'; +import * as protocol from '../protocol.js'; import * as vscode from 'vscode'; -import { generateAssets } from '../../shared/assets'; +import { generateAssets } from '../../shared/assets.js'; import { ShowOmniSharpChannel, CommandDotNetRestoreStart, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed, -} from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import { PlatformInformation } from '../../shared/platform'; -import CompositeDisposable from '../../compositeDisposable'; -import reportIssue from '../../shared/reportIssue'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; -import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider'; +} from '../omnisharpLoggingEvents.js'; +import { EventStream } from '../../eventStream.js'; +import { PlatformInformation } from '../../shared/platform.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import reportIssue from '../../shared/reportIssue.js'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.js'; +import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider.js'; export default function registerCommands( context: vscode.ExtensionContext, diff --git a/src/omnisharp/features/completionProvider.ts b/src/omnisharp/features/completionProvider.ts index 14ea102e35..b1fb64e81d 100644 --- a/src/omnisharp/features/completionProvider.ts +++ b/src/omnisharp/features/completionProvider.ts @@ -20,18 +20,18 @@ import { workspace, CompletionItemLabel, } from 'vscode'; -import AbstractProvider from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import AbstractProvider from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; import { CompletionTriggerKind as LspCompletionTriggerKind, InsertTextFormat, CancellationToken, } from 'vscode-languageclient'; -import { createRequest } from '../typeConversion'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { OmniSharpServer } from '../server'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +import { createRequest } from '../typeConversion.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { OmniSharpServer } from '../server.js'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; export const CompletionAfterInsertCommand = 'csharp.completion.afterInsert'; diff --git a/src/omnisharp/features/definitionMetadataDocumentProvider.ts b/src/omnisharp/features/definitionMetadataDocumentProvider.ts index 3762554102..cb6f7dfbe8 100644 --- a/src/omnisharp/features/definitionMetadataDocumentProvider.ts +++ b/src/omnisharp/features/definitionMetadataDocumentProvider.ts @@ -1,60 +1,60 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import { TextDocument, TextDocumentContentProvider, Uri, workspace } from 'vscode'; -import { MetadataResponse } from '../protocol'; -import { IDisposable } from '../../disposable'; - -export default class DefinitionMetadataDocumentProvider implements TextDocumentContentProvider, IDisposable { - readonly scheme = 'omnisharp-metadata'; - private _registration?: IDisposable; - private _documents: Map; - private _documentClosedSubscription: IDisposable; - - constructor() { - this._documents = new Map(); - this._documentClosedSubscription = workspace.onDidCloseTextDocument(this.onTextDocumentClosed, this); - } - - private onTextDocumentClosed(document: TextDocument): void { - this._documents.delete(document.uri.toString()); - } - - public dispose(): void { - this._registration?.dispose(); - this._documentClosedSubscription.dispose(); - this._documents.clear(); - } - - public addMetadataResponse(metadataResponse: MetadataResponse): Uri { - const uri = this.createUri(metadataResponse.SourceName); - this._documents.set(uri.toString(), metadataResponse); - - return uri; - } - - public getExistingMetadataResponseUri(sourceName: string): Uri { - return this.createUri(sourceName); - } - - public hasMetadataDocument(sourceName: string): boolean { - const uri = this.createUri(sourceName); - return this._documents.has(uri.toString()); - } - - public register(): void { - this._registration = workspace.registerTextDocumentContentProvider(this.scheme, this); - } - - public provideTextDocumentContent(uri: Uri): string | undefined { - return this._documents.get(uri.toString())?.Source; - } - - private createUri(sourceName: string): Uri { - return Uri.parse( - this.scheme + '://' + sourceName.replace(/\\/g, '/').replace(/(.*)\/(.*)/g, '$1/[metadata] $2') - ); - } -} +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { TextDocument, TextDocumentContentProvider, Uri, workspace } from 'vscode'; +import { MetadataResponse } from '../protocol.js'; +import { IDisposable } from '../../disposable.js'; + +export default class DefinitionMetadataDocumentProvider implements TextDocumentContentProvider, IDisposable { + readonly scheme = 'omnisharp-metadata'; + private _registration?: IDisposable; + private _documents: Map; + private _documentClosedSubscription: IDisposable; + + constructor() { + this._documents = new Map(); + this._documentClosedSubscription = workspace.onDidCloseTextDocument(this.onTextDocumentClosed, this); + } + + private onTextDocumentClosed(document: TextDocument): void { + this._documents.delete(document.uri.toString()); + } + + public dispose(): void { + this._registration?.dispose(); + this._documentClosedSubscription.dispose(); + this._documents.clear(); + } + + public addMetadataResponse(metadataResponse: MetadataResponse): Uri { + const uri = this.createUri(metadataResponse.SourceName); + this._documents.set(uri.toString(), metadataResponse); + + return uri; + } + + public getExistingMetadataResponseUri(sourceName: string): Uri { + return this.createUri(sourceName); + } + + public hasMetadataDocument(sourceName: string): boolean { + const uri = this.createUri(sourceName); + return this._documents.has(uri.toString()); + } + + public register(): void { + this._registration = workspace.registerTextDocumentContentProvider(this.scheme, this); + } + + public provideTextDocumentContent(uri: Uri): string | undefined { + return this._documents.get(uri.toString())?.Source; + } + + private createUri(sourceName: string): Uri { + return Uri.parse( + this.scheme + '://' + sourceName.replace(/\\/g, '/').replace(/(.*)\/(.*)/g, '$1/[metadata] $2') + ); + } +} diff --git a/src/omnisharp/features/definitionProvider.ts b/src/omnisharp/features/definitionProvider.ts index a57ceb5921..6273459cbb 100644 --- a/src/omnisharp/features/definitionProvider.ts +++ b/src/omnisharp/features/definitionProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils'; +import * as serverUtils from '../utils.js'; import { CancellationToken, TypeDefinitionProvider, @@ -19,13 +19,13 @@ import { MetadataRequest, MetadataSource, V2, -} from '../protocol'; -import { createRequest, toRange3, toVscodeLocation } from '../typeConversion'; -import AbstractSupport from './abstractProvider'; -import DefinitionMetadataOrSourceGeneratedDocumentProvider from './definitionMetadataDocumentProvider'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; +} from '../protocol.js'; +import { createRequest, toRange3, toVscodeLocation } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider.js'; +import DefinitionMetadataOrSourceGeneratedDocumentProvider from './definitionMetadataDocumentProvider.js'; +import { OmniSharpServer } from '../server.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.js'; export default class OmniSharpDefinitionProvider extends AbstractSupport diff --git a/src/omnisharp/features/diagnosticsProvider.ts b/src/omnisharp/features/diagnosticsProvider.ts index 2d31cbb0d8..a7fd56f1b1 100644 --- a/src/omnisharp/features/diagnosticsProvider.ts +++ b/src/omnisharp/features/diagnosticsProvider.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server'; -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { toRange } from '../typeConversion'; +import { OmniSharpServer } from '../server.js'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { toRange } from '../typeConversion.js'; import * as vscode from 'vscode'; -import CompositeDisposable from '../../compositeDisposable'; -import { IDisposable } from '../../disposable'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; -import { TextDocument } from '../../vscodeAdapter'; +import CompositeDisposable from '../../compositeDisposable.js'; +import { IDisposable } from '../../disposable.js'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; +import { TextDocument } from '../../vscodeAdapter.js'; import { Subject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import { BackgroundDiagnosticStatus } from '../protocol'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { omnisharpOptions } from '../../shared/options'; +import { BackgroundDiagnosticStatus } from '../protocol.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { omnisharpOptions } from '../../shared/options.js'; export class Advisor { private _disposable: CompositeDisposable; diff --git a/src/omnisharp/features/documentHighlightProvider.ts b/src/omnisharp/features/documentHighlightProvider.ts index f93d1fcf8f..df77ac0d74 100644 --- a/src/omnisharp/features/documentHighlightProvider.ts +++ b/src/omnisharp/features/documentHighlightProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toRange } from '../typeConversion'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { createRequest, toRange } from '../typeConversion.js'; import { DocumentHighlightProvider, DocumentHighlight, diff --git a/src/omnisharp/features/documentSymbolProvider.ts b/src/omnisharp/features/documentSymbolProvider.ts index 88bacf3b9f..6e330aec88 100644 --- a/src/omnisharp/features/documentSymbolProvider.ts +++ b/src/omnisharp/features/documentSymbolProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; import * as vscode from 'vscode'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; import SymbolRangeNames = protocol.V2.SymbolRangeNames; -import { toRange3 } from '../typeConversion'; +import { toRange3 } from '../typeConversion.js'; export default class OmniSharpDocumentSymbolProvider extends AbstractSupport implements vscode.DocumentSymbolProvider { async provideDocumentSymbols( diff --git a/src/omnisharp/features/documentation.ts b/src/omnisharp/features/documentation.ts index 9295367945..c87aba6fdf 100644 --- a/src/omnisharp/features/documentation.ts +++ b/src/omnisharp/features/documentation.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; +import * as protocol from '../protocol.js'; const summaryStartTag = //i; const summaryEndTag = /<\/summary>/i; diff --git a/src/omnisharp/features/dotnetTest.ts b/src/omnisharp/features/dotnetTest.ts index e333f9fddb..628692604e 100644 --- a/src/omnisharp/features/dotnetTest.ts +++ b/src/omnisharp/features/dotnetTest.ts @@ -6,13 +6,13 @@ import * as net from 'net'; import * as os from 'os'; import * as path from 'path'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import * as utils from '../../common'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import * as utils from '../../common.js'; import * as vscode from 'vscode'; -import AbstractProvider from './abstractProvider'; -import * as DebuggerEventsProtocol from '../../coreclrDebug/debuggerEventsProtocol'; -import { OmniSharpServer } from '../server'; +import AbstractProvider from './abstractProvider.js'; +import * as DebuggerEventsProtocol from '../../coreclrDebug/debuggerEventsProtocol.js'; +import { OmniSharpServer } from '../server.js'; import { TestExecutionCountReport, ReportDotNetTestResults, @@ -28,13 +28,13 @@ import { DotNetTestDebugStartFailure, DotNetTestRunInContextStart, DotNetTestDebugInContextStart, -} from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import LaunchConfiguration from './launchConfiguration'; -import Disposable from '../../disposable'; -import CompositeDisposable from '../../compositeDisposable'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { commonOptions } from '../../shared/options'; +} from '../omnisharpLoggingEvents.js'; +import { EventStream } from '../../eventStream.js'; +import LaunchConfiguration from './launchConfiguration.js'; +import Disposable from '../../disposable.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { commonOptions } from '../../shared/options.js'; const TelemetryReportingDelay = 2 * 60 * 1000; // two minutes diff --git a/src/omnisharp/features/fileOpenCloseProvider.ts b/src/omnisharp/features/fileOpenCloseProvider.ts index 4600387020..fe75a0775b 100644 --- a/src/omnisharp/features/fileOpenCloseProvider.ts +++ b/src/omnisharp/features/fileOpenCloseProvider.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDisposable } from '../../disposable'; -import { OmniSharpServer } from '../server'; +import { IDisposable } from '../../disposable.js'; +import { OmniSharpServer } from '../server.js'; import * as vscode from 'vscode'; -import CompositeDisposable from '../../compositeDisposable'; -import * as serverUtils from '../utils'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +import CompositeDisposable from '../../compositeDisposable.js'; +import * as serverUtils from '../utils.js'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; export default function fileOpenClose(server: OmniSharpServer): IDisposable { return new FileOpenCloseProvider(server); diff --git a/src/omnisharp/features/fixAll.ts b/src/omnisharp/features/fixAll.ts index c932f814cc..175189337e 100644 --- a/src/omnisharp/features/fixAll.ts +++ b/src/omnisharp/features/fixAll.ts @@ -3,6 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractProvider from './abstractProvider'; +import AbstractProvider from './abstractProvider.js'; export class FixAll extends AbstractProvider {} diff --git a/src/omnisharp/features/fixAllProvider.ts b/src/omnisharp/features/fixAllProvider.ts index 20d50d74ff..8a89dae97b 100644 --- a/src/omnisharp/features/fixAllProvider.ts +++ b/src/omnisharp/features/fixAllProvider.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as serverUtils from '../utils'; -import * as protocol from '../protocol'; -import { OmniSharpServer } from '../server'; -import { FixAllScope, FixAllItem } from '../protocol'; -import CompositeDisposable from '../../compositeDisposable'; -import AbstractProvider from './abstractProvider'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { buildEditForResponse } from '../fileOperationsResponseEditBuilder'; -import { showWarningMessage } from '../../shared/observers/utils/showMessage'; +import * as serverUtils from '../utils.js'; +import * as protocol from '../protocol.js'; +import { OmniSharpServer } from '../server.js'; +import { FixAllScope, FixAllItem } from '../protocol.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import AbstractProvider from './abstractProvider.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { buildEditForResponse } from '../fileOperationsResponseEditBuilder.js'; +import { showWarningMessage } from '../../shared/observers/utils/showMessage.js'; import { CancellationToken } from 'vscode-languageclient'; export class OmniSharpFixAllProvider extends AbstractProvider implements vscode.CodeActionProvider { diff --git a/src/omnisharp/features/formattingEditProvider.ts b/src/omnisharp/features/formattingEditProvider.ts index fc1145c025..0d523df8d2 100644 --- a/src/omnisharp/features/formattingEditProvider.ts +++ b/src/omnisharp/features/formattingEditProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; import { DocumentRangeFormattingEditProvider, FormattingOptions, diff --git a/src/omnisharp/features/hoverProvider.ts b/src/omnisharp/features/hoverProvider.ts index 6c7f76ebeb..47929ee4e2 100644 --- a/src/omnisharp/features/hoverProvider.ts +++ b/src/omnisharp/features/hoverProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest } from '../typeConversion'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { createRequest } from '../typeConversion.js'; import { HoverProvider, Hover, TextDocument, CancellationToken, Position, MarkdownString } from 'vscode'; export default class OmniSharpHoverProvider extends AbstractSupport implements HoverProvider { diff --git a/src/omnisharp/features/implementationProvider.ts b/src/omnisharp/features/implementationProvider.ts index 1b6db10bc0..3f79ffd3bb 100644 --- a/src/omnisharp/features/implementationProvider.ts +++ b/src/omnisharp/features/implementationProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import { FindImplementationsRequest } from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toLocation } from '../typeConversion'; +import AbstractSupport from './abstractProvider.js'; +import { FindImplementationsRequest } from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { createRequest, toLocation } from '../typeConversion.js'; import { TextDocument, Position, CancellationToken, ImplementationProvider, Definition } from 'vscode'; export default class OmniSharpImplementationProvider extends AbstractSupport implements ImplementationProvider { diff --git a/src/omnisharp/features/inlayHintProvider.ts b/src/omnisharp/features/inlayHintProvider.ts index d5f32a3f00..63e73cd828 100644 --- a/src/omnisharp/features/inlayHintProvider.ts +++ b/src/omnisharp/features/inlayHintProvider.ts @@ -2,20 +2,20 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils'; +import * as serverUtils from '../utils.js'; import * as vscode from 'vscode'; -import AbstractProvider from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import CompositeDisposable from '../../compositeDisposable'; +import AbstractProvider from './abstractProvider.js'; +import { OmniSharpServer } from '../server.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import CompositeDisposable from '../../compositeDisposable.js'; import { InlayHint, InlayHintRequest, InlayHintResolve as InlayHintResolveRequest, LinePositionSpanTextChange, -} from '../protocol'; -import { fromVSCodeRange, toVSCodePosition, toVSCodeTextEdit } from '../typeConversion'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +} from '../protocol.js'; +import { fromVSCodeRange, toVSCodePosition, toVSCodeTextEdit } from '../typeConversion.js'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; export default class OmniSharpInlayHintProvider extends AbstractProvider implements vscode.InlayHintsProvider { private readonly _onDidChangeInlayHints = new vscode.EventEmitter(); diff --git a/src/omnisharp/features/referenceProvider.ts b/src/omnisharp/features/referenceProvider.ts index 275ccbdc64..2e178ff160 100644 --- a/src/omnisharp/features/referenceProvider.ts +++ b/src/omnisharp/features/referenceProvider.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toLocation, toLocationFromUri } from '../typeConversion'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { createRequest, toLocation, toLocationFromUri } from '../typeConversion.js'; import { ReferenceProvider, Location, TextDocument, CancellationToken, Position } from 'vscode'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; +import { OmniSharpServer } from '../server.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.js'; export default class OmniSharpReferenceProvider extends AbstractSupport implements ReferenceProvider { public constructor( diff --git a/src/omnisharp/features/renameProvider.ts b/src/omnisharp/features/renameProvider.ts index d0a0a347ba..520f3ab448 100644 --- a/src/omnisharp/features/renameProvider.ts +++ b/src/omnisharp/features/renameProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest } from '../typeConversion'; +import AbstractSupport from './abstractProvider.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { createRequest } from '../typeConversion.js'; import { RenameProvider, WorkspaceEdit, TextDocument, Uri, CancellationToken, Position, Range } from 'vscode'; export default class OmniSharpRenameProvider extends AbstractSupport implements RenameProvider { diff --git a/src/omnisharp/features/semanticTokensProvider.ts b/src/omnisharp/features/semanticTokensProvider.ts index d90749eca2..45dca53154 100644 --- a/src/omnisharp/features/semanticTokensProvider.ts +++ b/src/omnisharp/features/semanticTokensProvider.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import { SemanticTokenTypes } from 'vscode-languageclient'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toRange2 } from '../typeConversion'; -import AbstractProvider from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { omnisharpOptions } from '../../shared/options'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { createRequest, toRange2 } from '../typeConversion.js'; +import AbstractProvider from './abstractProvider.js'; +import { OmniSharpServer } from '../server.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { omnisharpOptions } from '../../shared/options.js'; // The default TokenTypes defined by VS Code https://github.com/microsoft/vscode/blob/master/src/vs/platform/theme/common/tokenClassificationRegistry.ts#L393 enum DefaultTokenType { diff --git a/src/omnisharp/features/signatureHelpProvider.ts b/src/omnisharp/features/signatureHelpProvider.ts index 44791bf5a3..24dd71e152 100644 --- a/src/omnisharp/features/signatureHelpProvider.ts +++ b/src/omnisharp/features/signatureHelpProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as serverUtils from '../utils'; -import { createRequest } from '../typeConversion'; +import AbstractSupport from './abstractProvider.js'; +import * as serverUtils from '../utils.js'; +import { createRequest } from '../typeConversion.js'; import { SignatureHelpProvider, SignatureHelp, @@ -16,7 +16,7 @@ import { Position, } from 'vscode'; import { MarkdownString } from 'vscode'; -import { SignatureHelpParameter } from '../protocol'; +import { SignatureHelpParameter } from '../protocol.js'; export default class OmniSharpSignatureHelpProvider extends AbstractSupport implements SignatureHelpProvider { public async provideSignatureHelp( diff --git a/src/omnisharp/features/sourceGeneratedDocumentProvider.ts b/src/omnisharp/features/sourceGeneratedDocumentProvider.ts index e84da6d38d..42030d798e 100644 --- a/src/omnisharp/features/sourceGeneratedDocumentProvider.ts +++ b/src/omnisharp/features/sourceGeneratedDocumentProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils'; +import * as serverUtils from '../utils.js'; import { CancellationToken, Event, @@ -15,9 +15,9 @@ import { window, workspace, } from 'vscode'; -import { IDisposable } from '../../disposable'; -import { SourceGeneratedFileInfo, SourceGeneratedFileResponse, UpdateType } from '../protocol'; -import { OmniSharpServer } from '../server'; +import { IDisposable } from '../../disposable.js'; +import { SourceGeneratedFileInfo, SourceGeneratedFileResponse, UpdateType } from '../protocol.js'; +import { OmniSharpServer } from '../server.js'; export default class SourceGeneratedDocumentProvider implements TextDocumentContentProvider, IDisposable { readonly scheme = 'omnisharp-source-generated'; diff --git a/src/omnisharp/features/structureProvider.ts b/src/omnisharp/features/structureProvider.ts index 437e50eeb3..1f01eb3441 100644 --- a/src/omnisharp/features/structureProvider.ts +++ b/src/omnisharp/features/structureProvider.ts @@ -11,9 +11,9 @@ import { FoldingRange, FoldingRangeKind, } from 'vscode'; -import AbstractSupport from './abstractProvider'; -import { blockStructure } from '../utils'; -import { V2 } from '../protocol'; +import AbstractSupport from './abstractProvider.js'; +import { blockStructure } from '../utils.js'; +import { V2 } from '../protocol.js'; export class OmniSharpStructureProvider extends AbstractSupport implements FoldingRangeProvider { async provideFoldingRanges( diff --git a/src/omnisharp/features/virtualDocumentTracker.ts b/src/omnisharp/features/virtualDocumentTracker.ts index 1fd67f63a9..5cdfc31829 100644 --- a/src/omnisharp/features/virtualDocumentTracker.ts +++ b/src/omnisharp/features/virtualDocumentTracker.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { workspace, TextDocument, Uri } from 'vscode'; -import { OmniSharpServer } from '../server'; -import * as serverUtils from '../utils'; -import { FileChangeType } from '../protocol'; -import { IDisposable } from '../../disposable'; -import CompositeDisposable from '../../compositeDisposable'; -import { EventStream } from '../../eventStream'; -import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents'; +import { OmniSharpServer } from '../server.js'; +import * as serverUtils from '../utils.js'; +import { FileChangeType } from '../protocol.js'; +import { IDisposable } from '../../disposable.js'; +import CompositeDisposable from '../../compositeDisposable.js'; +import { EventStream } from '../../eventStream.js'; +import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents.js'; async function trackCurrentVirtualDocuments(server: OmniSharpServer, eventStream: EventStream) { for (let i = 0; i < workspace.textDocuments.length; i++) { diff --git a/src/omnisharp/features/workspaceSymbolProvider.ts b/src/omnisharp/features/workspaceSymbolProvider.ts index cb0fdbfd8a..a8e352289c 100644 --- a/src/omnisharp/features/workspaceSymbolProvider.ts +++ b/src/omnisharp/features/workspaceSymbolProvider.ts @@ -1,96 +1,96 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -import AbstractSupport from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { toRange } from '../typeConversion'; -import { CancellationToken, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Location } from 'vscode'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; -import { omnisharpOptions } from '../../shared/options'; - -export default class OmniSharpWorkspaceSymbolProvider extends AbstractSupport implements WorkspaceSymbolProvider { - constructor( - server: OmniSharpServer, - languageMiddlewareFeature: LanguageMiddlewareFeature, - private sourceGeneratedDocumentProvider: SourceGeneratedDocumentProvider - ) { - super(server, languageMiddlewareFeature); - } - - public async provideWorkspaceSymbols(search: string, token: CancellationToken): Promise { - const minFindSymbolsFilterLength = omnisharpOptions.minFindSymbolsFilterLength; - const maxFindSymbolsItems = omnisharpOptions.maxFindSymbolsItems; - const minFilterLength = minFindSymbolsFilterLength > 0 ? minFindSymbolsFilterLength : undefined; - const maxItemsToReturn = maxFindSymbolsItems > 0 ? maxFindSymbolsItems : undefined; - - if (minFilterLength !== undefined && search.length < minFilterLength) { - return []; - } - - try { - const res = await serverUtils.findSymbols( - this._server, - { Filter: search, MaxItemsToReturn: maxItemsToReturn }, - token - ); - if (Array.isArray(res?.QuickFixes)) { - return res.QuickFixes.map((symbol) => this._asSymbolInformation(symbol)); - } - } catch { - /* empty */ - } - - return []; - } - - private _asSymbolInformation(symbolInfo: protocol.SymbolLocation): SymbolInformation { - let uri: Uri; - if (symbolInfo.GeneratedFileInfo) { - uri = this.sourceGeneratedDocumentProvider.addSourceGeneratedFileWithoutInitialContent( - symbolInfo.GeneratedFileInfo, - symbolInfo.FileName - ); - } else { - uri = Uri.file(symbolInfo.FileName); - } - - const location = new Location(uri, toRange(symbolInfo)); - - return new SymbolInformation( - symbolInfo.Text, - OmniSharpWorkspaceSymbolProvider._toKind(symbolInfo), - symbolInfo.ContainingSymbolName ?? '', - location - ); - } - - private static _toKind(symbolInfo: protocol.SymbolLocation): SymbolKind { - switch (symbolInfo.Kind) { - case 'Method': - return SymbolKind.Method; - case 'Field': - return SymbolKind.Field; - case 'Property': - return SymbolKind.Property; - case 'Interface': - return SymbolKind.Interface; - case 'Enum': - return SymbolKind.Enum; - case 'Struct': - return SymbolKind.Struct; - case 'Event': - return SymbolKind.Event; - case 'EnumMember': - return SymbolKind.EnumMember; - case 'Class': - return SymbolKind.Class; - default: - return SymbolKind.Class; - } - } -} +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import AbstractSupport from './abstractProvider.js'; +import { OmniSharpServer } from '../server.js'; +import * as protocol from '../protocol.js'; +import * as serverUtils from '../utils.js'; +import { toRange } from '../typeConversion.js'; +import { CancellationToken, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Location } from 'vscode'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.js'; +import { omnisharpOptions } from '../../shared/options.js'; + +export default class OmniSharpWorkspaceSymbolProvider extends AbstractSupport implements WorkspaceSymbolProvider { + constructor( + server: OmniSharpServer, + languageMiddlewareFeature: LanguageMiddlewareFeature, + private sourceGeneratedDocumentProvider: SourceGeneratedDocumentProvider + ) { + super(server, languageMiddlewareFeature); + } + + public async provideWorkspaceSymbols(search: string, token: CancellationToken): Promise { + const minFindSymbolsFilterLength = omnisharpOptions.minFindSymbolsFilterLength; + const maxFindSymbolsItems = omnisharpOptions.maxFindSymbolsItems; + const minFilterLength = minFindSymbolsFilterLength > 0 ? minFindSymbolsFilterLength : undefined; + const maxItemsToReturn = maxFindSymbolsItems > 0 ? maxFindSymbolsItems : undefined; + + if (minFilterLength !== undefined && search.length < minFilterLength) { + return []; + } + + try { + const res = await serverUtils.findSymbols( + this._server, + { Filter: search, MaxItemsToReturn: maxItemsToReturn }, + token + ); + if (Array.isArray(res?.QuickFixes)) { + return res.QuickFixes.map((symbol) => this._asSymbolInformation(symbol)); + } + } catch { + /* empty */ + } + + return []; + } + + private _asSymbolInformation(symbolInfo: protocol.SymbolLocation): SymbolInformation { + let uri: Uri; + if (symbolInfo.GeneratedFileInfo) { + uri = this.sourceGeneratedDocumentProvider.addSourceGeneratedFileWithoutInitialContent( + symbolInfo.GeneratedFileInfo, + symbolInfo.FileName + ); + } else { + uri = Uri.file(symbolInfo.FileName); + } + + const location = new Location(uri, toRange(symbolInfo)); + + return new SymbolInformation( + symbolInfo.Text, + OmniSharpWorkspaceSymbolProvider._toKind(symbolInfo), + symbolInfo.ContainingSymbolName ?? '', + location + ); + } + + private static _toKind(symbolInfo: protocol.SymbolLocation): SymbolKind { + switch (symbolInfo.Kind) { + case 'Method': + return SymbolKind.Method; + case 'Field': + return SymbolKind.Field; + case 'Property': + return SymbolKind.Property; + case 'Interface': + return SymbolKind.Interface; + case 'Enum': + return SymbolKind.Enum; + case 'Struct': + return SymbolKind.Struct; + case 'Event': + return SymbolKind.Event; + case 'EnumMember': + return SymbolKind.EnumMember; + case 'Class': + return SymbolKind.Class; + default: + return SymbolKind.Class; + } + } +} diff --git a/src/omnisharp/fileOperationsResponseEditBuilder.ts b/src/omnisharp/fileOperationsResponseEditBuilder.ts index cb652e80a7..b0e522c74d 100644 --- a/src/omnisharp/fileOperationsResponseEditBuilder.ts +++ b/src/omnisharp/fileOperationsResponseEditBuilder.ts @@ -5,9 +5,9 @@ import * as vscode from 'vscode'; import { Uri } from 'vscode'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; -import { FileModificationType, FileOperationResponse, ModifiedFileResponse, RenamedFileResponse } from './protocol'; -import { toRange2 } from './typeConversion'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.js'; +import { FileModificationType, FileOperationResponse, ModifiedFileResponse, RenamedFileResponse } from './protocol.js'; +import { toRange2 } from './typeConversion.js'; export async function buildEditForResponse( changes: FileOperationResponse[], diff --git a/src/omnisharp/languageMiddlewareFeature.ts b/src/omnisharp/languageMiddlewareFeature.ts index cfaba25aee..e45ebee780 100644 --- a/src/omnisharp/languageMiddlewareFeature.ts +++ b/src/omnisharp/languageMiddlewareFeature.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IDisposable } from '../disposable'; +import { IDisposable } from '../disposable.js'; export interface LanguageMiddleware extends RemapApi { language: string; diff --git a/src/omnisharp/launcher.ts b/src/omnisharp/launcher.ts index 3356eccd78..728c5c6ece 100644 --- a/src/omnisharp/launcher.ts +++ b/src/omnisharp/launcher.ts @@ -6,12 +6,12 @@ import { spawn } from 'child_process'; import { ChildProcessWithoutNullStreams } from 'child_process'; -import { PlatformInformation } from '../shared/platform'; +import { PlatformInformation } from '../shared/platform.js'; import * as path from 'path'; import * as vscode from 'vscode'; -import { commonOptions, omnisharpOptions } from '../shared/options'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget'; +import { commonOptions, omnisharpOptions } from '../shared/options.js'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; +import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget.js'; export const vslsTarget: LaunchTarget = { label: 'VSLS', diff --git a/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts b/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts index 36b69a2c4e..4b0d73931b 100644 --- a/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts +++ b/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { OmnisharpBackgroundDiagnosticStatus } from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; -import { BackgroundDiagnosticStatus } from '../protocol'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; +import { OmnisharpBackgroundDiagnosticStatus } from '../omnisharpLoggingEvents.js'; +import { EventType } from '../../shared/eventType.js'; +import { BackgroundDiagnosticStatus } from '../protocol.js'; export class BackgroundWorkStatusBarObserver extends BaseStatusBarItemObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/baseStatusBarItemObserver.ts b/src/omnisharp/observers/baseStatusBarItemObserver.ts index 03594675f3..b39a42437f 100644 --- a/src/omnisharp/observers/baseStatusBarItemObserver.ts +++ b/src/omnisharp/observers/baseStatusBarItemObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent } from '../../shared/loggingEvents'; -import { StatusBarItem } from '../../vscodeAdapter'; +import { BaseEvent } from '../../shared/loggingEvents.js'; +import { StatusBarItem } from '../../vscodeAdapter.js'; export abstract class BaseStatusBarItemObserver { constructor(private statusBarItem: StatusBarItem) {} diff --git a/src/omnisharp/observers/csharpLoggerObserver.ts b/src/omnisharp/observers/csharpLoggerObserver.ts index c5ccbe252d..0f150e990c 100644 --- a/src/omnisharp/observers/csharpLoggerObserver.ts +++ b/src/omnisharp/observers/csharpLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; +import { EventType } from '../../shared/eventType.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; +import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents.js'; export class CSharpLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetChannelObserver.ts b/src/omnisharp/observers/dotnetChannelObserver.ts index ec05783aef..ec9d74ed01 100644 --- a/src/omnisharp/observers/dotnetChannelObserver.ts +++ b/src/omnisharp/observers/dotnetChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.js'; +import { EventType } from '../../shared/eventType.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export class DotNetChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetLoggerObserver.ts b/src/omnisharp/observers/dotnetLoggerObserver.ts index 2fa1ad80e4..2351a5ec59 100644 --- a/src/omnisharp/observers/dotnetLoggerObserver.ts +++ b/src/omnisharp/observers/dotnetLoggerObserver.ts @@ -2,14 +2,14 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; import { CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed, -} from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; +} from '../omnisharpLoggingEvents.js'; +import { EventType } from '../../shared/eventType.js'; export class DotnetLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetTestChannelObserver.ts b/src/omnisharp/observers/dotnetTestChannelObserver.ts index eab8cd887e..41b0be47db 100644 --- a/src/omnisharp/observers/dotnetTestChannelObserver.ts +++ b/src/omnisharp/observers/dotnetTestChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.js'; +import { EventType } from '../../shared/eventType.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export default class DotnetTestChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetTestLoggerObserver.ts b/src/omnisharp/observers/dotnetTestLoggerObserver.ts index 876f339a85..3e3e5fa1e6 100644 --- a/src/omnisharp/observers/dotnetTestLoggerObserver.ts +++ b/src/omnisharp/observers/dotnetTestLoggerObserver.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseEvent } from '../../shared/loggingEvents.js'; import { DotNetTestRunStart, DotNetTestMessage, @@ -15,10 +15,10 @@ import { DotNetTestsInClassRunStart, DotNetTestRunInContextStart, DotNetTestDebugInContextStart, -} from '../omnisharpLoggingEvents'; -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import * as protocol from '../protocol'; -import { EventType } from '../../shared/eventType'; +} from '../omnisharpLoggingEvents.js'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; +import * as protocol from '../protocol.js'; +import { EventType } from '../../shared/eventType.js'; export default class DotNetTestLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/errorMessageObserver.ts b/src/omnisharp/observers/errorMessageObserver.ts index 2ac535689f..6c1a6a7c22 100644 --- a/src/omnisharp/observers/errorMessageObserver.ts +++ b/src/omnisharp/observers/errorMessageObserver.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent, IntegrityCheckFailure, ZipError } from '../../shared/loggingEvents'; -import { DotNetTestRunFailure, DotNetTestDebugStartFailure } from '../omnisharpLoggingEvents'; -import { vscode } from '../../vscodeAdapter'; -import { EventType } from '../../shared/eventType'; +import { BaseEvent, IntegrityCheckFailure, ZipError } from '../../shared/loggingEvents.js'; +import { DotNetTestRunFailure, DotNetTestDebugStartFailure } from '../omnisharpLoggingEvents.js'; +import { vscode } from '../../vscodeAdapter.js'; +import { EventType } from '../../shared/eventType.js'; import { l10n } from 'vscode'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage.js'; export class ErrorMessageObserver { constructor(private vscode: vscode) {} diff --git a/src/omnisharp/observers/informationMessageObserver.ts b/src/omnisharp/observers/informationMessageObserver.ts index 8579793fa3..7a77b44bdf 100644 --- a/src/omnisharp/observers/informationMessageObserver.ts +++ b/src/omnisharp/observers/informationMessageObserver.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from '../../vscodeAdapter'; -import { EventType } from '../../shared/eventType'; -import { omnisharpOptions } from '../../shared/options'; +import { vscode } from '../../vscodeAdapter.js'; +import { EventType } from '../../shared/eventType.js'; +import { omnisharpOptions } from '../../shared/options.js'; import { l10n } from 'vscode'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; +import { BaseEvent } from '../../shared/loggingEvents.js'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.js'; export class InformationMessageObserver { constructor(private vscode: vscode) {} diff --git a/src/omnisharp/observers/omnisharpChannelObserver.ts b/src/omnisharp/observers/omnisharpChannelObserver.ts index a47fd3d5c6..0e695da012 100644 --- a/src/omnisharp/observers/omnisharpChannelObserver.ts +++ b/src/omnisharp/observers/omnisharpChannelObserver.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; -import { OutputChannel } from '../../vscodeAdapter'; -import { EventType } from '../../shared/eventType'; -import { omnisharpOptions } from '../../shared/options'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.js'; +import { OutputChannel } from '../../vscodeAdapter.js'; +import { EventType } from '../../shared/eventType.js'; +import { omnisharpOptions } from '../../shared/options.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export class OmnisharpChannelObserver extends BaseChannelObserver { constructor(channel: OutputChannel) { diff --git a/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts b/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts index 7a2f0390da..095c2a59d9 100644 --- a/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts +++ b/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; import * as os from 'os'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseEvent } from '../../shared/loggingEvents.js'; import { OmnisharpRequestMessage, OmnisharpServerEnqueueRequest, @@ -14,8 +14,8 @@ import { OmnisharpServerVerboseMessage, OmnisharpServerProcessRequestStart, OmnisharpEventPacketReceived, -} from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; +} from '../omnisharpLoggingEvents.js'; +import { EventType } from '../../shared/eventType.js'; export class OmnisharpDebugModeLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/omnisharpLoggerObserver.ts b/src/omnisharp/observers/omnisharpLoggerObserver.ts index 661b3c945f..b9b959bcce 100644 --- a/src/omnisharp/observers/omnisharpLoggerObserver.ts +++ b/src/omnisharp/observers/omnisharpLoggerObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; import { OmnisharpInitialisation, OmnisharpLaunch, @@ -15,12 +15,12 @@ import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnStdErr, OmnisharpEventPacketReceived, -} from '../omnisharpLoggingEvents'; +} from '../omnisharpLoggingEvents.js'; import * as os from 'os'; -import { EventType } from '../../shared/eventType'; +import { EventType } from '../../shared/eventType.js'; import * as vscode from 'vscode'; -import { PlatformInformation } from '../../shared/platform'; -import { Logger } from '../../logger'; +import { PlatformInformation } from '../../shared/platform.js'; +import { Logger } from '../../logger.js'; export class OmnisharpLoggerObserver extends BaseLoggerObserver { constructor( diff --git a/src/omnisharp/observers/omnisharpStatusBarObserver.ts b/src/omnisharp/observers/omnisharpStatusBarObserver.ts index a6218d57c0..8859657a67 100644 --- a/src/omnisharp/observers/omnisharpStatusBarObserver.ts +++ b/src/omnisharp/observers/omnisharpStatusBarObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent, DownloadProgress, DownloadStart, InstallationStart } from '../../shared/loggingEvents'; -import { OmnisharpServerOnStdErr } from '../omnisharpLoggingEvents'; -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; -import { EventType } from '../../shared/eventType'; +import { BaseEvent, DownloadProgress, DownloadStart, InstallationStart } from '../../shared/loggingEvents.js'; +import { OmnisharpServerOnStdErr } from '../omnisharpLoggingEvents.js'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.js'; +import { EventType } from '../../shared/eventType.js'; export enum StatusBarColors { Red = 'rgb(218,0,0)', diff --git a/src/omnisharp/observers/projectStatusBarObserver.ts b/src/omnisharp/observers/projectStatusBarObserver.ts index 419bd4e232..af8e6ed2a3 100644 --- a/src/omnisharp/observers/projectStatusBarObserver.ts +++ b/src/omnisharp/observers/projectStatusBarObserver.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { basename } from 'path'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { WorkspaceInformationUpdated } from '../omnisharpLoggingEvents'; -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; -import { EventType } from '../../shared/eventType'; +import { BaseEvent } from '../../shared/loggingEvents.js'; +import { WorkspaceInformationUpdated } from '../omnisharpLoggingEvents.js'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.js'; +import { EventType } from '../../shared/eventType.js'; export class ProjectStatusBarObserver extends BaseStatusBarItemObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/razorLoggerObserver.ts b/src/omnisharp/observers/razorLoggerObserver.ts index b3d2321b05..1a9f423069 100644 --- a/src/omnisharp/observers/razorLoggerObserver.ts +++ b/src/omnisharp/observers/razorLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist } from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; +import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist } from '../omnisharpLoggingEvents.js'; +import { EventType } from '../../shared/eventType.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export class RazorLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/telemetryObserver.ts b/src/omnisharp/observers/telemetryObserver.ts index 35a29f3c12..ffe175246d 100644 --- a/src/omnisharp/observers/telemetryObserver.ts +++ b/src/omnisharp/observers/telemetryObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../../shared/platform'; -import { BaseEvent, InstallationFailure } from '../../shared/loggingEvents'; +import { PlatformInformation } from '../../shared/platform.js'; +import { BaseEvent, InstallationFailure } from '../../shared/loggingEvents.js'; import { TestExecutionCountReport, TelemetryEventWithMeasures, @@ -12,13 +12,13 @@ import { ProjectConfiguration, TelemetryErrorEvent, OmnisharpInitialisation, -} from '../omnisharpLoggingEvents'; -import { PackageError } from '../../packageManager/packageError'; -import { EventType } from '../../shared/eventType'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; -import { DotnetInfo } from '../../shared/utils/dotnetInfo'; -import { ITelemetryReporter, getTelemetryProps } from '../../shared/telemetryReporter'; -import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration'; +} from '../omnisharpLoggingEvents.js'; +import { PackageError } from '../../packageManager/packageError.js'; +import { EventType } from '../../shared/eventType.js'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.js'; +import { DotnetInfo } from '../../shared/utils/dotnetInfo.js'; +import { ITelemetryReporter, getTelemetryProps } from '../../shared/telemetryReporter.js'; +import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration.js'; export class TelemetryObserver { private reporter: ITelemetryReporter; diff --git a/src/omnisharp/observers/warningMessageObserver.ts b/src/omnisharp/observers/warningMessageObserver.ts index a044e219a7..8d1ee7d19f 100644 --- a/src/omnisharp/observers/warningMessageObserver.ts +++ b/src/omnisharp/observers/warningMessageObserver.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { debounceTime } from 'rxjs/operators'; -import { vscode } from '../../vscodeAdapter'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { OmnisharpServerMsBuildProjectDiagnostics } from '../omnisharpLoggingEvents'; +import { vscode } from '../../vscodeAdapter.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; +import { OmnisharpServerMsBuildProjectDiagnostics } from '../omnisharpLoggingEvents.js'; import { Scheduler, Subject } from 'rxjs'; -import { EventType } from '../../shared/eventType'; +import { EventType } from '../../shared/eventType.js'; import { l10n } from 'vscode'; -import { CommandOption, showWarningMessage } from '../../shared/observers/utils/showMessage'; +import { CommandOption, showWarningMessage } from '../../shared/observers/utils/showMessage.js'; export class WarningMessageObserver { private warningMessageDebouncer: Subject; diff --git a/src/omnisharp/omniSharpMonoResolver.ts b/src/omnisharp/omniSharpMonoResolver.ts index 6e3df3434a..614a3592e0 100644 --- a/src/omnisharp/omniSharpMonoResolver.ts +++ b/src/omnisharp/omniSharpMonoResolver.ts @@ -5,10 +5,10 @@ import * as semver from 'semver'; import * as path from 'path'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; -import { IGetMonoVersion } from '../constants/IGetMonoVersion'; -import { omnisharpOptions } from '../shared/options'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; +import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation.js'; +import { IGetMonoVersion } from '../constants/IGetMonoVersion.js'; +import { omnisharpOptions } from '../shared/options.js'; export class OmniSharpMonoResolver implements IHostExecutableResolver { private readonly minimumMonoVersion = '6.4.0'; diff --git a/src/omnisharp/omnisharpDownloader.ts b/src/omnisharp/omnisharpDownloader.ts index dd0ea5bab0..96277be449 100644 --- a/src/omnisharp/omnisharpDownloader.ts +++ b/src/omnisharp/omnisharpDownloader.ts @@ -3,23 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { GetPackagesFromVersion } from './omnisharpPackageCreator'; -import { PlatformInformation } from '../shared/platform'; +import { GetPackagesFromVersion } from './omnisharpPackageCreator.js'; +import { PlatformInformation } from '../shared/platform.js'; import { PackageInstallation, LogPlatformInfo, InstallationSuccess, InstallationFailure, -} from '../shared/loggingEvents'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; -import { DownloadFile } from '../packageManager/fileDownloader'; -import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; -import { isValidDownload } from '../packageManager/isValidDownload'; -import { LatestBuildDownloadStart } from './omnisharpLoggingEvents'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +} from '../shared/loggingEvents.js'; +import { EventStream } from '../eventStream.js'; +import { NetworkSettingsProvider } from '../networkSettings.js'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages.js'; +import { DownloadFile } from '../packageManager/fileDownloader.js'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils.js'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall.js'; +import { isValidDownload } from '../packageManager/isValidDownload.js'; +import { LatestBuildDownloadStart } from './omnisharpLoggingEvents.js'; +import { ITelemetryReporter } from '../shared/telemetryReporter.js'; export class OmnisharpDownloader { public constructor( diff --git a/src/omnisharp/omnisharpLanguageServer.ts b/src/omnisharp/omnisharpLanguageServer.ts index 1c5325c328..c55f175c4d 100644 --- a/src/omnisharp/omnisharpLanguageServer.ts +++ b/src/omnisharp/omnisharpLanguageServer.ts @@ -4,53 +4,53 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as utils from './utils'; -import { DotNetChannelObserver } from './observers/dotnetChannelObserver'; -import { DotnetLoggerObserver } from './observers/dotnetLoggerObserver'; -import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver'; -import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver'; -import { OmnisharpLoggerObserver } from './observers/omnisharpLoggerObserver'; -import { OmnisharpChannelObserver } from './observers/omnisharpChannelObserver'; -import { WarningMessageObserver } from './observers/warningMessageObserver'; -import { InformationMessageObserver } from './observers/informationMessageObserver'; -import { ErrorMessageObserver } from './observers/errorMessageObserver'; -import { StatusBarItemAdapter } from '../statusBarItemAdapter'; -import { OmnisharpStatusBarObserver } from './observers/omnisharpStatusBarObserver'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { PlatformInformation } from '../shared/platform'; -import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver'; -import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver'; -import { OmnisharpDebugModeLoggerObserver } from './observers/omnisharpDebugModeLoggerObserver'; -import { RazorLoggerObserver } from './observers/razorLoggerObserver'; -import { RazorOmnisharpDownloader } from '../razor/razorOmnisharpDownloader'; -import { omnisharpOptions, razorOptions } from '../shared/options'; -import CompositeDisposable from '../compositeDisposable'; -import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; -import { DotnetResolver } from './dotnetResolver'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; -import { OmniSharpServer } from './server'; -import { Advisor } from './features/diagnosticsProvider'; -import TestManager from './features/dotnetTest'; -import { OmnisharpWorkspaceDebugInformationProvider } from './omnisharpWorkspaceDebugInformationProvider'; -import Disposable from '../disposable'; -import registerCommands from './features/commands'; -import { addAssetsIfNecessary } from '../shared/assets'; +import * as utils from './utils.js'; +import { DotNetChannelObserver } from './observers/dotnetChannelObserver.js'; +import { DotnetLoggerObserver } from './observers/dotnetLoggerObserver.js'; +import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver.js'; +import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver.js'; +import { OmnisharpLoggerObserver } from './observers/omnisharpLoggerObserver.js'; +import { OmnisharpChannelObserver } from './observers/omnisharpChannelObserver.js'; +import { WarningMessageObserver } from './observers/warningMessageObserver.js'; +import { InformationMessageObserver } from './observers/informationMessageObserver.js'; +import { ErrorMessageObserver } from './observers/errorMessageObserver.js'; +import { StatusBarItemAdapter } from '../statusBarItemAdapter.js'; +import { OmnisharpStatusBarObserver } from './observers/omnisharpStatusBarObserver.js'; +import { EventStream } from '../eventStream.js'; +import { NetworkSettingsProvider } from '../networkSettings.js'; +import { PlatformInformation } from '../shared/platform.js'; +import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver.js'; +import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver.js'; +import { OmnisharpDebugModeLoggerObserver } from './observers/omnisharpDebugModeLoggerObserver.js'; +import { RazorLoggerObserver } from './observers/razorLoggerObserver.js'; +import { RazorOmnisharpDownloader } from '../razor/razorOmnisharpDownloader.js'; +import { omnisharpOptions, razorOptions } from '../shared/options.js'; +import CompositeDisposable from '../compositeDisposable.js'; +import { OmniSharpMonoResolver } from './omniSharpMonoResolver.js'; +import { DotnetResolver } from './dotnetResolver.js'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.js'; +import { OmniSharpServer } from './server.js'; +import { Advisor } from './features/diagnosticsProvider.js'; +import TestManager from './features/dotnetTest.js'; +import { OmnisharpWorkspaceDebugInformationProvider } from './omnisharpWorkspaceDebugInformationProvider.js'; +import Disposable from '../disposable.js'; +import registerCommands from './features/commands.js'; +import { addAssetsIfNecessary } from '../shared/assets.js'; import { ActiveTextEditorChanged, OmnisharpStart, ProjectJsonDeprecatedWarning, RazorDevModeActive, -} from './omnisharpLoggingEvents'; -import { DotnetWorkspaceConfigurationProvider } from '../shared/workspaceConfigurationProvider'; -import { getMonoVersion } from '../utils/getMonoVersion'; -import { safeLength, sum } from '../common'; -import { TelemetryObserver } from './observers/telemetryObserver'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +} from './omnisharpLoggingEvents.js'; +import { DotnetWorkspaceConfigurationProvider } from '../shared/workspaceConfigurationProvider.js'; +import { getMonoVersion } from '../utils/getMonoVersion.js'; +import { safeLength, sum } from '../common.js'; +import { TelemetryObserver } from './observers/telemetryObserver.js'; +import { ITelemetryReporter } from '../shared/telemetryReporter.js'; import { Observable } from 'rxjs'; -import { registerOmnisharpOptionChanges } from './omnisharpOptionChanges'; -import { CSharpLoggerObserver } from './observers/csharpLoggerObserver'; -import { showWarningMessage } from '../shared/observers/utils/showMessage'; +import { registerOmnisharpOptionChanges } from './omnisharpOptionChanges.js'; +import { CSharpLoggerObserver } from './observers/csharpLoggerObserver.js'; +import { showWarningMessage } from '../shared/observers/utils/showMessage.js'; export interface ActivationResult { readonly server: OmniSharpServer; diff --git a/src/omnisharp/omnisharpLoggingEvents.ts b/src/omnisharp/omnisharpLoggingEvents.ts index 9fd7fdf1dd..fea26c1bf3 100644 --- a/src/omnisharp/omnisharpLoggingEvents.ts +++ b/src/omnisharp/omnisharpLoggingEvents.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Request } from './requestQueue'; -import * as protocol from './protocol'; -import { LaunchTarget } from '../shared/launchTarget'; -import { EventType } from '../shared/eventType'; -import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; -import { BaseEvent, EventWithMessage } from '../shared/loggingEvents'; +import { Request } from './requestQueue.js'; +import * as protocol from './protocol.js'; +import { LaunchTarget } from '../shared/launchTarget.js'; +import { EventType } from '../shared/eventType.js'; +import { ProjectConfigurationMessage } from '../shared/projectConfiguration.js'; +import { BaseEvent, EventWithMessage } from '../shared/loggingEvents.js'; export class TelemetryEvent implements BaseEvent { type = EventType.TelemetryEvent; diff --git a/src/omnisharp/omnisharpManager.ts b/src/omnisharp/omnisharpManager.ts index 91159a3690..771f654e0c 100644 --- a/src/omnisharp/omnisharpManager.ts +++ b/src/omnisharp/omnisharpManager.ts @@ -5,10 +5,10 @@ import * as path from 'path'; import * as semver from 'semver'; -import * as util from '../common'; -import { OmnisharpDownloader } from './omnisharpDownloader'; -import { PlatformInformation } from '../shared/platform'; -import { modernNetVersion } from './omnisharpPackageCreator'; +import * as util from '../common.js'; +import { OmnisharpDownloader } from './omnisharpDownloader.js'; +import { PlatformInformation } from '../shared/platform.js'; +import { modernNetVersion } from './omnisharpPackageCreator.js'; export class OmnisharpManager { private readonly latestVersionFileServerPath = 'releases/versioninfo.txt'; diff --git a/src/omnisharp/omnisharpOptionChanges.ts b/src/omnisharp/omnisharpOptionChanges.ts index 880f9e7424..a6d153f944 100644 --- a/src/omnisharp/omnisharpOptionChanges.ts +++ b/src/omnisharp/omnisharpOptionChanges.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver'; -import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options'; +import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver.js'; +import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options.js'; import { Observable } from 'rxjs'; -import Disposable from '../disposable'; -import { CommandOption, showInformationMessage } from '../shared/observers/utils/showMessage'; +import Disposable from '../disposable.js'; +import { CommandOption, showInformationMessage } from '../shared/observers/utils/showMessage.js'; export function registerOmnisharpOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { diff --git a/src/omnisharp/omnisharpPackageCreator.ts b/src/omnisharp/omnisharpPackageCreator.ts index ff68e4c26c..25764cca4a 100644 --- a/src/omnisharp/omnisharpPackageCreator.ts +++ b/src/omnisharp/omnisharpPackageCreator.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Package } from '../packageManager/package'; +import { Package } from '../packageManager/package.js'; export const modernNetVersion = '6.0'; diff --git a/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts b/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts index 7018dddd0a..ef0eb68c8a 100644 --- a/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts +++ b/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import * as serverUtils from './utils'; +import * as serverUtils from './utils.js'; import { IWorkspaceDebugInformationProvider, ProjectDebugInformation, -} from '../shared/IWorkspaceDebugInformationProvider'; -import { OmniSharpServer } from './server'; +} from '../shared/IWorkspaceDebugInformationProvider.js'; +import { OmniSharpServer } from './server.js'; import { Uri } from 'vscode'; -import { findNetCoreTargetFramework } from '../shared/utils'; -import { isSubfolderOf } from '../common'; +import { findNetCoreTargetFramework } from '../shared/utils.js'; +import { isSubfolderOf } from '../common.js'; export class OmnisharpWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { constructor(private server: OmniSharpServer) {} diff --git a/src/omnisharp/prioritization.ts b/src/omnisharp/prioritization.ts index 9e5641c108..fc7bc535d6 100644 --- a/src/omnisharp/prioritization.ts +++ b/src/omnisharp/prioritization.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from './protocol'; +import * as protocol from './protocol.js'; const priorityCommands = [ protocol.Requests.ChangeBuffer, diff --git a/src/omnisharp/protocol.ts b/src/omnisharp/protocol.ts index 94cf74c397..1bcfa36d47 100644 --- a/src/omnisharp/protocol.ts +++ b/src/omnisharp/protocol.ts @@ -9,7 +9,7 @@ import { findNetCoreTargetFramework, findNetFrameworkTargetFramework, findNetStandardTargetFramework, -} from '../shared/utils'; +} from '../shared/utils.js'; export namespace Requests { export const AddToProject = '/addtoproject'; diff --git a/src/omnisharp/requestQueue.ts b/src/omnisharp/requestQueue.ts index d7f6439085..e66a357ba9 100644 --- a/src/omnisharp/requestQueue.ts +++ b/src/omnisharp/requestQueue.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as prioritization from './prioritization'; +import * as prioritization from './prioritization.js'; import { OmnisharpServerProcessRequestComplete, OmnisharpServerProcessRequestStart, OmnisharpServerDequeueRequest, OmnisharpServerEnqueueRequest, -} from './omnisharpLoggingEvents'; -import { EventStream } from '../eventStream'; +} from './omnisharpLoggingEvents.js'; +import { EventStream } from '../eventStream.js'; export interface Request { command: string; diff --git a/src/omnisharp/requirementCheck.ts b/src/omnisharp/requirementCheck.ts index 2a59f8995a..ba863d025c 100644 --- a/src/omnisharp/requirementCheck.ts +++ b/src/omnisharp/requirementCheck.ts @@ -5,11 +5,11 @@ import * as vscode from 'vscode'; import * as semver from 'semver'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { getMonoVersion } from '../utils/getMonoVersion'; -import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; -import { getMSBuildVersion } from '../utils/getMsBuildInfo'; -import { omnisharpOptions } from '../shared/options'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; +import { getMonoVersion } from '../utils/getMonoVersion.js'; +import { OmniSharpMonoResolver } from './omniSharpMonoResolver.js'; +import { getMSBuildVersion } from '../utils/getMsBuildInfo.js'; +import { omnisharpOptions } from '../shared/options.js'; export interface RequirementResult { needsDotNetSdk: boolean; diff --git a/src/omnisharp/server.ts b/src/omnisharp/server.ts index aa54915492..5738521970 100644 --- a/src/omnisharp/server.ts +++ b/src/omnisharp/server.ts @@ -5,36 +5,36 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as protocol from './protocol'; -import * as serverUtils from './utils'; -import { vscode, CancellationToken } from '../vscodeAdapter'; -import { LaunchTarget, LaunchTargetKind } from '../shared/launchTarget'; -import { DelayTracker } from './delayTracker'; +import * as protocol from './protocol.js'; +import * as serverUtils from './utils.js'; +import { vscode, CancellationToken } from '../vscodeAdapter.js'; +import { LaunchTarget, LaunchTargetKind } from '../shared/launchTarget.js'; +import { DelayTracker } from './delayTracker.js'; import { EventEmitter } from 'events'; -import { OmnisharpManager } from './omnisharpManager'; -import { PlatformInformation } from '../shared/platform'; -import { OmnisharpDownloader } from './omnisharpDownloader'; -import * as ObservableEvents from './omnisharpLoggingEvents'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; +import { OmnisharpManager } from './omnisharpManager.js'; +import { PlatformInformation } from '../shared/platform.js'; +import { OmnisharpDownloader } from './omnisharpDownloader.js'; +import * as ObservableEvents from './omnisharpLoggingEvents.js'; +import { EventStream } from '../eventStream.js'; +import { NetworkSettingsProvider } from '../networkSettings.js'; import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import CompositeDisposable from '../compositeDisposable'; -import Disposable from '../disposable'; +import CompositeDisposable from '../compositeDisposable.js'; +import Disposable from '../disposable.js'; import { ExtensionContext, LogOutputChannel, OutputChannel } from 'vscode'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; -import { LspEngine } from './engines/lspEngine'; -import { IEngine } from './engines/IEngine'; -import { StdioEngine } from './engines/stdioEngine'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { showProjectSelector } from './features/commands'; -import { validateRequirements } from './requirementCheck'; -import { Advisor } from './features/diagnosticsProvider'; -import TestManager from './features/dotnetTest'; -import { findLaunchTargets } from './launcher'; -import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; -import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.js'; +import { LspEngine } from './engines/lspEngine.js'; +import { IEngine } from './engines/IEngine.js'; +import { StdioEngine } from './engines/stdioEngine.js'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; +import { showProjectSelector } from './features/commands.js'; +import { validateRequirements } from './requirementCheck.js'; +import { Advisor } from './features/diagnosticsProvider.js'; +import TestManager from './features/dotnetTest.js'; +import { findLaunchTargets } from './launcher.js'; +import { ProjectConfigurationMessage } from '../shared/projectConfiguration.js'; +import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options.js'; +import { ITelemetryReporter } from '../shared/telemetryReporter.js'; enum ServerState { Starting, diff --git a/src/omnisharp/typeConversion.ts b/src/omnisharp/typeConversion.ts index 4fa0212385..800154b5ba 100644 --- a/src/omnisharp/typeConversion.ts +++ b/src/omnisharp/typeConversion.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from './protocol'; +import * as protocol from './protocol.js'; import * as vscode from 'vscode'; export function toLocation(location: protocol.ResourceLocation | protocol.QuickFix): vscode.Location { diff --git a/src/omnisharp/utils.ts b/src/omnisharp/utils.ts index 56f92b3bf5..9b02b15b69 100644 --- a/src/omnisharp/utils.ts +++ b/src/omnisharp/utils.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from './server'; -import * as protocol from './protocol'; +import { OmniSharpServer } from './server.js'; +import * as protocol from './protocol.js'; import * as vscode from 'vscode'; import { CancellationToken } from 'vscode-languageclient'; import { @@ -13,7 +13,7 @@ import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyHostedServer, findNetCoreTargetFramework, -} from '../shared/utils'; +} from '../shared/utils.js'; export async function codeCheck(server: OmniSharpServer, request: protocol.Request, token: vscode.CancellationToken) { return server.makeRequest(protocol.Requests.CodeCheck, request, token); diff --git a/src/packageManager/IInstallDependencies.ts b/src/packageManager/IInstallDependencies.ts index d4c12b3cfc..d3442ba1ed 100644 --- a/src/packageManager/IInstallDependencies.ts +++ b/src/packageManager/IInstallDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AbsolutePathPackage } from './absolutePathPackage'; +import { AbsolutePathPackage } from './absolutePathPackage.js'; export type DependencyInstallationStatus = { [name: string]: boolean }; diff --git a/src/packageManager/absolutePathPackage.ts b/src/packageManager/absolutePathPackage.ts index 5505dc43eb..7568f2bca5 100644 --- a/src/packageManager/absolutePathPackage.ts +++ b/src/packageManager/absolutePathPackage.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Package } from './package'; -import { IPackage } from './IPackage'; -import { AbsolutePath } from './absolutePath'; +import { Package } from './package.js'; +import { IPackage } from './IPackage.js'; +import { AbsolutePath } from './absolutePath.js'; export class AbsolutePathPackage implements IPackage { constructor( diff --git a/src/packageManager/downloadAndInstallPackages.ts b/src/packageManager/downloadAndInstallPackages.ts index da39e0e352..e700757508 100644 --- a/src/packageManager/downloadAndInstallPackages.ts +++ b/src/packageManager/downloadAndInstallPackages.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PackageError } from './packageError'; -import { NestedError } from '../nestedError'; -import { DownloadFile } from './fileDownloader'; -import { InstallZip } from './zipInstaller'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { AbsolutePathPackage } from './absolutePathPackage'; -import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from '../common'; -import { InstallationFailure, IntegrityCheckFailure } from '../shared/loggingEvents'; -import { mkdirpSync } from 'fs-extra'; -import { PackageInstallStart } from '../shared/loggingEvents'; -import { DownloadValidator } from './isValidDownload'; +import { PackageError } from './packageError.js'; +import { NestedError } from '../nestedError.js'; +import { DownloadFile } from './fileDownloader.js'; +import { InstallZip } from './zipInstaller.js'; +import { EventStream } from '../eventStream.js'; +import { NetworkSettingsProvider } from '../networkSettings.js'; +import { AbsolutePathPackage } from './absolutePathPackage.js'; +import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from '../common.js'; +import { InstallationFailure, IntegrityCheckFailure } from '../shared/loggingEvents.js'; +import fsExtra from 'fs-extra'; +import { PackageInstallStart } from '../shared/loggingEvents.js'; +import { DownloadValidator } from './isValidDownload.js'; import { CancellationToken } from 'vscode'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; -import { DependencyInstallationStatus } from './IInstallDependencies'; +import { ITelemetryReporter } from '../shared/telemetryReporter.js'; +import { DependencyInstallationStatus } from './IInstallDependencies.js'; export async function downloadAndInstallPackages( packages: AbsolutePathPackage[], @@ -32,7 +32,7 @@ export async function downloadAndInstallPackages( for (const pkg of packages) { let installationStage = 'touchBeginFile'; try { - mkdirpSync(pkg.installPath.value); + fsExtra.mkdirpSync(pkg.installPath.value); await touchInstallFile(pkg.installPath, InstallFileType.Begin); let count = 1; const willTryInstallingPackage = () => count <= 2; // try 2 times diff --git a/src/packageManager/fileDownloader.ts b/src/packageManager/fileDownloader.ts index b1535a2132..c7bd906761 100644 --- a/src/packageManager/fileDownloader.ts +++ b/src/packageManager/fileDownloader.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as https from 'https'; -import { EventStream } from '../eventStream'; +import { EventStream } from '../eventStream.js'; import { DownloadSuccess, DownloadStart, @@ -12,11 +12,11 @@ import { DownloadFailure, DownloadProgress, DownloadSizeObtained, -} from '../shared/loggingEvents'; -import { NestedError } from '../nestedError'; +} from '../shared/loggingEvents.js'; +import { NestedError } from '../nestedError.js'; import { parse as parseUrl } from 'url'; -import { getProxyAgent } from './proxy'; -import { NetworkSettingsProvider } from '../networkSettings'; +import { getProxyAgent } from './proxy.js'; +import { NetworkSettingsProvider } from '../networkSettings.js'; import { CancellationToken } from 'vscode'; export async function DownloadFile( diff --git a/src/packageManager/getAbsolutePathPackagesToInstall.ts b/src/packageManager/getAbsolutePathPackagesToInstall.ts index 3efc604519..18db75422c 100644 --- a/src/packageManager/getAbsolutePathPackagesToInstall.ts +++ b/src/packageManager/getAbsolutePathPackagesToInstall.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import { AbsolutePathPackage } from './absolutePathPackage'; -import { getNotInstalledPackagesForPlatform } from './packageFilterer'; -import { Package } from './package'; +import { PlatformInformation } from '../shared/platform.js'; +import { AbsolutePathPackage } from './absolutePathPackage.js'; +import { getNotInstalledPackagesForPlatform } from './packageFilterer.js'; +import { Package } from './package.js'; export async function getAbsolutePathPackagesToInstall( packages: Package[], diff --git a/src/packageManager/isValidDownload.ts b/src/packageManager/isValidDownload.ts index fd592395ff..86d14dc289 100644 --- a/src/packageManager/isValidDownload.ts +++ b/src/packageManager/isValidDownload.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as crypto from 'crypto'; -import { EventStream } from '../eventStream'; -import { IntegrityCheckSuccess, DownloadValidation } from '../shared/loggingEvents'; +import { EventStream } from '../eventStream.js'; +import { IntegrityCheckSuccess, DownloadValidation } from '../shared/loggingEvents.js'; export interface DownloadValidator { (buffer: Buffer, integrity: string | undefined, eventStream: EventStream): boolean; diff --git a/src/packageManager/package.ts b/src/packageManager/package.ts index da54200e5d..255179902a 100644 --- a/src/packageManager/package.ts +++ b/src/packageManager/package.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IPackage } from './IPackage'; +import { IPackage } from './IPackage.js'; export interface Package extends IPackage { installPath?: string; diff --git a/src/packageManager/packageError.ts b/src/packageManager/packageError.ts index 9954ee8ec8..8d99741fe9 100644 --- a/src/packageManager/packageError.ts +++ b/src/packageManager/packageError.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { NestedError } from '../nestedError'; -import { IPackage } from './IPackage'; +import { NestedError } from '../nestedError.js'; +import { IPackage } from './IPackage.js'; export class PackageError extends NestedError { // Do not put PII (personally identifiable information) in the 'message' field as it will be logged to telemetry diff --git a/src/packageManager/packageFilterer.ts b/src/packageManager/packageFilterer.ts index 80d22fe4a8..d8e46a3cab 100644 --- a/src/packageManager/packageFilterer.ts +++ b/src/packageManager/packageFilterer.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import * as util from '../common'; -import { AbsolutePathPackage } from './absolutePathPackage'; +import { PlatformInformation } from '../shared/platform.js'; +import * as util from '../common.js'; +import { AbsolutePathPackage } from './absolutePathPackage.js'; const NEUTRAL = 'neutral'; diff --git a/src/packageManager/zipInstaller.ts b/src/packageManager/zipInstaller.ts index 8cf57606b8..4f1f12deec 100644 --- a/src/packageManager/zipInstaller.ts +++ b/src/packageManager/zipInstaller.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as fs from 'fs'; -import { ensureDir } from 'fs-extra'; +import fsExtra from 'fs-extra'; import * as path from 'path'; import * as yauzl from 'yauzl'; -import { EventStream } from '../eventStream'; -import { InstallationStart, ZipError } from '../shared/loggingEvents'; -import { NestedError } from '../nestedError'; -import { AbsolutePath } from './absolutePath'; +import { EventStream } from '../eventStream.js'; +import { InstallationStart, ZipError } from '../shared/loggingEvents.js'; +import { NestedError } from '../nestedError.js'; +import { AbsolutePath } from './absolutePath.js'; export async function InstallZip( buffer: Buffer, @@ -38,7 +38,7 @@ export async function InstallZip( if (entry.fileName.endsWith('/')) { // Directory - create it try { - await ensureDir(absoluteEntryPath, 0o775); + await fsExtra.ensureDir(absoluteEntryPath, 0o775); zipFile.readEntry(); } catch (err) { const error = err as NodeJS.ErrnoException; // Hack for TypeScript to type err correctly @@ -54,7 +54,7 @@ export async function InstallZip( } try { - await ensureDir(path.dirname(absoluteEntryPath), 0o775); + await fsExtra.ensureDir(path.dirname(absoluteEntryPath), 0o775); // Make sure executable files have correct permissions when extracted const binaryPaths = binaries?.map((binary) => binary.value); diff --git a/src/razor/razorOmnisharp.ts b/src/razor/razorOmnisharp.ts index 21a341e865..6af7b36ef9 100644 --- a/src/razor/razorOmnisharp.ts +++ b/src/razor/razorOmnisharp.ts @@ -7,8 +7,8 @@ import * as fs from 'fs'; import * as RazorOmniSharp from 'microsoft.aspnetcore.razor.vscode'; import * as path from 'path'; import * as vscode from 'vscode'; -import { EventStream } from '../eventStream'; -import { showWarningMessage } from '../shared/observers/utils/showMessage'; +import { EventStream } from '../eventStream.js'; +import { showWarningMessage } from '../shared/observers/utils/showMessage.js'; export async function activateRazorOmniSharpExtension( context: vscode.ExtensionContext, diff --git a/src/razor/razorOmnisharpDownloader.ts b/src/razor/razorOmnisharpDownloader.ts index 83ffd4edc5..06d76b4310 100644 --- a/src/razor/razorOmnisharpDownloader.ts +++ b/src/razor/razorOmnisharpDownloader.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../shared/loggingEvents'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; -import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; -import { isValidDownload } from '../packageManager/isValidDownload'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +import { PlatformInformation } from '../shared/platform.js'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../shared/loggingEvents.js'; +import { EventStream } from '../eventStream.js'; +import { NetworkSettingsProvider } from '../networkSettings.js'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages.js'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils.js'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall.js'; +import { isValidDownload } from '../packageManager/isValidDownload.js'; +import { ITelemetryReporter } from '../shared/telemetryReporter.js'; export class RazorOmnisharpDownloader { public constructor( diff --git a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts index 2c6238dfc4..80e7e5bcc2 100644 --- a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts +++ b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts @@ -9,25 +9,25 @@ import { join } from 'path'; import { fileURLToPath } from 'url'; import * as vscode from 'vscode'; import { ChromeBrowserFinder, EdgeBrowserFinder } from '@vscode/js-debug-browsers'; -import { ONLY_JS_DEBUG_NAME, MANAGED_DEBUG_NAME, JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; -import { isValidEvent, onDidTerminateDebugSession } from './terminateDebugHandler'; -import path = require('path'); +import { ONLY_JS_DEBUG_NAME, MANAGED_DEBUG_NAME, JS_DEBUG_NAME, SERVER_APP_NAME } from './constants.js'; +import { isValidEvent, onDidTerminateDebugSession } from './terminateDebugHandler.js'; +import * as path from 'path'; import * as cp from 'child_process'; -import { getExtensionPath } from '../../../common'; -import { getCSharpDevKit } from '../../../utils/getCSharpDevKit'; -import { CSharpExtensionId } from '../../../constants/csharpExtensionId'; -import { DotNetRuntimeVersion } from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver'; +import { getExtensionPath } from '../../../common.js'; +import { getCSharpDevKit } from '../../../utils/getCSharpDevKit.js'; +import { CSharpExtensionId } from '../../../constants/csharpExtensionId.js'; +import { DotNetRuntimeVersion } from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.js'; import { IDotnetAcquireContext, IDotnetAcquireResult, IDotnetFindPathContext, -} from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi'; -import { IDisposable } from '@microsoft/servicehub-framework'; -import { Observer } from '@microsoft/servicehub-framework/js/src/jsonRpc/Observer'; +} from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi.js'; import { EventEmitter } from 'events'; import { Formatters, + IDisposable, MessageDelimiters, + Observer, ServiceJsonRpcDescriptor, ServiceMoniker, ServiceRpcDescriptor, @@ -59,7 +59,7 @@ const targetFrameworkServiceDescriptor: ServiceRpcDescriptor = Object.freeze( ) ); -import { showErrorMessage, showInformationMessage } from '../../../shared/observers/utils/showMessage'; +import { showErrorMessage, showInformationMessage } from '../../../shared/observers/utils/showMessage.js'; export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurationProvider { private static readonly autoDetectUserNotice: string = vscode.l10n.t( diff --git a/src/razor/src/blazorDebug/terminateDebugHandler.ts b/src/razor/src/blazorDebug/terminateDebugHandler.ts index 6c60d3f5a8..ea7e43bd9d 100644 --- a/src/razor/src/blazorDebug/terminateDebugHandler.ts +++ b/src/razor/src/blazorDebug/terminateDebugHandler.ts @@ -6,7 +6,7 @@ import psList from 'ps-list'; import { DebugSession } from 'vscode'; import { LogOutputChannel } from 'vscode'; -import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; +import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants.js'; export const isValidEvent = (name: string) => { // The name can be of the form: `Debug Blazor Web Assembly in Browser: https://localhost:7291` diff --git a/src/razor/src/colorPresentation/colorPresentationHandler.ts b/src/razor/src/colorPresentation/colorPresentationHandler.ts index dbe21cd5f6..3e3bd17c83 100644 --- a/src/razor/src/colorPresentation/colorPresentationHandler.ts +++ b/src/razor/src/colorPresentation/colorPresentationHandler.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit'; -import { ColorPresentationContext } from './colorPresentationContext'; -import { SerializableColorPresentation } from './serializableColorPresentation'; -import { SerializableColorPresentationParams } from './serializableColorPresentationParams'; +import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit.js'; +import { ColorPresentationContext } from './colorPresentationContext.js'; +import { SerializableColorPresentation } from './serializableColorPresentation.js'; +import { SerializableColorPresentationParams } from './serializableColorPresentationParams.js'; export class ColorPresentationHandler { constructor() {} diff --git a/src/razor/src/colorPresentation/serializableColorPresentation.ts b/src/razor/src/colorPresentation/serializableColorPresentation.ts index 6d5de76161..16ec7523c0 100644 --- a/src/razor/src/colorPresentation/serializableColorPresentation.ts +++ b/src/razor/src/colorPresentation/serializableColorPresentation.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SerializableTextEdit } from '../rpc/serializableTextEdit'; +import { SerializableTextEdit } from '../rpc/serializableTextEdit.js'; export class SerializableColorPresentation { constructor( diff --git a/src/razor/src/colorPresentation/serializableColorPresentationParams.ts b/src/razor/src/colorPresentation/serializableColorPresentationParams.ts index f9c74c533c..eb163e17c3 100644 --- a/src/razor/src/colorPresentation/serializableColorPresentationParams.ts +++ b/src/razor/src/colorPresentation/serializableColorPresentationParams.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { SerializableRange } from '../rpc/serializableRange'; -import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier'; +import { SerializableRange } from '../rpc/serializableRange.js'; +import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier.js'; export interface SerializableColorPresentationParams { textDocument: SerializableTextDocumentIdentifier; diff --git a/src/razor/src/documentColor/documentColorHandler.ts b/src/razor/src/documentColor/documentColorHandler.ts index 9a451ea98f..9173e6da5c 100644 --- a/src/razor/src/documentColor/documentColorHandler.ts +++ b/src/razor/src/documentColor/documentColorHandler.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertRangeToSerializable } from '../rpc/serializableRange'; -import { SerializableColorInformation } from './serializableColorInformation'; +import { convertRangeToSerializable } from '../rpc/serializableRange.js'; +import { SerializableColorInformation } from './serializableColorInformation.js'; export class DocumentColorHandler { constructor() {} diff --git a/src/razor/src/documentColor/serializableColorInformation.ts b/src/razor/src/documentColor/serializableColorInformation.ts index 76572b986e..fdd2f1674c 100644 --- a/src/razor/src/documentColor/serializableColorInformation.ts +++ b/src/razor/src/documentColor/serializableColorInformation.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { SerializableRange } from '../rpc/serializableRange'; +import { SerializableRange } from '../rpc/serializableRange.js'; export class SerializableColorInformation { constructor( diff --git a/src/razor/src/folding/foldingRangeHandler.ts b/src/razor/src/folding/foldingRangeHandler.ts index 762ccadb1a..3fd8ccf991 100644 --- a/src/razor/src/folding/foldingRangeHandler.ts +++ b/src/razor/src/folding/foldingRangeHandler.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { FoldingRange, FoldingRangeKind } from 'vscode-languageclient'; -import { ObservableLogOutputChannel } from '../../../lsptoolshost/logging/observableLogOutputChannel'; +import { ObservableLogOutputChannel } from '../../../lsptoolshost/logging/observableLogOutputChannel.js'; export class FoldingRangeHandler { constructor() {} diff --git a/src/razor/src/formatting/formattingHandler.ts b/src/razor/src/formatting/formattingHandler.ts index 15fcc05be6..542c80ce65 100644 --- a/src/razor/src/formatting/formattingHandler.ts +++ b/src/razor/src/formatting/formattingHandler.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit'; -import { SerializableFormattingResponse } from './serializableFormattingResponse'; -import { SerializablePosition } from '../rpc/serializablePosition'; +import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit.js'; +import { SerializableFormattingResponse } from './serializableFormattingResponse.js'; +import { SerializablePosition } from '../rpc/serializablePosition.js'; export class FormattingHandler { private static emptyFormattingResponse = new SerializableFormattingResponse(); diff --git a/src/razor/src/formatting/serializableFormattingResponse.ts b/src/razor/src/formatting/serializableFormattingResponse.ts index 615917b6f6..86662658c3 100644 --- a/src/razor/src/formatting/serializableFormattingResponse.ts +++ b/src/razor/src/formatting/serializableFormattingResponse.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SerializableTextEdit } from '../rpc/serializableTextEdit'; +import { SerializableTextEdit } from '../rpc/serializableTextEdit.js'; export class SerializableFormattingResponse { constructor(public readonly edits?: SerializableTextEdit[]) {} diff --git a/src/razor/src/razorLanguage.ts b/src/razor/src/razorLanguage.ts index 7e7b29bca3..941bc7dd74 100644 --- a/src/razor/src/razorLanguage.ts +++ b/src/razor/src/razorLanguage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from './vscodeAdapter'; +import * as vscode from './vscodeAdapter.js'; export class RazorLanguage { public static id = 'aspnetcorerazor'; diff --git a/src/razor/src/razorLanguageConfiguration.ts b/src/razor/src/razorLanguageConfiguration.ts index 9b754bc24b..ecbc12c042 100644 --- a/src/razor/src/razorLanguageConfiguration.ts +++ b/src/razor/src/razorLanguageConfiguration.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RazorLanguage } from './razorLanguage'; +import { RazorLanguage } from './razorLanguage.js'; const VOID_ELEMENTS: string[] = [ 'area', diff --git a/src/razor/src/rpc/serializableRange.ts b/src/razor/src/rpc/serializableRange.ts index 8f0c8ed55c..4fe21721b7 100644 --- a/src/razor/src/rpc/serializableRange.ts +++ b/src/razor/src/rpc/serializableRange.ts @@ -8,7 +8,7 @@ import { convertPositionFromSerializable, convertPositionToSerializable, SerializablePosition, -} from './serializablePosition'; +} from './serializablePosition.js'; // We'd typically just use vscode.Range here; however, that type doesn't serialize properly over the wire. export interface SerializableRange { diff --git a/src/razor/src/rpc/serializableTextEdit.ts b/src/razor/src/rpc/serializableTextEdit.ts index 6a5ae5565d..5a6c5f9ed8 100644 --- a/src/razor/src/rpc/serializableTextEdit.ts +++ b/src/razor/src/rpc/serializableTextEdit.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertRangeFromSerializable, convertRangeToSerializable, SerializableRange } from './serializableRange'; +import { convertRangeFromSerializable, convertRangeToSerializable, SerializableRange } from './serializableRange.js'; // We'd typically just use vscode.TextEdit here; however, that type doesn't serialize properly over the wire. export interface SerializableTextEdit { diff --git a/src/shared/assets.ts b/src/shared/assets.ts index 333738ccc1..b20323bd3c 100644 --- a/src/shared/assets.ts +++ b/src/shared/assets.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as jsonc from 'jsonc-parser'; import { FormattingOptions, ModificationOptions } from 'jsonc-parser'; import * as os from 'os'; import * as path from 'path'; import * as tasks from 'vscode-tasks'; -import * as util from '../common'; +import * as util from '../common.js'; import * as vscode from 'vscode'; -import { tolerantParse } from '../json'; -import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider'; -import { showErrorMessage } from './observers/utils/showMessage'; +import { tolerantParse } from '../json.js'; +import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider.js'; +import { showErrorMessage } from './observers/utils/showMessage.js'; type DebugConsoleOptions = { console: string }; diff --git a/src/shared/configurationProvider.ts b/src/shared/configurationProvider.ts index a073e24168..3798854d8b 100644 --- a/src/shared/configurationProvider.ts +++ b/src/shared/configurationProvider.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ParsedEnvironmentFile } from '../coreclrDebug/parsedEnvironmentFile'; -import { debugSessionTracker } from '../coreclrDebug/provisionalDebugSessionTracker'; +import { ParsedEnvironmentFile } from '../coreclrDebug/parsedEnvironmentFile.js'; +import { debugSessionTracker } from '../coreclrDebug/provisionalDebugSessionTracker.js'; -import { CertToolStatusCodes, createSelfSignedCert, hasDotnetDevCertsHttps } from '../utils/dotnetDevCertsHttps'; +import { CertToolStatusCodes, createSelfSignedCert, hasDotnetDevCertsHttps } from '../utils/dotnetDevCertsHttps.js'; import { AttachItem, RemoteAttachPicker, DotNetAttachItemsProviderFactory, AttachPicker, -} from '../shared/processPicker'; -import { PlatformInformation } from './platform'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit'; +} from '../shared/processPicker.js'; +import { PlatformInformation } from './platform.js'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit.js'; import { ActionOption, showErrorMessageWithOptions, showInformationMessage, showWarningMessage, -} from './observers/utils/showMessage'; +} from './observers/utils/showMessage.js'; /** * Class used for debug configurations that will be sent to the debugger registered by {@link DebugAdapterExecutableFactory} diff --git a/src/shared/constants/IHostExecutableResolver.ts b/src/shared/constants/IHostExecutableResolver.ts index f1c783ef63..b13c8f5954 100644 --- a/src/shared/constants/IHostExecutableResolver.ts +++ b/src/shared/constants/IHostExecutableResolver.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { HostExecutableInformation } from './hostExecutableInformation'; +import { HostExecutableInformation } from './hostExecutableInformation.js'; export interface IHostExecutableResolver { getHostExecutableInfo(): Promise; diff --git a/src/shared/dotnetConfigurationProvider.ts b/src/shared/dotnetConfigurationProvider.ts index b62187fae0..05050bc0b1 100644 --- a/src/shared/dotnetConfigurationProvider.ts +++ b/src/shared/dotnetConfigurationProvider.ts @@ -3,18 +3,18 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as vscode from 'vscode'; -import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider'; -import { AssetGenerator, AssetOperations, addTasksJsonIfNecessary, getBuildOperations } from './assets'; -import { getServiceBroker } from '../lsptoolshost/serviceBroker/brokeredServicesHosting'; -import Descriptors from '../lsptoolshost/solutionSnapshot/descriptors'; +import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider.js'; +import { AssetGenerator, AssetOperations, addTasksJsonIfNecessary, getBuildOperations } from './assets.js'; +import { getServiceBroker } from '../lsptoolshost/serviceBroker/brokeredServicesHosting.js'; +import Descriptors from '../lsptoolshost/solutionSnapshot/descriptors.js'; import { DotnetDebugConfigurationServiceErrorKind, IDotnetDebugConfigurationService, IDotnetDebugConfigurationServiceResult, -} from '../lsptoolshost/debugger/IDotnetDebugConfigurationService'; -import { DotnetWorkspaceConfigurationProvider } from './workspaceConfigurationProvider'; +} from '../lsptoolshost/debugger/IDotnetDebugConfigurationService.js'; +import { DotnetWorkspaceConfigurationProvider } from './workspaceConfigurationProvider.js'; // User errors that can be shown to the user. class LaunchServiceError extends Error {} diff --git a/src/shared/limitedActivationStatus.ts b/src/shared/limitedActivationStatus.ts index d365c25d30..86e047bce6 100644 --- a/src/shared/limitedActivationStatus.ts +++ b/src/shared/limitedActivationStatus.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { languageServerOptions } from './options'; -import { RazorLanguage } from '../razor/src/razorLanguage'; -import { combineDocumentSelectors } from './utils/combineDocumentSelectors'; +import { languageServerOptions } from './options.js'; +import { RazorLanguage } from '../razor/src/razorLanguage.js'; +import { combineDocumentSelectors } from './utils/combineDocumentSelectors.js'; export class LimitedActivationStatus { static createStatusItem(context: vscode.ExtensionContext) { diff --git a/src/shared/loggingEvents.ts b/src/shared/loggingEvents.ts index 77addb4da8..0fc9ed442b 100644 --- a/src/shared/loggingEvents.ts +++ b/src/shared/loggingEvents.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventType } from './eventType'; -import { PlatformInformation } from './platform'; +import { EventType } from './eventType.js'; +import { PlatformInformation } from './platform.js'; export interface BaseEvent { type: EventType; diff --git a/src/shared/migrateOptions.ts b/src/shared/migrateOptions.ts index 7ddc0cb9a4..35f9e475c9 100644 --- a/src/shared/migrateOptions.ts +++ b/src/shared/migrateOptions.ts @@ -6,9 +6,9 @@ import * as fs from 'fs'; import * as path from 'path'; import { types } from 'util'; -import { ConfigurationTarget, vscode, WorkspaceConfiguration } from '../vscodeAdapter'; -import { CSharpExtensionId } from '../constants/csharpExtensionId'; -import { commonOptions } from './options'; +import { ConfigurationTarget, vscode, WorkspaceConfiguration } from '../vscodeAdapter.js'; +import { CSharpExtensionId } from '../constants/csharpExtensionId.js'; +import { commonOptions } from './options.js'; export interface IDotnetAcquisitionExistingPaths { extensionId: string; diff --git a/src/shared/observables/createOptionStream.ts b/src/shared/observables/createOptionStream.ts index 9d977a5653..676b58974b 100644 --- a/src/shared/observables/createOptionStream.ts +++ b/src/shared/observables/createOptionStream.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from '../../vscodeAdapter'; +import { vscode } from '../../vscodeAdapter.js'; import { Observable, Observer } from 'rxjs'; import { publishBehavior } from 'rxjs/operators'; diff --git a/src/shared/observers/baseChannelObserver.ts b/src/shared/observers/baseChannelObserver.ts index 1942129df4..779e547565 100644 --- a/src/shared/observers/baseChannelObserver.ts +++ b/src/shared/observers/baseChannelObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../../vscodeAdapter'; -import { BaseEvent } from '../../shared/loggingEvents'; +import * as vscode from '../../vscodeAdapter.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export abstract class BaseChannelObserver { constructor(private channel: vscode.OutputChannel) {} diff --git a/src/shared/observers/baseLoggerObserver.ts b/src/shared/observers/baseLoggerObserver.ts index b6478572cb..847e41573f 100644 --- a/src/shared/observers/baseLoggerObserver.ts +++ b/src/shared/observers/baseLoggerObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../../vscodeAdapter'; -import { Logger } from '../../logger'; -import { BaseEvent } from '../../shared/loggingEvents'; +import * as vscode from '../../vscodeAdapter.js'; +import { Logger } from '../../logger.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export abstract class BaseLoggerObserver { public logger: Logger; diff --git a/src/shared/observers/csharpChannelObserver.ts b/src/shared/observers/csharpChannelObserver.ts index ccc96b39f4..6732eeab3c 100644 --- a/src/shared/observers/csharpChannelObserver.ts +++ b/src/shared/observers/csharpChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from './baseChannelObserver'; -import { EventType } from '../eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from './baseChannelObserver.js'; +import { EventType } from '../eventType.js'; +import { BaseEvent } from '../../shared/loggingEvents.js'; export class CsharpChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/shared/observers/csharpLoggerObserver.ts b/src/shared/observers/csharpLoggerObserver.ts index e702586214..727c772f90 100644 --- a/src/shared/observers/csharpLoggerObserver.ts +++ b/src/shared/observers/csharpLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from './baseLoggerObserver'; -import * as Event from '../../shared/loggingEvents'; -import { PackageError } from '../../packageManager/packageError'; -import { EventType } from '../eventType'; +import { BaseLoggerObserver } from './baseLoggerObserver.js'; +import * as Event from '../../shared/loggingEvents.js'; +import { PackageError } from '../../packageManager/packageError.js'; +import { EventType } from '../eventType.js'; export class CsharpLoggerObserver extends BaseLoggerObserver { private dots = 0; diff --git a/src/shared/observers/optionChangeObserver.ts b/src/shared/observers/optionChangeObserver.ts index b35fb396ec..c122fbbcdd 100644 --- a/src/shared/observers/optionChangeObserver.ts +++ b/src/shared/observers/optionChangeObserver.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Observable } from 'rxjs'; -import Disposable from '../../disposable'; +import Disposable from '../../disposable.js'; import { isDeepStrictEqual } from 'util'; import { CommonOptions, @@ -13,7 +13,7 @@ import { commonOptions, languageServerOptions, omnisharpOptions, -} from '../options'; +} from '../options.js'; type RelevantOptionValues = { commonOptions: Map; diff --git a/src/shared/observers/utils/showMessage.ts b/src/shared/observers/utils/showMessage.ts index 6771a5dc98..11c2a6e8f3 100644 --- a/src/shared/observers/utils/showMessage.ts +++ b/src/shared/observers/utils/showMessage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { MessageOptions, vscode } from '../../../vscodeAdapter'; +import { MessageOptions, vscode } from '../../../vscodeAdapter.js'; /** * Show an error message toast. diff --git a/src/shared/platform.ts b/src/shared/platform.ts index fc75792c03..69bb3960e2 100644 --- a/src/shared/platform.ts +++ b/src/shared/platform.ts @@ -6,9 +6,11 @@ import * as crypto from 'crypto'; import * as fs from 'fs'; import * as os from 'os'; -import * as util from '../common'; +import { fileURLToPath } from 'url'; +import * as util from '../common.js'; const unknown = 'unknown'; +const currentDirectory = fileURLToPath(new URL('.', import.meta.url)); /** * There is no standard way on Linux to find the distribution name and version. @@ -180,7 +182,7 @@ export class PlatformInformation { } private static async GetUnixArchitecture(): Promise { - const architecture = (await util.execChildProcess('uname -m', __dirname, process.env)).trim(); + const architecture = (await util.execChildProcess('uname -m', currentDirectory, process.env)).trim(); if (architecture === 'aarch64') { return 'arm64'; } @@ -190,7 +192,7 @@ export class PlatformInformation { // Emulates https://github.com/dotnet/install-scripts/blob/3c6cc06/src/dotnet-install.sh#L187-L189. private static async GetIsMusl(): Promise { try { - const output = await util.execChildProcess('ldd --version', __dirname, process.env); + const output = await util.execChildProcess('ldd --version', currentDirectory, process.env); return output.includes('musl'); } catch (err) { return err instanceof Error ? err.message.includes('musl') : false; diff --git a/src/shared/processPicker.ts b/src/shared/processPicker.ts index 87edaa53a1..9b8131617b 100644 --- a/src/shared/processPicker.ts +++ b/src/shared/processPicker.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as child_process from 'child_process'; -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { PlatformInformation } from './platform'; -import { findPowerShell, getExtensionPath } from '../common'; +import { PlatformInformation } from './platform.js'; +import { findPowerShell, getExtensionPath } from '../common.js'; export interface AttachItem extends vscode.QuickPickItem { id: string; diff --git a/src/shared/projectConfiguration.ts b/src/shared/projectConfiguration.ts index e774cc24bb..2d0e4920db 100644 --- a/src/shared/projectConfiguration.ts +++ b/src/shared/projectConfiguration.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as crypto from 'crypto'; -import { machineIdSync } from 'node-machine-id'; -import { PlatformInformation } from './platform'; -import { ITelemetryReporter, getTelemetryProps } from './telemetryReporter'; -import { DotnetInfo } from './utils/dotnetInfo'; +import nodeMachineId from 'node-machine-id'; +import { PlatformInformation } from './platform.js'; +import { ITelemetryReporter, getTelemetryProps } from './telemetryReporter.js'; +import { DotnetInfo } from './utils/dotnetInfo.js'; export interface ProjectConfigurationMessage { ProjectId: string; @@ -72,7 +72,7 @@ export function reportProjectConfigurationEvent( function createSolutionId(solutionPath: string) { const solutionHash = crypto.createHash('sha256').update(solutionPath).digest('hex'); - const machineId = machineIdSync(); + const machineId = nodeMachineId.machineIdSync(); const machineHash = crypto.createHash('sha256').update(machineId).digest('hex'); return crypto diff --git a/src/shared/reportIssue.ts b/src/shared/reportIssue.ts index 2645adfa08..db8ac8133a 100644 --- a/src/shared/reportIssue.ts +++ b/src/shared/reportIssue.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; import { basename, dirname } from 'path'; -import { DotnetInfo } from './utils/dotnetInfo'; -import { CSharpExtensionId } from '../constants/csharpExtensionId'; -import { commonOptions, LanguageServerOptions, languageServerOptions } from './options'; +import { DotnetInfo } from './utils/dotnetInfo.js'; +import { CSharpExtensionId } from '../constants/csharpExtensionId.js'; +import { commonOptions, LanguageServerOptions, languageServerOptions } from './options.js'; export default async function reportIssue( context: vscode.ExtensionContext, diff --git a/src/shared/telemetryReporter.ts b/src/shared/telemetryReporter.ts index a834a388ed..6564bc5ac7 100644 --- a/src/shared/telemetryReporter.ts +++ b/src/shared/telemetryReporter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from './platform'; +import { PlatformInformation } from './platform.js'; export interface ITelemetryReporter { sendTelemetryEvent( @@ -19,6 +19,10 @@ export interface ITelemetryReporter { ): void; } +export interface ITelemetryReporterWithLevel extends ITelemetryReporter { + telemetryLevel: 'all' | 'error' | 'crash' | 'off'; +} + export function getTelemetryProps(platformInfo: PlatformInformation) { const telemetryProps: { [key: string]: string } = { 'platform.architecture': platformInfo.architecture, diff --git a/src/shared/utils.ts b/src/shared/utils.ts index 7c70a1f6e7..bb762674ec 100644 --- a/src/shared/utils.ts +++ b/src/shared/utils.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as path from 'path'; import { parse as parseJsonc } from 'jsonc-parser'; diff --git a/src/shared/utils/getDotnetInfo.ts b/src/shared/utils/getDotnetInfo.ts index 69e3c896e6..1bb55fb66d 100644 --- a/src/shared/utils/getDotnetInfo.ts +++ b/src/shared/utils/getDotnetInfo.ts @@ -5,9 +5,9 @@ import * as semver from 'semver'; import { join } from 'path'; -import { execChildProcess } from '../../common'; -import { CoreClrDebugUtil } from '../../coreclrDebug/util'; -import { DotnetInfo, RuntimeInfo } from './dotnetInfo'; +import { execChildProcess } from '../../common.js'; +import { CoreClrDebugUtil } from '../../coreclrDebug/util.js'; +import { DotnetInfo, RuntimeInfo } from './dotnetInfo.js'; import { EOL } from 'os'; // This function calls `dotnet --info` and returns the result as a DotnetInfo object. diff --git a/src/shared/workspaceConfigurationProvider.ts b/src/shared/workspaceConfigurationProvider.ts index 904ec1513f..75d3ee757c 100644 --- a/src/shared/workspaceConfigurationProvider.ts +++ b/src/shared/workspaceConfigurationProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as vscode from 'vscode'; import { @@ -13,12 +13,12 @@ import { createAttachConfiguration, createFallbackLaunchConfiguration, getBuildOperations, -} from './assets'; +} from './assets.js'; import { parse } from 'jsonc-parser'; -import { IWorkspaceDebugInformationProvider } from './IWorkspaceDebugInformationProvider'; -import { PlatformInformation } from './platform'; -import { BaseVsDbgConfigurationProvider } from './configurationProvider'; -import { showErrorMessage } from './observers/utils/showMessage'; +import { IWorkspaceDebugInformationProvider } from './IWorkspaceDebugInformationProvider.js'; +import { PlatformInformation } from './platform.js'; +import { BaseVsDbgConfigurationProvider } from './configurationProvider.js'; +import { showErrorMessage } from './observers/utils/showMessage.js'; /** * This class will be used for providing debug configurations given workspace information. diff --git a/src/statusBarItemAdapter.ts b/src/statusBarItemAdapter.ts index 5c62196679..5e01fdfca1 100644 --- a/src/statusBarItemAdapter.ts +++ b/src/statusBarItemAdapter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from './vscodeAdapter'; +import * as vscodeAdapter from './vscodeAdapter.js'; import * as vscode from 'vscode'; export class StatusBarItemAdapter implements vscodeAdapter.StatusBarItem { diff --git a/src/textEditorAdapter.ts b/src/textEditorAdapter.ts index de9e73b13b..98af074abe 100644 --- a/src/textEditorAdapter.ts +++ b/src/textEditorAdapter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from './vscodeAdapter'; +import * as vscodeAdapter from './vscodeAdapter.js'; import * as vscode from 'vscode'; export class TextEditorAdapter implements vscodeAdapter.TextEditor { diff --git a/src/tools/runtimeDependencyPackageUtils.ts b/src/tools/runtimeDependencyPackageUtils.ts index d5342b4e27..9918d19a20 100644 --- a/src/tools/runtimeDependencyPackageUtils.ts +++ b/src/tools/runtimeDependencyPackageUtils.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import { AbsolutePathPackage } from '../packageManager/absolutePathPackage'; -import { filterPlatformPackages } from '../packageManager/packageFilterer'; -import { Package } from '../packageManager/package'; +import { PlatformInformation } from '../shared/platform.js'; +import { AbsolutePathPackage } from '../packageManager/absolutePathPackage.js'; +import { filterPlatformPackages } from '../packageManager/packageFilterer.js'; +import { Package } from '../packageManager/package.js'; export function getRuntimeDependencyPackageWithId( packageId: string, diff --git a/src/tools/updatePackageDependencies.ts b/src/tools/updatePackageDependencies.ts index dd94414dfb..bb2996e20d 100644 --- a/src/tools/updatePackageDependencies.ts +++ b/src/tools/updatePackageDependencies.ts @@ -5,13 +5,13 @@ import * as fs from 'fs'; import * as os from 'os'; -import { Package } from '../packageManager/package'; -import { DownloadFile } from '../packageManager/fileDownloader'; -import { EventStream } from '../eventStream'; -import * as Event from '../shared/loggingEvents'; -import NetworkSettings, { NetworkSettingsProvider } from '../networkSettings'; -import { getBufferIntegrityHash } from '../packageManager/isValidDownload'; -import { EventType } from '../shared/eventType'; +import { Package } from '../packageManager/package.js'; +import { DownloadFile } from '../packageManager/fileDownloader.js'; +import { EventStream } from '../eventStream.js'; +import * as Event from '../shared/loggingEvents.js'; +import NetworkSettings, { NetworkSettingsProvider } from '../networkSettings.js'; +import { getBufferIntegrityHash } from '../packageManager/isValidDownload.js'; +import { EventType } from '../shared/eventType.js'; interface PackageJSONFile { runtimeDependencies: Package[]; diff --git a/src/utils/dotnetDevCertsHttps.ts b/src/utils/dotnetDevCertsHttps.ts index 9f7a20604f..a1dc478bed 100644 --- a/src/utils/dotnetDevCertsHttps.ts +++ b/src/utils/dotnetDevCertsHttps.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as cp from 'child_process'; -import { getExtensionPath } from '../common'; -import { commonOptions, omnisharpOptions } from '../shared/options'; +import { getExtensionPath } from '../common.js'; +import { commonOptions, omnisharpOptions } from '../shared/options.js'; // Will return true if `dotnet dev-certs https --check` succesfully finds a trusted development certificate. export async function hasDotnetDevCertsHttps(): Promise { diff --git a/src/utils/getCSharpDevKit.ts b/src/utils/getCSharpDevKit.ts index fcbcbd9e9c..4d54dc85d0 100644 --- a/src/utils/getCSharpDevKit.ts +++ b/src/utils/getCSharpDevKit.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { CSharpDevKitExports } from '../csharpDevKitExports'; -import { languageServerOptions } from '../shared/options'; +import { CSharpDevKitExports } from '../csharpDevKitExports.js'; +import { languageServerOptions } from '../shared/options.js'; export const csharpDevkitExtensionId = 'ms-dotnettools.csdevkit'; export const csharpDevkitIntelliCodeExtensionId = 'ms-dotnettools.vscodeintellicode-csharp'; diff --git a/src/utils/getMonoVersion.ts b/src/utils/getMonoVersion.ts index 55814461e1..491b66fbf5 100644 --- a/src/utils/getMonoVersion.ts +++ b/src/utils/getMonoVersion.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { spawn } from 'child_process'; -import { IGetMonoVersion } from '../constants/IGetMonoVersion'; +import { IGetMonoVersion } from '../constants/IGetMonoVersion.js'; export const getMonoVersion: IGetMonoVersion = async (environment: NodeJS.ProcessEnv) => { const versionRegexp = /(\d+\.\d+\.\d+)/; diff --git a/src/utils/getMsBuildInfo.ts b/src/utils/getMsBuildInfo.ts index fe608c73f1..c0aa8ef093 100644 --- a/src/utils/getMsBuildInfo.ts +++ b/src/utils/getMsBuildInfo.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { join } from 'path'; -import { execChildProcess } from '../common'; -import { CoreClrDebugUtil } from '../coreclrDebug/util'; +import { execChildProcess } from '../common.js'; +import { CoreClrDebugUtil } from '../coreclrDebug/util.js'; let _msbuildVersion: string | undefined; diff --git a/tasks/compilation/copyEsmSupportFiles.ts b/tasks/compilation/copyEsmSupportFiles.ts new file mode 100644 index 0000000000..3b211086c8 --- /dev/null +++ b/tasks/compilation/copyEsmSupportFiles.ts @@ -0,0 +1,12 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { copyFile, mkdir } from 'fs/promises'; +import path from 'path'; +import { outPath, rootPath } from '../projectPaths.js'; + +const outputTestPath = path.join(outPath, 'test'); +await mkdir(outputTestPath, { recursive: true }); +await copyFile(path.join(rootPath, 'test', 'jestProjectNames.mjs'), path.join(outputTestPath, 'jestProjectNames.mjs')); diff --git a/tasks/components/publishRoslynCopilot.ts b/tasks/components/publishRoslynCopilot.ts index 37f9169698..9b2f79461c 100644 --- a/tasks/components/publishRoslynCopilot.ts +++ b/tasks/components/publishRoslynCopilot.ts @@ -14,9 +14,9 @@ import { createPullRequest, doesBranchExist, findPRByTitle, -} from '../gitTasks'; -import { updatePackageDependencies } from '../../src/tools/updatePackageDependencies'; -import { runTask } from '../runTask'; +} from '../gitTasks.js'; +import { updatePackageDependencies } from '../../src/tools/updatePackageDependencies.js'; +import { runTask } from '../runTask.js'; type Options = { userName?: string; diff --git a/tasks/debugger/fixLocUrls.ts b/tasks/debugger/fixLocUrls.ts index 05b93dc23a..ed6de78fbc 100644 --- a/tasks/debugger/fixLocUrls.ts +++ b/tasks/debugger/fixLocUrls.ts @@ -5,7 +5,7 @@ import * as fs from 'fs'; import * as os from 'os'; -import { runTask } from '../runTask'; +import { runTask } from '../runTask.js'; runTask(fixLocUrls); diff --git a/tasks/debugger/generateOptionsSchema.ts b/tasks/debugger/generateOptionsSchema.ts index 82452807c5..ebd8e193d6 100644 --- a/tasks/debugger/generateOptionsSchema.ts +++ b/tasks/debugger/generateOptionsSchema.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as optionsSchemaGenerator from '../../src/tools/generateOptionsSchema'; -import { runTask } from '../runTask'; +import * as optionsSchemaGenerator from '../../src/tools/generateOptionsSchema.js'; +import { runTask } from '../runTask.js'; runTask(optionsSchemaGenerator.GenerateOptionsSchema); diff --git a/tasks/debugger/updatePackageDependencies.ts b/tasks/debugger/updatePackageDependencies.ts index 4b68bf66cb..ddd59149c6 100644 --- a/tasks/debugger/updatePackageDependencies.ts +++ b/tasks/debugger/updatePackageDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as packageDependencyUpdater from '../../src/tools/updatePackageDependencies'; -import { runTask } from '../runTask'; +import * as packageDependencyUpdater from '../../src/tools/updatePackageDependencies.js'; +import { runTask } from '../runTask.js'; runTask(packageDependencyUpdater.updatePackageDependencies); diff --git a/tasks/localization/publishLocalizationContent.ts b/tasks/localization/publishLocalizationContent.ts index 7939328368..451e0f2afc 100644 --- a/tasks/localization/publishLocalizationContent.ts +++ b/tasks/localization/publishLocalizationContent.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as util from 'node:util'; import { EOL } from 'node:os'; import { Octokit } from '@octokit/rest'; -import { runTask } from '../runTask'; +import { runTask } from '../runTask.js'; type Options = { userName?: string; diff --git a/tasks/packaging/installDependencies.ts b/tasks/packaging/installDependencies.ts index 0f1cf530bb..d8dbcd7764 100644 --- a/tasks/packaging/installDependencies.ts +++ b/tasks/packaging/installDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { installDependencies } from './offlinePackagingTasks'; -import { runTask } from '../runTask'; +import { installDependencies } from './offlinePackagingTasks.js'; +import { runTask } from '../runTask.js'; runTask(installDependencies); diff --git a/tasks/packaging/installDependenciesClean.ts b/tasks/packaging/installDependenciesClean.ts index cbb8b10d0f..c527149955 100644 --- a/tasks/packaging/installDependenciesClean.ts +++ b/tasks/packaging/installDependenciesClean.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { installDependencies } from './offlinePackagingTasks'; -import { runTask } from '../runTask'; +import { installDependencies } from './offlinePackagingTasks.js'; +import { runTask } from '../runTask.js'; runTask(async () => installDependencies(/* clean */ true)); diff --git a/tasks/packaging/offlinePackagingTasks.ts b/tasks/packaging/offlinePackagingTasks.ts index a310343959..e8e656f41f 100644 --- a/tasks/packaging/offlinePackagingTasks.ts +++ b/tasks/packaging/offlinePackagingTasks.ts @@ -5,16 +5,16 @@ import * as cp from 'child_process'; import * as fs from 'fs'; -import * as fsextra from 'fs-extra'; +import fsextra from 'fs-extra'; import * as nbgv from 'nerdbank-gitversioning'; -import { Logger } from '../../src/logger'; -import { PlatformInformation } from '../../src/shared/platform'; -import { CsharpLoggerObserver } from '../../src/shared/observers/csharpLoggerObserver'; -import { EventStream } from '../../src/eventStream'; -import NetworkSettings from '../../src/networkSettings'; -import { downloadAndInstallPackages } from '../../src/packageManager/downloadAndInstallPackages'; -import { getRuntimeDependenciesPackages } from '../../src/tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from '../../src/packageManager/getAbsolutePathPackagesToInstall'; +import { Logger } from '../../src/logger.js'; +import { PlatformInformation } from '../../src/shared/platform.js'; +import { CsharpLoggerObserver } from '../../src/shared/observers/csharpLoggerObserver.js'; +import { EventStream } from '../../src/eventStream.js'; +import NetworkSettings from '../../src/networkSettings.js'; +import { downloadAndInstallPackages } from '../../src/packageManager/downloadAndInstallPackages.js'; +import { getRuntimeDependenciesPackages } from '../../src/tools/runtimeDependencyPackageUtils.js'; +import { getAbsolutePathPackagesToInstall } from '../../src/packageManager/getAbsolutePathPackagesToInstall.js'; import { codeExtensionPath, packedVsixOutputRoot, @@ -24,10 +24,10 @@ import { devKitDependenciesDirectory, xamlToolsDirectory, testDiscoveryDirectory, -} from '../projectPaths'; -import { getPackageJSON } from '../packageJson'; -import { createPackageAsync, generateVsixManifest } from './vsceTasks'; -import { isValidDownload } from '../../src/packageManager/isValidDownload'; +} from '../projectPaths.js'; +import { getPackageJSON } from '../packageJson.js'; +import { createPackageAsync, generateVsixManifest } from './vsceTasks.js'; +import { isValidDownload } from '../../src/packageManager/isValidDownload.js'; import path from 'path'; import { CancellationToken } from 'vscode'; diff --git a/tasks/packaging/updateRoslynVersion.ts b/tasks/packaging/updateRoslynVersion.ts index 78177d2fc2..c257cc5efa 100644 --- a/tasks/packaging/updateRoslynVersion.ts +++ b/tasks/packaging/updateRoslynVersion.ts @@ -8,9 +8,9 @@ import { allNugetPackages, installDependencies, updateNugetPackageVersion, -} from './offlinePackagingTasks'; -import { runTask } from '../runTask'; -import { getPackageJSON } from '../packageJson'; +} from './offlinePackagingTasks.js'; +import { runTask } from '../runTask.js'; +import { getPackageJSON } from '../packageJson.js'; runTask(updateRoslynVersion); diff --git a/tasks/packaging/vsceTasks.ts b/tasks/packaging/vsceTasks.ts index 787212fff5..529833da0e 100644 --- a/tasks/packaging/vsceTasks.ts +++ b/tasks/packaging/vsceTasks.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import * as util from '../../src/common'; +import * as util from '../../src/common.js'; import * as fs from 'fs'; -import spawnNode from '../spawnNode'; -import { vscePath } from '../projectPaths'; +import spawnNode from '../spawnNode.js'; +import { vscePath } from '../projectPaths.js'; /// Packaging (VSIX) Tasks export async function createPackageAsync( diff --git a/tasks/packaging/vsixReleasePackage.ts b/tasks/packaging/vsixReleasePackage.ts index 17e238f6de..206558f124 100644 --- a/tasks/packaging/vsixReleasePackage.ts +++ b/tasks/packaging/vsixReleasePackage.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import minimist from 'minimist'; -import { vsixReleasePackageTask } from './offlinePackagingTasks'; -import { runTask } from '../runTask'; +import { vsixReleasePackageTask } from './offlinePackagingTasks.js'; +import { runTask } from '../runTask.js'; const argv = minimist(process.argv.slice(2)); runTask(async () => await vsixReleasePackageTask(!!argv.prerelease)); diff --git a/tasks/profiling/profiling.ts b/tasks/profiling/profiling.ts index f6ccaea6d1..2ee995438d 100644 --- a/tasks/profiling/profiling.ts +++ b/tasks/profiling/profiling.ts @@ -5,10 +5,10 @@ import fs from 'fs'; import * as path from 'path'; -import { basicSlnTestProject, runIntegrationTest } from '../tests/testHelpers'; -import { outPath } from '../projectPaths'; +import { basicSlnTestProject, runIntegrationTest } from '../tests/testHelpers.js'; +import { outPath } from '../projectPaths.js'; import { execSync } from 'child_process'; -import { runTask } from '../runTask'; +import { runTask } from '../runTask.js'; const profilingOutputFolder = path.join(outPath, 'profiling'); diff --git a/tasks/projectPaths.ts b/tasks/projectPaths.ts index 0972ed0bf4..599f632270 100644 --- a/tasks/projectPaths.ts +++ b/tasks/projectPaths.ts @@ -4,10 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import { commandLineOptions } from './commandLineArguments'; -import { componentInfo } from '../src/lsptoolshost/extensions/builtInComponents'; +import { fileURLToPath } from 'url'; +import { commandLineOptions } from './commandLineArguments.js'; +import { componentInfo } from '../src/lsptoolshost/extensions/builtInComponents.js'; -export const rootPath = path.resolve(__dirname, '..'); +export const rootPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); const nodeModulesPath = path.join(rootPath, 'node_modules'); export const vscePath = path.join(nodeModulesPath, '@vscode', 'vsce', 'vsce'); diff --git a/tasks/signing/installSignPlugin.ts b/tasks/signing/installSignPlugin.ts index 3a3ad49344..ee9b5d2da1 100644 --- a/tasks/signing/installSignPlugin.ts +++ b/tasks/signing/installSignPlugin.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths'; -import { execDotnet } from './signingTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.js'; +import { execDotnet } from './signingTasks.js'; +import { runTask } from '../runTask.js'; runTask(installSignPlugin); diff --git a/tasks/signing/signJs.ts b/tasks/signing/signJs.ts index 91bc89969a..9e2cdcabe2 100644 --- a/tasks/signing/signJs.ts +++ b/tasks/signing/signJs.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths'; -import { execDotnet, getLogPath } from './signingTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.js'; +import { execDotnet, getLogPath } from './signingTasks.js'; +import { runTask } from '../runTask.js'; runTask(signJs); diff --git a/tasks/signing/signVsix.ts b/tasks/signing/signVsix.ts index e38c05dd10..c47e5abf1a 100644 --- a/tasks/signing/signVsix.ts +++ b/tasks/signing/signVsix.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths'; -import { execDotnet, getLogPath } from './signingTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.js'; +import { execDotnet, getLogPath } from './signingTasks.js'; +import { runTask } from '../runTask.js'; runTask(signVsix); diff --git a/tasks/signing/signingTasks.ts b/tasks/signing/signingTasks.ts index 19db4aaff3..b528203875 100644 --- a/tasks/signing/signingTasks.ts +++ b/tasks/signing/signingTasks.ts @@ -5,7 +5,7 @@ import * as cp from 'child_process'; import * as fs from 'fs'; -import { rootPath } from '../projectPaths'; +import { rootPath } from '../projectPaths.js'; import path from 'path'; export function getLogPath(): string { diff --git a/tasks/signing/verifyVsix.ts b/tasks/signing/verifyVsix.ts index d5eab1f3cf..969e298bad 100644 --- a/tasks/signing/verifyVsix.ts +++ b/tasks/signing/verifyVsix.ts @@ -5,8 +5,8 @@ import * as fs from 'fs'; import path from 'path'; -import { verifySignature } from '../packaging/vsceTasks'; -import { runTask } from '../runTask'; +import { verifySignature } from '../packaging/vsceTasks.js'; +import { runTask } from '../runTask.js'; runTask(verifyVsix); diff --git a/tasks/snap/incrementVersion.ts b/tasks/snap/incrementVersion.ts index 0489adf690..33ec17399b 100644 --- a/tasks/snap/incrementVersion.ts +++ b/tasks/snap/incrementVersion.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import minimist from 'minimist'; -import { addChangelogSection, getNextReleaseVersion, readVersionJson, writeVersionJson } from './snapTasks'; -import { runTask } from '../runTask'; +import { addChangelogSection, getNextReleaseVersion, readVersionJson, writeVersionJson } from './snapTasks.js'; +import { runTask } from '../runTask.js'; runTask(incrementVersion); diff --git a/tasks/snap/snapTasks.ts b/tasks/snap/snapTasks.ts index d7c3e3a7f0..9109627b69 100644 --- a/tasks/snap/snapTasks.ts +++ b/tasks/snap/snapTasks.ts @@ -6,7 +6,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; -import { rootPath } from '../projectPaths'; +import { rootPath } from '../projectPaths.js'; /** * Calculate the next release (stable) version from the current version. diff --git a/tasks/snap/updateChangelog.ts b/tasks/snap/updateChangelog.ts index dd8f23f25c..f073a329e4 100644 --- a/tasks/snap/updateChangelog.ts +++ b/tasks/snap/updateChangelog.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import * as os from 'os'; import { exec } from 'child_process'; import { promisify } from 'util'; -import { rootPath } from '../projectPaths'; -import { findTagsByVersion } from '../gitTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.js'; +import { findTagsByVersion } from '../gitTasks.js'; +import { runTask } from '../runTask.js'; const execAsync = promisify(exec); const prRegex = /^\*.+\(PR: \[#(\d+)\]\(/; diff --git a/tasks/snap/updateVersionForStableRelease.ts b/tasks/snap/updateVersionForStableRelease.ts index 461d9df58f..77a06af766 100644 --- a/tasks/snap/updateVersionForStableRelease.ts +++ b/tasks/snap/updateVersionForStableRelease.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { readVersionJson, getNextReleaseVersion, writeVersionJson, addChangelogSection } from './snapTasks'; -import { runTask } from '../runTask'; +import { readVersionJson, getNextReleaseVersion, writeVersionJson, addChangelogSection } from './snapTasks.js'; +import { runTask } from '../runTask.js'; runTask(updateVersionForStableRelease); diff --git a/tasks/spawnNode.ts b/tasks/spawnNode.ts index 5ea1987308..7602cb2639 100644 --- a/tasks/spawnNode.ts +++ b/tasks/spawnNode.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { spawnSync, SpawnSyncOptions } from 'child_process'; -import { nodePath, rootPath } from './projectPaths'; +import { nodePath, rootPath } from './projectPaths.js'; export default async function spawnNode(args?: string[], options?: SpawnSyncOptions) { if (!options) { diff --git a/tasks/tags/createTags.ts b/tasks/tags/createTags.ts index 8b010cd5d8..4d2d065ce2 100644 --- a/tasks/tags/createTags.ts +++ b/tasks/tags/createTags.ts @@ -7,11 +7,11 @@ import * as fs from 'fs'; import { spawnSync } from 'child_process'; import minimist from 'minimist'; import { Octokit } from '@octokit/rest'; -import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from '../packaging/offlinePackagingTasks'; -import { PlatformInformation } from '../../src/shared/platform'; +import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from '../packaging/offlinePackagingTasks.js'; +import { PlatformInformation } from '../../src/shared/platform.js'; import path from 'path'; -import { runTask } from '../runTask'; -import { rootPath } from '../projectPaths'; +import { runTask } from '../runTask.js'; +import { rootPath } from '../projectPaths.js'; runTask(createTags); diff --git a/tasks/tests/omnisharptest.ts b/tasks/tests/omnisharptest.ts index f7cfcf0422..cf15c52256 100644 --- a/tasks/tests/omnisharptest.ts +++ b/tasks/tests/omnisharptest.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestIntegration, omnisharpTestUnit } from './omnisharptestTasks'; -import { runTask } from '../runTask'; +import { omnisharpTestIntegration, omnisharpTestUnit } from './omnisharptestTasks.js'; +import { runTask } from '../runTask.js'; runTask(omnisharpTest); diff --git a/tasks/tests/omnisharptestIntegration.ts b/tasks/tests/omnisharptestIntegration.ts index 5a537d7528..49d6691af1 100644 --- a/tasks/tests/omnisharptestIntegration.ts +++ b/tasks/tests/omnisharptestIntegration.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestIntegration } from './omnisharptestTasks'; -import { runTask } from '../runTask'; +import { omnisharpTestIntegration } from './omnisharptestTasks.js'; +import { runTask } from '../runTask.js'; runTask(omnisharpTestIntegration); diff --git a/tasks/tests/omnisharptestTasks.ts b/tasks/tests/omnisharptestTasks.ts index c47670eef0..eb7f3c63da 100644 --- a/tasks/tests/omnisharptestTasks.ts +++ b/tasks/tests/omnisharptestTasks.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { codeExtensionPath, rootPath } from '../projectPaths'; -import { runJestIntegrationTest, runJestTest } from './testHelpers'; +import { codeExtensionPath, rootPath } from '../projectPaths.js'; +import { runJestIntegrationTest, runJestTest } from './testHelpers.js'; import { jestProjectNames } from '../../test/jestProjectNames.mjs'; const omnisharpIntegrationTestProjects = ['singleCsproj', 'slnWithCsproj', 'slnFilterWithCsproj', 'BasicRazorApp2_1']; diff --git a/tasks/tests/omnisharptestUnit.ts b/tasks/tests/omnisharptestUnit.ts index 49dc4d9f37..b7ff3f27bf 100644 --- a/tasks/tests/omnisharptestUnit.ts +++ b/tasks/tests/omnisharptestUnit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestUnit } from './omnisharptestTasks'; -import { runTask } from '../runTask'; +import { omnisharpTestUnit } from './omnisharptestTasks.js'; +import { runTask } from '../runTask.js'; runTask(omnisharpTestUnit); diff --git a/tasks/tests/test.ts b/tasks/tests/test.ts index 3491d03160..4dec2231a2 100644 --- a/tasks/tests/test.ts +++ b/tasks/tests/test.ts @@ -10,8 +10,8 @@ import { testIntegrationRazorCohost, testIntegrationUntrusted, testUnit, -} from './testTasks'; -import { runTask } from '../runTask'; +} from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(test); diff --git a/tasks/tests/testArtifacts.ts b/tasks/tests/testArtifacts.ts index 0612f2625d..78121bd66b 100644 --- a/tasks/tests/testArtifacts.ts +++ b/tasks/tests/testArtifacts.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testArtifacts } from './testTasks'; -import { runTask } from '../runTask'; +import { testArtifacts } from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(testArtifacts); diff --git a/tasks/tests/testHelpers.ts b/tasks/tests/testHelpers.ts index 2dcb9cf272..d5d29eae98 100644 --- a/tasks/tests/testHelpers.ts +++ b/tasks/tests/testHelpers.ts @@ -5,10 +5,10 @@ import fs from 'fs'; import * as path from 'path'; -import * as jest from 'jest'; +import jest from 'jest'; import { Config } from '@jest/types'; -import { rootPath, outPath } from '../projectPaths'; -import { prepareVSCodeAndExecuteTests } from '../../test/vscodeLauncher'; +import { rootPath, outPath } from '../projectPaths.js'; +import { prepareVSCodeAndExecuteTests } from '../../test/vscodeLauncher.js'; export const basicSlnTestProject = 'slnWithCsproj'; export const integrationTestProjects = [basicSlnTestProject]; @@ -107,7 +107,7 @@ export async function runJestIntegrationTest( throw new Error(`Could not find vscode workspace to open at ${workspacePath}`); } - // The runner (that loads in the vscode process to run tests) is in the test folder in the *output* directory. + // The ESM loader requires the explicit runner file rather than its containing directory. const vscodeRunnerPath = path.join(outPath, testFolderName, 'index.js'); if (!fs.existsSync(vscodeRunnerPath)) { throw new Error(`Could not find vscode runner in out/ at ${vscodeRunnerPath}`); diff --git a/tasks/tests/testIntegrationCsharp.ts b/tasks/tests/testIntegrationCsharp.ts index 249988b14e..75009e32e7 100644 --- a/tasks/tests/testIntegrationCsharp.ts +++ b/tasks/tests/testIntegrationCsharp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationCSharp } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationCSharp } from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(testIntegrationCSharp); diff --git a/tasks/tests/testIntegrationDevkit.ts b/tasks/tests/testIntegrationDevkit.ts index c47c15560f..b4a52f3c35 100644 --- a/tasks/tests/testIntegrationDevkit.ts +++ b/tasks/tests/testIntegrationDevkit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationDevkit } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationDevkit } from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(testIntegrationDevkit); diff --git a/tasks/tests/testIntegrationRazorCohost.ts b/tasks/tests/testIntegrationRazorCohost.ts index fa3585734b..35d984ecdc 100644 --- a/tasks/tests/testIntegrationRazorCohost.ts +++ b/tasks/tests/testIntegrationRazorCohost.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationRazorCohost } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationRazorCohost } from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(testIntegrationRazorCohost); diff --git a/tasks/tests/testIntegrationUntrusted.ts b/tasks/tests/testIntegrationUntrusted.ts index d17e7baaa4..8c76ac147a 100644 --- a/tasks/tests/testIntegrationUntrusted.ts +++ b/tasks/tests/testIntegrationUntrusted.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationUntrusted } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationUntrusted } from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(testIntegrationUntrusted); diff --git a/tasks/tests/testTasks.ts b/tasks/tests/testTasks.ts index 2525958b18..e8ae2851fc 100644 --- a/tasks/tests/testTasks.ts +++ b/tasks/tests/testTasks.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { integrationTestProjects, runDevKitIntegrationTests, runIntegrationTest, runJestTest } from './testHelpers'; +import { integrationTestProjects, runDevKitIntegrationTests, runIntegrationTest, runJestTest } from './testHelpers.js'; import { jestProjectNames } from '../../test/jestProjectNames.mjs'; const razorIntegrationTestProjects = ['RazorApp']; diff --git a/tasks/tests/testUnit.ts b/tasks/tests/testUnit.ts index a1a25d13e2..f110925178 100644 --- a/tasks/tests/testUnit.ts +++ b/tasks/tests/testUnit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testUnit } from './testTasks'; -import { runTask } from '../runTask'; +import { testUnit } from './testTasks.js'; +import { runTask } from '../runTask.js'; runTask(testUnit); diff --git a/test/createTmpAsset.ts b/test/createTmpAsset.ts index b37a477248..0e0777161a 100644 --- a/test/createTmpAsset.ts +++ b/test/createTmpAsset.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as tmp from 'tmp'; -import { remove } from 'fs-extra'; -import { NestedError } from '../src/nestedError'; +import fsExtra from 'fs-extra'; +import { NestedError } from '../src/nestedError.js'; export async function CreateTmpFile(): Promise { const tmpFile = await new Promise((resolve, reject) => { @@ -43,7 +43,7 @@ export async function CreateTmpDir(unsafeCleanup: boolean): Promise { name: tmpDir.name, dispose: () => { if (unsafeCleanup) { - remove(tmpDir.name).catch((rejectReason) => { + fsExtra.remove(tmpDir.name).catch((rejectReason) => { throw new Error(`Failed to cleanup ${tmpDir.name} at ${tmpDir.fd}: ${rejectReason}`); }); //to delete directories that have folders inside them } else { diff --git a/test/fakes.ts b/test/fakes.ts index da06b10f41..e993d6d95a 100644 --- a/test/fakes.ts +++ b/test/fakes.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../src/vscodeAdapter'; -import * as protocol from '../src/omnisharp/protocol'; -import { ITelemetryReporter } from '../src/shared/telemetryReporter'; +import * as vscode from '../src/vscodeAdapter.js'; +import * as protocol from '../src/omnisharp/protocol.js'; +import { ITelemetryReporter } from '../src/shared/telemetryReporter.js'; import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnError, OmnisharpServerUnresolvedDependencies, WorkspaceInformationUpdated, -} from '../src/omnisharp/omnisharpLoggingEvents'; +} from '../src/omnisharp/omnisharpLoggingEvents.js'; export const getNullChannel = (): vscode.OutputChannel => { const returnChannel: vscode.OutputChannel = { diff --git a/test/lsptoolshost/artifactTests/vsix.test.ts b/test/lsptoolshost/artifactTests/vsix.test.ts index 6491ee692c..f84c1b4736 100644 --- a/test/lsptoolshost/artifactTests/vsix.test.ts +++ b/test/lsptoolshost/artifactTests/vsix.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import * as fs from 'fs-extra'; -import * as glob from 'glob'; +import fs from 'fs-extra'; +import glob from 'glob'; import * as path from 'path'; const vsixFiles = glob.sync(path.join(process.cwd(), '**', '*.vsix')); diff --git a/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts index 7d49a91670..6fbd033bf4 100644 --- a/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts @@ -5,12 +5,12 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeAll, afterAll, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { AnalysisSetting, BuildDiagnosticsService, -} from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; -import * as integrationHelpers from './integrationHelpers'; +} from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.js'; +import * as integrationHelpers from './integrationHelpers.js'; import path from 'path'; describe(`Build and live diagnostics dedupe`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/classification.integration.test.ts b/test/lsptoolshost/integrationTests/classification.integration.test.ts index eeb454debd..c679d6b73b 100644 --- a/test/lsptoolshost/integrationTests/classification.integration.test.ts +++ b/test/lsptoolshost/integrationTests/classification.integration.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Classification Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/codeactions.integration.test.ts b/test/lsptoolshost/integrationTests/codeactions.integration.test.ts index e4b0c90bb5..2c617dc3fe 100644 --- a/test/lsptoolshost/integrationTests/codeactions.integration.test.ts +++ b/test/lsptoolshost/integrationTests/codeactions.integration.test.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.js'; describe(`Code Actions Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/codelens.integration.test.ts b/test/lsptoolshost/integrationTests/codelens.integration.test.ts index 7af16faa2c..fac8d9eb04 100644 --- a/test/lsptoolshost/integrationTests/codelens.integration.test.ts +++ b/test/lsptoolshost/integrationTests/codelens.integration.test.ts @@ -7,13 +7,13 @@ import * as lsp from 'vscode-languageclient'; import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, getCodeLensesAsync, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.js'; describe(`CodeLens Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts b/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts index c84d995fb1..57116234e9 100644 --- a/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts +++ b/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts @@ -5,14 +5,14 @@ import { expect, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, testIfCSharp, testIfDevKit } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { activateCSharpExtension, testIfCSharp, testIfDevKit } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { RoslynDevKitCommands, RoslynStandaloneCommands, UnexpectedRoslynDevKitCommands, UnexpectedRoslynStandaloneCommands, -} from './expectedCommands'; +} from './expectedCommands.js'; describe(`Command Enablement Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/completion.integration.test.ts b/test/lsptoolshost/integrationTests/completion.integration.test.ts index 4924a9a99a..eb5a2d2d6b 100644 --- a/test/lsptoolshost/integrationTests/completion.integration.test.ts +++ b/test/lsptoolshost/integrationTests/completion.integration.test.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, getCompletionsAsync, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.js'; describe(`Completion Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts b/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts index fbf6f2fae7..59d9fbbdf7 100644 --- a/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts +++ b/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { expect } from '@jest/globals'; -import { restartLanguageServer, waitForExpectedResult } from './integrationHelpers'; +import { restartLanguageServer, waitForExpectedResult } from './integrationHelpers.js'; function sortDiagnostics(diagnostics: vscode.Diagnostic[]): vscode.Diagnostic[] { return diagnostics.sort((a, b) => { diff --git a/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts index 149d6e6b5b..a5514e38a1 100644 --- a/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts @@ -5,16 +5,16 @@ import * as vscode from 'vscode'; import { describe, test, beforeAll, afterAll, expect, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.js'; import path from 'path'; -import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers'; +import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers.js'; import { activateCSharpExtension, closeAllEditorsAsync, describeIfCSharp, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.js'; // Restarting the server is required for these tests, but not supported with C# Dev Kit. describeIfCSharp(`Document Diagnostics Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts b/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts index bfe1022cd5..abf3444329 100644 --- a/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts +++ b/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll, describe, afterEach, beforeEach } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; describe(`Document Symbol Tests`, () => { let fileUri: vscode.Uri; diff --git a/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts b/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts index 362118b3c6..648df303c3 100644 --- a/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts +++ b/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -15,9 +15,9 @@ import { waitForAllAsyncOperationsAsync, waitForExpectedResult, describeIfFileBasedPrograms, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; +import { CSharpExtensionExports } from '../../../src/csharpExtensionExports.js'; describeIfFileBasedPrograms(`File-based Programs Tests`, () => { let exports: CSharpExtensionExports; diff --git a/test/lsptoolshost/integrationTests/formatting.integration.test.ts b/test/lsptoolshost/integrationTests/formatting.integration.test.ts index 8549717ec6..f6ab3c33a0 100644 --- a/test/lsptoolshost/integrationTests/formatting.integration.test.ts +++ b/test/lsptoolshost/integrationTests/formatting.integration.test.ts @@ -5,15 +5,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { describe, beforeEach, afterAll, test, afterEach } from '@jest/globals'; -import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers'; +import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers.js'; describe(`Formatting Tests`, () => { beforeEach(async () => { diff --git a/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts b/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts index 67452574e1..bb010bcdee 100644 --- a/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts +++ b/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts @@ -5,15 +5,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, afterEach } from '@jest/globals'; -import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers'; +import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers.js'; describe(`Formatting With EditorConfig Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts b/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts index 6de7304141..4fd27e58a3 100644 --- a/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts +++ b/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -14,7 +14,7 @@ import { openFileInWorkspaceAsync, testIfCSharp, testIfDevKit, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; /** diff --git a/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts b/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts index f62d694932..5239f5f40c 100644 --- a/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts +++ b/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, sortLocations, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Go To Implementation Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/hover.integration.test.ts b/test/lsptoolshost/integrationTests/hover.integration.test.ts index ff9a3a3182..1cf29f5488 100644 --- a/test/lsptoolshost/integrationTests/hover.integration.test.ts +++ b/test/lsptoolshost/integrationTests/hover.integration.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { EOL } from 'os'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Hover Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/index.ts b/test/lsptoolshost/integrationTests/index.ts index 2c6aaf1426..d989f4a934 100644 --- a/test/lsptoolshost/integrationTests/index.ts +++ b/test/lsptoolshost/integrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests'; +import { runIntegrationTests } from '../../runIntegrationTests.js'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/lsptoolshost/integrationTests/integrationHelpers.ts b/test/lsptoolshost/integrationTests/integrationHelpers.ts index 4f87296490..a3ac5a1b6e 100644 --- a/test/lsptoolshost/integrationTests/integrationHelpers.ts +++ b/test/lsptoolshost/integrationTests/integrationHelpers.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import * as semver from 'semver'; -import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; +import { CSharpExtensionExports } from '../../../src/csharpExtensionExports.js'; import { existsSync } from 'fs'; -import { ServerState } from '../../../src/lsptoolshost/server/languageServerEvents'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { ServerState } from '../../../src/lsptoolshost/server/languageServerEvents.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { EOL, platform } from 'os'; import { describe, expect, test } from '@jest/globals'; -import { WaitForAsyncOperationsRequest } from './testHooks'; +import { WaitForAsyncOperationsRequest } from './testHooks.js'; export async function activateCSharpExtension(): Promise { const csharpExtension = vscode.extensions.getExtension('ms-dotnettools.csharp'); diff --git a/test/lsptoolshost/integrationTests/jest.config.mjs b/test/lsptoolshost/integrationTests/jest.config.mjs index 1c0eb4ac11..73e4ef1f6d 100644 --- a/test/lsptoolshost/integrationTests/jest.config.mjs +++ b/test/lsptoolshost/integrationTests/jest.config.mjs @@ -2,7 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { baseProjectConfig } from '../../../baseJestConfig.mjs'; +import { baseIntegrationProjectConfig } from '../../../baseJestConfig.mjs'; import { jestProjectNames } from '../../jestProjectNames.mjs'; /** @@ -10,7 +10,7 @@ import { jestProjectNames } from '../../jestProjectNames.mjs'; */ /** @type {import('jest').Config} */ const integrationTestConfig = { - ...baseProjectConfig, + ...baseIntegrationProjectConfig, displayName: jestProjectNames.integration, roots: [''], testEnvironment: '/../../vsCodeEnvironment.ts', diff --git a/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts b/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts index 678023f11f..872c299c6a 100644 --- a/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts +++ b/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { describe, beforeAll, afterAll, test, expect, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import * as integrationHelpers from './integrationHelpers.js'; import { InlayHint, InlayHintKind, Position } from 'vscode-languageclient'; describe(`Inlay Hints Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts b/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts index 59717573af..0bc0d55acc 100644 --- a/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts +++ b/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts @@ -5,14 +5,14 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, revertActiveFile, waitForExpectedResult, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; import { EOL } from 'os'; diff --git a/test/lsptoolshost/integrationTests/references.integration.test.ts b/test/lsptoolshost/integrationTests/references.integration.test.ts index f17706c7eb..2bd9e64c44 100644 --- a/test/lsptoolshost/integrationTests/references.integration.test.ts +++ b/test/lsptoolshost/integrationTests/references.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, sortLocations, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Find References Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts b/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts index 92d0f41117..82463204a1 100644 --- a/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts +++ b/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Signature Help Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts b/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts index 3acd32e37e..28709a1c8a 100644 --- a/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts +++ b/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -13,7 +13,7 @@ import { openFileInWorkspaceAsync, sleep, sortLocations, -} from './integrationHelpers'; +} from './integrationHelpers.js'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach, describe } from '@jest/globals'; describe(`Source Generator Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/testAssets/razorApp.ts b/test/lsptoolshost/integrationTests/testAssets/razorApp.ts index 7692d29fe8..03ca6bbcba 100644 --- a/test/lsptoolshost/integrationTests/testAssets/razorApp.ts +++ b/test/lsptoolshost/integrationTests/testAssets/razorApp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.js'; const workspace: ITestAssetWorkspace = { description: 'Razor App', diff --git a/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts index f53fabdbaf..986aa4d9ee 100644 --- a/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.js'; const workspace: ITestAssetWorkspace = { description: 'single csproj at root of workspace', diff --git a/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts index 6e9d9ba449..f4f162b5ef 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.js'; const workspace: ITestAssetWorkspace = { description: "sln filter with a csproj's", diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts index 4973fface7..499dab6864 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.js'; const workspace: ITestAssetWorkspace = { description: "sln with several csproj's", diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts b/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts index 79a221f780..4f8134bb21 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.js'; const workspace: ITestAssetWorkspace = { description: 'sln with a source generator', diff --git a/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts b/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts index 842ab375ce..450590f01f 100644 --- a/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts +++ b/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts @@ -6,13 +6,13 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { ITestAssetWorkspace, TestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace, TestAssetWorkspace } from './testAssets.js'; -import singleCsproj from './singleCsproj'; -import slnWithCsproj from './slnWithCsproj'; -import slnFilterWithCsproj from './slnFilterWithCsproj'; -import RazorApp from './razorApp'; -import slnWithGenerator from './slnWithGenerator'; +import singleCsproj from './singleCsproj.js'; +import slnWithCsproj from './slnWithCsproj.js'; +import slnFilterWithCsproj from './slnFilterWithCsproj.js'; +import RazorApp from './razorApp.js'; +import slnWithGenerator from './slnWithGenerator.js'; const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { singleCsproj, diff --git a/test/lsptoolshost/integrationTests/testAssets/testAssets.ts b/test/lsptoolshost/integrationTests/testAssets/testAssets.ts index 9c01476336..80a36a405a 100644 --- a/test/lsptoolshost/integrationTests/testAssets/testAssets.ts +++ b/test/lsptoolshost/integrationTests/testAssets/testAssets.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; -import spawnGit from './spawnGit'; -import { execChildProcess } from '../../../../src/common'; +import spawnGit from './spawnGit.js'; +import { execChildProcess } from '../../../../src/common.js'; export class TestAssetProject { constructor(project: ITestAssetProject) { diff --git a/test/lsptoolshost/integrationTests/unitTests.integration.test.ts b/test/lsptoolshost/integrationTests/unitTests.integration.test.ts index 8753a65607..7cea14c89d 100644 --- a/test/lsptoolshost/integrationTests/unitTests.integration.test.ts +++ b/test/lsptoolshost/integrationTests/unitTests.integration.test.ts @@ -6,15 +6,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; import { activateCSharpExtension, closeAllEditorsAsync, describeIfCSharp, getCodeLensesAsync, openFileInWorkspaceAsync, -} from './integrationHelpers'; -import { TestProgress } from '../../../src/lsptoolshost/server/roslynProtocol'; +} from './integrationHelpers.js'; +import { TestProgress } from '../../../src/lsptoolshost/server/roslynProtocol.js'; describeIfCSharp(`Unit Testing Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts index 50388aa0b7..f42287c2c4 100644 --- a/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeAll, afterAll } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; -import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers'; -import { activateCSharpExtension, describeIfCSharp } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.js'; +import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers.js'; +import { activateCSharpExtension, describeIfCSharp } from './integrationHelpers.js'; // Restarting the server is required for these tests, but not supported with C# Dev Kit. describeIfCSharp(`Workspace Diagnostic Tests`, () => { diff --git a/test/lsptoolshost/unitTests/captureActivityLogs.test.ts b/test/lsptoolshost/unitTests/captureActivityLogs.test.ts index 1cf040f954..752d6ca63e 100644 --- a/test/lsptoolshost/unitTests/captureActivityLogs.test.ts +++ b/test/lsptoolshost/unitTests/captureActivityLogs.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { LogObserver } from '../../../src/lsptoolshost/logging/observableLogOutputChannel'; +import { LogObserver } from '../../../src/lsptoolshost/logging/observableLogOutputChannel.js'; describe('captureActivityLogs', () => { describe('LogObserver', () => { diff --git a/test/lsptoolshost/unitTests/configurationMiddleware.test.ts b/test/lsptoolshost/unitTests/configurationMiddleware.test.ts index 759d8bc46f..6d50e310aa 100644 --- a/test/lsptoolshost/unitTests/configurationMiddleware.test.ts +++ b/test/lsptoolshost/unitTests/configurationMiddleware.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { readFileSync } from 'fs'; -import { convertServerOptionNameToClientConfigurationName } from '../../../src/lsptoolshost/options/optionNameConverter'; +import { convertServerOptionNameToClientConfigurationName } from '../../../src/lsptoolshost/options/optionNameConverter.js'; import { describe, test, expect } from '@jest/globals'; const editorBehaviorSection = 1; diff --git a/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts b/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts index 722765e2c3..5c6bf47a8c 100644 --- a/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts +++ b/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getNullChannel } from '../../fakes'; -import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver'; +import { getNullChannel } from '../../fakes.js'; +import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver.js'; import { InstallationFailure, BaseEvent, @@ -13,7 +13,7 @@ import { IntegrityCheckFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, -} from '../../../src/shared/loggingEvents'; +} from '../../../src/shared/loggingEvents.js'; describe('CsharpChannelObserver', () => { [ diff --git a/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts b/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts index f757ab824f..b4fe0c7cf0 100644 --- a/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts +++ b/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../fakes'; -import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver'; -import { PlatformInformation } from '../../../src/shared/platform'; -import { PackageError } from '../../../src/packageManager/packageError'; -import { Package } from '../../../src/packageManager/package'; -import * as Event from '../../../src/shared/loggingEvents'; +import { getNullChannel } from '../../fakes.js'; +import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver.js'; +import { PlatformInformation } from '../../../src/shared/platform.js'; +import { PackageError } from '../../../src/packageManager/packageError.js'; +import { Package } from '../../../src/packageManager/package.js'; +import * as Event from '../../../src/shared/loggingEvents.js'; describe('CsharpLoggerObserver', () => { let logOutput = ''; diff --git a/test/lsptoolshost/unitTests/jest.config.mjs b/test/lsptoolshost/unitTests/jest.config.mjs index 5d7c8a0065..253a897d67 100644 --- a/test/lsptoolshost/unitTests/jest.config.mjs +++ b/test/lsptoolshost/unitTests/jest.config.mjs @@ -12,6 +12,7 @@ import { jestProjectNames } from '../../jestProjectNames.mjs'; const unitTestConfig = { ...baseProjectConfig, displayName: jestProjectNames.unit, + setupFilesAfterEnv: ['/../../vsCodeUnitFramework.ts'], // We need to explicity ignore the out directory for modules - otherwise we'll get duplicate vscode module, // the TS version from the __mocks__ directory and the compiled js version from the out directory. modulePathIgnorePatterns: ['out'], diff --git a/test/lsptoolshost/unitTests/json.test.ts b/test/lsptoolshost/unitTests/json.test.ts index d0a4acf4f4..96b5541525 100644 --- a/test/lsptoolshost/unitTests/json.test.ts +++ b/test/lsptoolshost/unitTests/json.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { tolerantParse } from '../../../src/json'; +import { tolerantParse } from '../../../src/json.js'; import { describe, test, expect } from '@jest/globals'; describe('JSON', () => { diff --git a/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts b/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts index 0e439e4ddb..09d144b80f 100644 --- a/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts +++ b/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts @@ -5,11 +5,11 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { registerLanguageServerOptionChanges } from '../../../src/lsptoolshost/options/optionChanges'; +import { registerLanguageServerOptionChanges } from '../../../src/lsptoolshost/options/optionChanges.js'; import { describe, beforeEach, test, expect } from '@jest/globals'; import * as vscode from 'vscode'; -import { getVSCodeWithConfig, updateConfig } from '../../fakes'; +import { getVSCodeWithConfig, updateConfig } from '../../fakes.js'; describe('Option changes observer', () => { let doClickOk: () => void; diff --git a/test/lsptoolshost/unitTests/migrateOptions.test.ts b/test/lsptoolshost/unitTests/migrateOptions.test.ts index f1f4ecaf28..6ee821e8db 100644 --- a/test/lsptoolshost/unitTests/migrateOptions.test.ts +++ b/test/lsptoolshost/unitTests/migrateOptions.test.ts @@ -3,23 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; -import { - dotnetAcquisitionExtensionOption, - dotnetPathOption, - IDotnetAcquisitionExistingPaths, - MigrateOptions, - migrateOptions, -} from '../../../src/shared/migrateOptions'; +import { IDotnetAcquisitionExistingPaths } from '../../../src/shared/migrateOptions.js'; import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { getVSCodeWithConfig } from '../../fakes'; -import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId'; -import { ConfigurationTarget } from '../../../src/vscodeAdapter'; - -// Necessary when spying on module members. -jest.mock('fs', () => ({ __esModule: true, ...(jest.requireActual('fs')) })); +import { getVSCodeWithConfig } from '../../fakes.js'; +import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId.js'; +import { ConfigurationTarget } from '../../../src/vscodeAdapter.js'; + +const mockExistsSync = jest.fn(); +jest.unstable_mockModule('fs', async () => ({ + ...(await import('node:fs')), + existsSync: mockExistsSync, +})); +const fs = await import('fs'); +const { dotnetAcquisitionExtensionOption, dotnetPathOption, MigrateOptions, migrateOptions } = + await import('../../../src/shared/migrateOptions.js'); describe('Migrate configurations', () => { const packageJson = JSON.parse(fs.readFileSync('package.json').toString()); @@ -36,7 +35,7 @@ describe('Migrate configurations', () => { const validDotnetPath = path.join(validDotnetFolder, `dotnet${process.platform === 'win32' ? '.exe' : ''}`); beforeEach(() => { - jest.spyOn(fs, 'existsSync').mockImplementation((path) => { + mockExistsSync.mockImplementation((path) => { if (path.toString().endsWith(validDotnetPath)) { return true; } diff --git a/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts b/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts index 1dd4262ba9..1203e691a6 100644 --- a/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts +++ b/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts @@ -5,11 +5,11 @@ import { describe, expect, jest, test } from '@jest/globals'; -jest.mock('vscode-languageclient/node', () => ({ +jest.unstable_mockModule('vscode-languageclient/node', () => ({ LanguageClient: class {}, State: { Running: 2 }, })); -jest.mock('vscode-languageclient', () => ({ +jest.unstable_mockModule('vscode-languageclient', () => ({ MessageDirection: { clientToServer: 1, serverToClient: 2, @@ -18,10 +18,11 @@ jest.mock('vscode-languageclient', () => ({ ProtocolRequestType: class {}, RequestType: class {}, RequestType0: class {}, + State: { Running: 2 }, })); -import { RoslynLanguageClient } from '../../../src/lsptoolshost/server/roslynLanguageClient'; -import { TelemetryEventNames } from '../../../src/shared/telemetryEventNames'; +const { RoslynLanguageClient } = await import('../../../src/lsptoolshost/server/roslynLanguageClient.js'); +const { TelemetryEventNames } = await import('../../../src/shared/telemetryEventNames.js'); describe('RoslynLanguageClient', () => { test('shows one crash notification and emits one telemetry event per crash', () => { diff --git a/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts index 86bebe0516..7c65e168ec 100644 --- a/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts @@ -6,10 +6,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as path from 'path'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider'; +import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider.js'; function setLimit(to: number | null) { const csharpConfig = vscode.workspace.getConfiguration('csharp'); diff --git a/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts index 5c305b12d3..c58d8eee29 100644 --- a/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts @@ -5,11 +5,11 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; import * as path from 'path'; -import { assertWithPoll } from './poll'; -import { isNotNull } from '../testUtil'; +import { assertWithPoll } from './poll.js'; +import { isNotNull } from '../testUtil.js'; describe.skip(`Code Action Rename ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts index 548f0d99d0..031a00e49d 100644 --- a/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts @@ -6,9 +6,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfSlnWithCsProj, describeIfNotGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { isNotNull } from '../testUtil'; +import { activateCSharpExtension, describeIfSlnWithCsProj, describeIfNotGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { isNotNull } from '../testUtil.js'; describeIfNotGenerator(`CodeLensProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts index a00e85774b..1a6c8eb6b2 100644 --- a/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { expect, test, beforeAll, afterAll } from '@jest/globals'; -import OmniSharpCompletionProvider from '../../../src/omnisharp/features/completionProvider'; +import OmniSharpCompletionProvider from '../../../src/omnisharp/features/completionProvider.js'; import * as vscode from 'vscode'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; describeIfNotRazorOrGenerator(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts index 62bf7013fb..70161eedb8 100644 --- a/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts @@ -5,10 +5,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.js'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { + activateCSharpExtension, + describeIfNotRazorOrGenerator, + restartOmniSharpServer, +} from './integrationHelpers.js'; describeIfNotRazorOrGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts index b3808099e0..313c492cfb 100644 --- a/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts @@ -14,10 +14,10 @@ import { isRazorWorkspace, isSlnWithGenerator, restartOmniSharpServer, -} from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { poll, assertWithPoll, pollDoesNotHappen } from './poll'; -import { isNotNull } from '../testUtil'; +} from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { poll, assertWithPoll, pollDoesNotHappen } from './poll.js'; +import { isNotNull } from '../testUtil.js'; async function setDiagnosticWorkspaceLimit(to: number | null) { const csharpConfig = vscode.workspace.getConfiguration('csharp'); diff --git a/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts index eb8ebf9ac4..5cd386b30e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; describeIfNotRazorOrGenerator(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts index df49d08ee0..8e95cdbd7f 100644 --- a/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts @@ -6,7 +6,7 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; const onTypeFormatProviderCommand = 'vscode.executeFormatOnTypeProvider'; diff --git a/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts index 73a5b17246..c01384b053 100644 --- a/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts @@ -6,13 +6,13 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfSlnWithCsProj } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/shared/eventType'; -import { OmnisharpRequestMessage } from '../../../src/omnisharp/omnisharpLoggingEvents'; -import { V2 } from '../../../src/omnisharp/protocol'; -import { isNotNull } from '../testUtil'; +import { activateCSharpExtension, describeIfSlnWithCsProj } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { EventStream } from '../../../src/eventStream.js'; +import { EventType } from '../../../src/shared/eventType.js'; +import { OmnisharpRequestMessage } from '../../../src/omnisharp/omnisharpLoggingEvents.js'; +import { V2 } from '../../../src/omnisharp/protocol.js'; +import { isNotNull } from '../testUtil.js'; // These tests only run on the slnWithCsproj solution describeIfSlnWithCsProj(`DotnetTest: ${testAssetWorkspace.description}`, function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts index 798038385d..27f31b0f75 100644 --- a/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; export type Test = 'a' | 'b' | ['c', any]; diff --git a/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts index bcb39a937d..35a930281b 100644 --- a/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts @@ -5,10 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpImplementationProvider from '../../../src/omnisharp/features/implementationProvider'; +import OmniSharpImplementationProvider from '../../../src/omnisharp/features/implementationProvider.js'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; describeIfNotRazorOrGenerator(`${OmniSharpImplementationProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/index.ts b/test/omnisharp/omnisharpIntegrationTests/index.ts index 0abf1e29a0..67ebf31a6e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/index.ts +++ b/test/omnisharp/omnisharpIntegrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests'; +import { runIntegrationTests } from '../../runIntegrationTests.js'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts index b8bce4c45e..cc5e433138 100644 --- a/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts @@ -5,11 +5,15 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { + activateCSharpExtension, + describeIfNotRazorOrGenerator, + restartOmniSharpServer, +} from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; import * as path from 'path'; -import { InlayHint, LinePositionSpanTextChange } from '../../../src/omnisharp/protocol'; -import { isNotNull } from '../testUtil'; +import { InlayHint, LinePositionSpanTextChange } from '../../../src/omnisharp/protocol.js'; +import { isNotNull } from '../testUtil.js'; describeIfNotRazorOrGenerator(`Inlay Hints ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts b/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts index 60ab788210..09765a3450 100644 --- a/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts +++ b/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts @@ -5,10 +5,10 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/shared/eventType'; -import { OmnisharpExtensionExports } from '../../../src/csharpExtensionExports'; +import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider.js'; +import { EventStream } from '../../../src/eventStream.js'; +import { EventType } from '../../../src/shared/eventType.js'; +import { OmnisharpExtensionExports } from '../../../src/csharpExtensionExports.js'; import { describe } from '@jest/globals'; export interface ActivationResult { diff --git a/test/omnisharp/omnisharpIntegrationTests/jest.config.mjs b/test/omnisharp/omnisharpIntegrationTests/jest.config.mjs index bcfc9b3725..0d9cf7ba47 100644 --- a/test/omnisharp/omnisharpIntegrationTests/jest.config.mjs +++ b/test/omnisharp/omnisharpIntegrationTests/jest.config.mjs @@ -2,7 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { baseProjectConfig } from '../../../baseJestConfig.mjs'; +import { baseIntegrationProjectConfig } from '../../../baseJestConfig.mjs'; import { jestProjectNames } from '../../jestProjectNames.mjs'; /** @@ -10,7 +10,7 @@ import { jestProjectNames } from '../../jestProjectNames.mjs'; */ /** @type {import('jest').Config} */ const integrationTestConfig = { - ...baseProjectConfig, + ...baseIntegrationProjectConfig, displayName: jestProjectNames.omnisharpIntegration, roots: [''], testEnvironment: '/../../vsCodeEnvironment.ts', diff --git a/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts index b802e7b4f5..d1611a7aa6 100644 --- a/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts @@ -6,9 +6,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../../src/omnisharp/languageMiddlewareFeature'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../../src/omnisharp/languageMiddlewareFeature.js'; describeIfNotRazorOrGenerator(`${LanguageMiddlewareFeature.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts index b37b45204b..f669d9b466 100644 --- a/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { describe, expect, test, beforeAll, afterAll } from '@jest/globals'; -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { poll } from './poll'; -import { isNotNull } from '../testUtil'; +import { activateCSharpExtension } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { poll } from './poll.js'; +import { isNotNull } from '../testUtil.js'; // Consistently failing in CI: https://github.com/OmniSharp/omnisharp-vscode/issues/4646 describe.skip(`Tasks generation: ${testAssetWorkspace.description}`, function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts b/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts index 72ee28e512..cf5507dd9e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts @@ -10,8 +10,8 @@ import { resourcesToLaunchTargets, vsls, vslsTarget, -} from '../../../src/omnisharp/launcher'; -import { LaunchTargetKind } from '../../../src/shared/launchTarget'; +} from '../../../src/omnisharp/launcher.js'; +import { LaunchTargetKind } from '../../../src/shared/launchTarget.js'; describe(`launcher:`, () => { const workspaceFolders: vscode.WorkspaceFolder[] = [{ uri: vscode.Uri.parse('/'), name: 'root', index: 0 }]; diff --git a/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts index f3d567ee51..5c864af431 100644 --- a/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts @@ -5,9 +5,12 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { OmniSharpCommands, UnexpectedOmniSharpCommands } from '../../lsptoolshost/integrationTests/expectedCommands'; +import { activateCSharpExtension } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { + OmniSharpCommands, + UnexpectedOmniSharpCommands, +} from '../../lsptoolshost/integrationTests/expectedCommands.js'; describe(`Command Enablement: ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts b/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts index 22c7e749e3..1f33ae5842 100644 --- a/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { ParsedEnvironmentFile } from '../../../src/coreclrDebug/parsedEnvironmentFile'; +import { ParsedEnvironmentFile } from '../../../src/coreclrDebug/parsedEnvironmentFile.js'; describe('ParsedEnvironmentFile', () => { test('Add single variable', () => { diff --git a/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts index 5cb9752252..5d8df2fc4b 100644 --- a/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts @@ -6,14 +6,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { poll, assertWithPoll } from './poll'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/shared/eventType'; -import { BaseEvent } from '../../../src/shared/loggingEvents'; -import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/omnisharpLoggingEvents'; -import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { poll, assertWithPoll } from './poll.js'; +import { EventStream } from '../../../src/eventStream.js'; +import { EventType } from '../../../src/shared/eventType.js'; +import { BaseEvent } from '../../../src/shared/loggingEvents.js'; +import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/omnisharpLoggingEvents.js'; +import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol.js'; function listenEvents(stream: EventStream, type: EventType): T[] { const results: T[] = []; diff --git a/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts index 4d76051903..3f315bbc05 100644 --- a/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts @@ -5,10 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpReferenceProvider from '../../../src/omnisharp/features/referenceProvider'; +import OmniSharpReferenceProvider from '../../../src/omnisharp/features/referenceProvider.js'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; describeIfNotRazorOrGenerator(`${OmniSharpReferenceProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts index d629b6e614..3c4f1a75cf 100644 --- a/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; interface ExpectedToken { startLine: number; diff --git a/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts index a1b56ab7a6..5421ebc213 100644 --- a/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; describeIfNotRazorOrGenerator(`SignatureHelp: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts index 3edbc9f4f1..01f2d7fa30 100644 --- a/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts @@ -6,10 +6,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; -import { activateCSharpExtension, describeIfGenerator, restartOmniSharpServer } from './integrationHelpers'; -import { assertWithPoll, sleep } from './poll'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.js'; +import { activateCSharpExtension, describeIfGenerator, restartOmniSharpServer } from './integrationHelpers.js'; +import { assertWithPoll, sleep } from './poll.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; describeIfGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts b/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts index 458734000d..cf6f828639 100644 --- a/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts +++ b/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts @@ -6,14 +6,14 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { ITestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; +import { ITestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets.js'; -import singleCsproj from '../../../lsptoolshost/integrationTests/testAssets/singleCsproj'; -import slnWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnWithCsproj'; -import slnFilterWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj'; -import BasicRazorApp2_1 from '../../../lsptoolshost/integrationTests/testAssets/razorApp'; -import slnWithGenerator from '../../../lsptoolshost/integrationTests/testAssets/slnWithGenerator'; -import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace'; +import singleCsproj from '../../../lsptoolshost/integrationTests/testAssets/singleCsproj.js'; +import slnWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnWithCsproj.js'; +import slnFilterWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.js'; +import BasicRazorApp2_1 from '../../../lsptoolshost/integrationTests/testAssets/razorApp.js'; +import slnWithGenerator from '../../../lsptoolshost/integrationTests/testAssets/slnWithGenerator.js'; +import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace.js'; const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { singleCsproj, diff --git a/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts b/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts index e98b279d7f..395756ba93 100644 --- a/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts +++ b/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts @@ -4,12 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { EventStream } from '../../../../src/eventStream'; -import { EventType } from '../../../../src/shared/eventType'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; -import { poll } from '../poll'; -import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; -import { ActivationResult } from '../integrationHelpers'; +import { EventStream } from '../../../../src/eventStream.js'; +import { EventType } from '../../../../src/shared/eventType.js'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; +import { poll } from '../poll.js'; +import { + ITestAssetWorkspace, + TestAssetWorkspace, +} from '../../../lsptoolshost/integrationTests/testAssets/testAssets.js'; +import { ActivationResult } from '../integrationHelpers.js'; export class OmnisharpTestAssetWorkspace extends TestAssetWorkspace { constructor(workspace: ITestAssetWorkspace) { diff --git a/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts index 724d66df2e..aaa9f888ab 100644 --- a/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts @@ -5,10 +5,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.js'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { + activateCSharpExtension, + describeIfNotRazorOrGenerator, + restartOmniSharpServer, +} from './integrationHelpers.js'; describeIfNotRazorOrGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts index cceb330ad8..50c079fc69 100644 --- a/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts @@ -5,9 +5,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotGenerator, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { IDisposable } from '../../../src/disposable'; +import { activateCSharpExtension, describeIfNotGenerator, isSlnWithGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { IDisposable } from '../../../src/disposable.js'; describeIfNotGenerator(`Virtual Document Tracking ${testAssetWorkspace.description}`, function () { const virtualScheme = 'virtual'; diff --git a/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts index 7f6dff7cf5..fe3e4c4a9e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts @@ -5,8 +5,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; describeIfNotRazorOrGenerator(`WorkspaceSymbolProvider: ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts b/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts index b1c5baf8f2..f2d5091882 100644 --- a/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts +++ b/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { AbsolutePath } from '../../../src/packageManager/absolutePath'; -import { TmpAsset, CreateTmpFile } from '../../createTmpAsset'; +import { AbsolutePath } from '../../../src/packageManager/absolutePath.js'; +import { TmpAsset, CreateTmpFile } from '../../createTmpAsset.js'; import { join } from 'path'; describe(AbsolutePath.name, () => { diff --git a/test/omnisharp/omnisharpUnitTests/assets.test.ts b/test/omnisharp/omnisharpUnitTests/assets.test.ts index 3f4781c98d..f4db76de93 100644 --- a/test/omnisharp/omnisharpUnitTests/assets.test.ts +++ b/test/omnisharp/omnisharpUnitTests/assets.test.ts @@ -14,11 +14,11 @@ import { ProgramLaunchType, replaceCommentPropertiesWithComments, updateJsonWithComments, -} from '../../../src/shared/assets'; +} from '../../../src/shared/assets.js'; import { parse } from 'jsonc-parser'; -import { ProjectDebugInformation } from '../../../src/shared/IWorkspaceDebugInformationProvider'; -import { findNetCoreTargetFramework } from '../../../src/shared/utils'; -import { isNotNull } from '../testUtil'; +import { ProjectDebugInformation } from '../../../src/shared/IWorkspaceDebugInformationProvider.js'; +import { findNetCoreTargetFramework } from '../../../src/shared/utils.js'; +import { isNotNull } from '../testUtil.js'; describe('Asset generation: csproj', () => { test('Create tasks.json for project opened in workspace', () => { diff --git a/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts b/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts index ee52091eac..6bed8b0074 100644 --- a/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts +++ b/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts @@ -4,10 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as path from 'path'; -import { CreateTmpDir, TmpAsset } from '../../createTmpAsset'; -import { isBlazorWebAssemblyHostedServer, isBlazorWebAssemblyProject, isWebProject } from '../../../src/shared/utils'; +import { CreateTmpDir, TmpAsset } from '../../createTmpAsset.js'; +import { + isBlazorWebAssemblyHostedServer, + isBlazorWebAssemblyProject, + isWebProject, +} from '../../../src/shared/utils.js'; const webSdkCsproj = ` diff --git a/test/omnisharp/omnisharpUnitTests/common.test.ts b/test/omnisharp/omnisharpUnitTests/common.test.ts index 9d454e1e35..ee79d5f123 100644 --- a/test/omnisharp/omnisharpUnitTests/common.test.ts +++ b/test/omnisharp/omnisharpUnitTests/common.test.ts @@ -6,7 +6,7 @@ import { describe, test, expect } from '@jest/globals'; import * as path from 'path'; -import { isSubfolderOf, safeLength, sum } from '../../../src/common'; +import { isSubfolderOf, safeLength, sum } from '../../../src/common.js'; describe('Common', () => { describe('safeLength', () => { diff --git a/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts b/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts index ad12001afb..25bc174c56 100644 --- a/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts +++ b/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getTargetArchitecture } from '../../../../src/coreclrDebug/util'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo'; +import { getTargetArchitecture } from '../../../../src/coreclrDebug/util.js'; +import { PlatformInformation } from '../../../../src/shared/platform.js'; +import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo.js'; describe('getTargetArchitecture Tests', () => { describe('Windows', () => { diff --git a/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts b/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts index d74aeb7599..67e3d14781 100644 --- a/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts +++ b/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver'; -import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation'; +import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver.js'; +import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation.js'; export const fakeMonoInfo: HostExecutableInformation = { version: 'someDotNetVersion', diff --git a/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts b/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts index 97c45f410b..743fc51658 100644 --- a/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts +++ b/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver'; -import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation'; +import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver.js'; +import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation.js'; export const fakeMonoInfo: HostExecutableInformation = { version: 'someMonoVersion', diff --git a/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts b/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts index c052d189ab..3bf6e35e86 100644 --- a/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts +++ b/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import reportIssue from '../../../../src/shared/reportIssue'; -import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver'; -import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver'; -import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo'; +import reportIssue from '../../../../src/shared/reportIssue.js'; +import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver.js'; +import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver.js'; +import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo.js'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; describe(`${reportIssue.name}`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts index d04aef9607..1ece9ca9fc 100644 --- a/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { InformationMessageObserver } from '../../../src/omnisharp/observers/informationMessageObserver'; -import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../fakes'; +import { InformationMessageObserver } from '../../../src/omnisharp/observers/informationMessageObserver.js'; +import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../fakes.js'; import { Subject, from as observableFrom } from 'rxjs'; import { timeout } from 'rxjs/operators'; diff --git a/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts b/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts index 0ce27b8f82..ab3aabd1bc 100644 --- a/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts +++ b/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { installRuntimeDependencies } from '../../../src/installRuntimeDependencies'; -import { IInstallDependencies } from '../../../src/packageManager/IInstallDependencies'; -import { EventStream } from '../../../src/eventStream'; -import { PlatformInformation } from '../../../src/shared/platform'; -import TestEventBus from './testAssets/testEventBus'; -import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage'; -import { Package } from '../../../src/packageManager/package'; -import { isNotNull } from '../testUtil'; +import { installRuntimeDependencies } from '../../../src/installRuntimeDependencies.js'; +import { IInstallDependencies } from '../../../src/packageManager/IInstallDependencies.js'; +import { EventStream } from '../../../src/eventStream.js'; +import { PlatformInformation } from '../../../src/shared/platform.js'; +import TestEventBus from './testAssets/testEventBus.js'; +import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage.js'; +import { Package } from '../../../src/packageManager/package.js'; +import { isNotNull } from '../testUtil.js'; describe(`${installRuntimeDependencies.name}`, () => { let packageJSON = { diff --git a/test/omnisharp/omnisharpUnitTests/jest.config.mjs b/test/omnisharp/omnisharpUnitTests/jest.config.mjs index f25bda44b6..bd56e7bbd7 100644 --- a/test/omnisharp/omnisharpUnitTests/jest.config.mjs +++ b/test/omnisharp/omnisharpUnitTests/jest.config.mjs @@ -12,6 +12,7 @@ import { jestProjectNames } from '../../jestProjectNames.mjs'; const omnisharpConfig = { ...baseProjectConfig, displayName: jestProjectNames.omnisharpUnit, + setupFilesAfterEnv: ['/../../vsCodeUnitFramework.ts'], // We need to explicity ignore the out directory for modules - otherwise we'll get duplicate vscode module, // the TS version from the __mocks__ directory and the compiled js version from the out directory. modulePathIgnorePatterns: ['out'], diff --git a/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts index 8d44d5f992..c878fcc085 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { StatusBarItem } from '../../../../src/vscodeAdapter'; -import { OmnisharpBackgroundDiagnosticStatus } from '../../../../src/omnisharp/omnisharpLoggingEvents'; -import { BackgroundWorkStatusBarObserver } from '../../../../src/omnisharp/observers/backgroundWorkStatusBarObserver'; -import { BackgroundDiagnosticStatus } from '../../../../src/omnisharp/protocol'; +import { StatusBarItem } from '../../../../src/vscodeAdapter.js'; +import { OmnisharpBackgroundDiagnosticStatus } from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +import { BackgroundWorkStatusBarObserver } from '../../../../src/omnisharp/observers/backgroundWorkStatusBarObserver.js'; +import { BackgroundDiagnosticStatus } from '../../../../src/omnisharp/protocol.js'; describe('BackgroundWorkStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts index 016bbb4f47..a6cb02f00c 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { DotNetChannelObserver } from '../../../../src/omnisharp/observers/dotnetChannelObserver'; -import { getNullChannel } from '../../../fakes'; -import { CommandDotNetRestoreStart } from '../../../../src/omnisharp/omnisharpLoggingEvents'; +import { DotNetChannelObserver } from '../../../../src/omnisharp/observers/dotnetChannelObserver.js'; +import { getNullChannel } from '../../../fakes.js'; +import { CommandDotNetRestoreStart } from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('DotnetChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts index 0e5eee3649..993bea334f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { DotnetLoggerObserver } from '../../../../src/omnisharp/observers/dotnetLoggerObserver'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents'; +import { getNullChannel } from '../../../fakes.js'; +import { DotnetLoggerObserver } from '../../../../src/omnisharp/observers/dotnetLoggerObserver.js'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents.js'; import { CommandDotNetRestoreFailed, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('DotnetLoggerObserver', () => { [ diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts index cb2c57dce1..f30ebfd65f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts @@ -4,16 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; -import DotnetTestChannelObserver from '../../../../src/omnisharp/observers/dotnetTestChannelObserver'; +import { getNullChannel } from '../../../fakes.js'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; +import DotnetTestChannelObserver from '../../../../src/omnisharp/observers/dotnetTestChannelObserver.js'; import { DotNetTestDebugStart, DotNetTestRunFailure, DotNetTestRunStart, DotNetTestsInClassDebugStart, DotNetTestsInClassRunStart, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('DotnetTestChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts index 4de7ae08c3..8c3300e4ad 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { EventWithMessage, BaseEvent } from '../../../../src/shared/loggingEvents'; -import DotNetTestLoggerObserver from '../../../../src/omnisharp/observers/dotnetTestLoggerObserver'; -import * as protocol from '../../../../src/omnisharp/protocol'; +import { getNullChannel } from '../../../fakes.js'; +import { EventWithMessage, BaseEvent } from '../../../../src/shared/loggingEvents.js'; +import DotNetTestLoggerObserver from '../../../../src/omnisharp/observers/dotnetTestLoggerObserver.js'; +import * as protocol from '../../../../src/omnisharp/protocol.js'; import { DotNetTestDebugComplete, DotNetTestDebugInContextStart, @@ -20,7 +20,7 @@ import { DotNetTestsInClassDebugStart, DotNetTestsInClassRunStart, ReportDotNetTestResults, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe(`${DotNetTestLoggerObserver.name}`, () => { let appendedMessage: string; diff --git a/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts index a9348339e0..132824a4f4 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { MessageItem, vscode } from '../../../../src/vscodeAdapter'; -import { ErrorMessageObserver } from '../../../../src/omnisharp/observers/errorMessageObserver'; -import { ZipError, EventWithMessage, IntegrityCheckFailure } from '../../../../src/shared/loggingEvents'; -import { getFakeVsCode } from '../../../fakes'; -import { DotNetTestDebugStartFailure, DotNetTestRunFailure } from '../../../../src/omnisharp/omnisharpLoggingEvents'; +import { MessageItem, vscode } from '../../../../src/vscodeAdapter.js'; +import { ErrorMessageObserver } from '../../../../src/omnisharp/observers/errorMessageObserver.js'; +import { ZipError, EventWithMessage, IntegrityCheckFailure } from '../../../../src/shared/loggingEvents.js'; +import { getFakeVsCode } from '../../../fakes.js'; +import { DotNetTestDebugStartFailure, DotNetTestRunFailure } from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('ErrorMessageObserver', () => { const vscode: vscode = getFakeVsCode(); diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts index 4a838a1e30..3b20de5127 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts @@ -5,16 +5,16 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel, getWorkspaceConfiguration } from '../../../fakes'; -import { OmnisharpChannelObserver } from '../../../../src/omnisharp/observers/omnisharpChannelObserver'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; +import { getNullChannel, getWorkspaceConfiguration } from '../../../fakes.js'; +import { OmnisharpChannelObserver } from '../../../../src/omnisharp/observers/omnisharpChannelObserver.js'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; import { Subject } from 'rxjs'; import { OmnisharpFailure, OmnisharpRestart, OmnisharpServerOnStdErr, ShowOmniSharpChannel, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('OmnisharpChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts index 09ffa8a098..4723241487 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents'; -import { OmnisharpDebugModeLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpDebugModeLoggerObserver'; +import { getNullChannel } from '../../../fakes.js'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents.js'; +import { OmnisharpDebugModeLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpDebugModeLoggerObserver.js'; import { OmnisharpEventPacketReceived, OmnisharpRequestMessage, @@ -15,7 +15,7 @@ import { OmnisharpServerProcessRequestStart, OmnisharpServerRequestCancelled, OmnisharpServerVerboseMessage, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('OmnisharpDebugModeLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts index 48c3c4725f..6605bea08d 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts @@ -2,9 +2,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getNullChannel } from '../../../fakes'; +import { getNullChannel } from '../../../fakes.js'; import { describe, test, expect, beforeEach } from '@jest/globals'; -import { OmnisharpLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpLoggerObserver'; +import { OmnisharpLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpLoggerObserver.js'; import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnStdErr, @@ -15,10 +15,10 @@ import { OmnisharpServerOnError, OmnisharpFailure, OmnisharpEventPacketReceived, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; import { OutputChannel } from 'vscode'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents'; +import { PlatformInformation } from '../../../../src/shared/platform.js'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents.js'; describe('OmnisharpLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts index 8bf0a4731b..52457b777f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { StatusBarItem } from '../../../../src/vscodeAdapter'; +import { StatusBarItem } from '../../../../src/vscodeAdapter.js'; import { DownloadStart, InstallationStart, DownloadProgress, BaseEvent, InstallationSuccess, -} from '../../../../src/shared/loggingEvents'; +} from '../../../../src/shared/loggingEvents.js'; import { OmnisharpOnBeforeServerInstall, OmnisharpOnBeforeServerStart, @@ -19,11 +19,11 @@ import { OmnisharpServerOnStart, OmnisharpServerOnStop, OmnisharpServerOnStdErr, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; import { OmnisharpStatusBarObserver, StatusBarColors, -} from '../../../../src/omnisharp/observers/omnisharpStatusBarObserver'; +} from '../../../../src/omnisharp/observers/omnisharpStatusBarObserver.js'; describe('OmnisharpStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts index dd5da182b6..d46c30105f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../fakes'; -import { StatusBarItem } from '../../../../src/vscodeAdapter'; -import { ProjectStatusBarObserver } from '../../../../src/omnisharp/observers/projectStatusBarObserver'; +import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../fakes.js'; +import { StatusBarItem } from '../../../../src/vscodeAdapter.js'; +import { ProjectStatusBarObserver } from '../../../../src/omnisharp/observers/projectStatusBarObserver.js'; import { OmnisharpOnMultipleLaunchTargets, OmnisharpServerOnStop, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('ProjectStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts index 9336ca79ac..f939f5adad 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { RazorLoggerObserver } from '../../../../src/omnisharp/observers/razorLoggerObserver'; +import { getNullChannel } from '../../../fakes.js'; +import { RazorLoggerObserver } from '../../../../src/omnisharp/observers/razorLoggerObserver.js'; import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist, RazorDevModeActive, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; describe('RazorLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts index 26b4bf3728..b34fce7baa 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { beforeEach, test, describe, expect } from '@jest/globals'; -import { TelemetryObserver } from '../../../../src/omnisharp/observers/telemetryObserver'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { PackageInstallation, InstallationFailure, InstallationSuccess } from '../../../../src/shared/loggingEvents'; +import { TelemetryObserver } from '../../../../src/omnisharp/observers/telemetryObserver.js'; +import { PlatformInformation } from '../../../../src/shared/platform.js'; +import { PackageInstallation, InstallationFailure, InstallationSuccess } from '../../../../src/shared/loggingEvents.js'; import { TestExecutionCountReport, TelemetryEventWithMeasures, @@ -15,11 +15,11 @@ import { TelemetryEvent, ProjectConfiguration, TelemetryErrorEvent, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; -import { getNullTelemetryReporter } from '../../../fakes'; -import { Package } from '../../../../src/packageManager/package'; -import { PackageError } from '../../../../src/packageManager/packageError'; -import { isNotNull } from '../../testUtil'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +import { getNullTelemetryReporter } from '../../../fakes.js'; +import { Package } from '../../../../src/packageManager/package.js'; +import { PackageError } from '../../../../src/packageManager/packageError.js'; +import { isNotNull } from '../../testUtil.js'; describe('TelemetryReporterObserver', () => { const platformInfo = new PlatformInformation('linux', 'architecture'); diff --git a/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts index 053c03a780..045b46e0ff 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { WarningMessageObserver } from '../../../../src/omnisharp/observers/warningMessageObserver'; +import { WarningMessageObserver } from '../../../../src/omnisharp/observers/warningMessageObserver.js'; import { getFakeVsCode, getMSBuildDiagnosticsMessage, getOmnisharpMSBuildProjectDiagnosticsEvent, getOmnisharpServerOnErrorEvent, -} from '../../../fakes'; -import { vscode } from '../../../../src/vscodeAdapter'; +} from '../../../fakes.js'; +import { vscode } from '../../../../src/vscodeAdapter.js'; import { TestScheduler } from 'rxjs/testing'; import { from as observableFrom, Subject } from 'rxjs'; import { timeout, map } from 'rxjs/operators'; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts index 3f6b21c324..aa062820f5 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { OmniSharpMonoResolver } from '../../../../src/omnisharp/omniSharpMonoResolver'; +import { OmniSharpMonoResolver } from '../../../../src/omnisharp/omniSharpMonoResolver.js'; import { join } from 'path'; -import { getWorkspaceConfiguration } from '../../../fakes'; +import { getWorkspaceConfiguration } from '../../../fakes.js'; describe(`${OmniSharpMonoResolver.name}`, () => { let getMonoCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts index 74d2b999f7..d501c86d28 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts @@ -4,16 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader'; -import NetworkSettings from '../../../src/networkSettings'; -import { EventStream } from '../../../src/eventStream'; -import { PlatformInformation } from '../../../src/shared/platform'; -import { CreateTmpDir, TmpAsset } from '../../createTmpAsset'; -import * as util from '../../../src/common'; +import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader.js'; +import NetworkSettings from '../../../src/networkSettings.js'; +import { EventStream } from '../../../src/eventStream.js'; +import { PlatformInformation } from '../../../src/shared/platform.js'; +import { CreateTmpDir, TmpAsset } from '../../createTmpAsset.js'; +import * as util from '../../../src/common.js'; import * as path from 'path'; -import MockHttpsServer from './testAssets/mockHttpsServer'; -import TestZip from './testAssets/testZip'; -import { createTestFile } from './testAssets/testFile'; +import MockHttpsServer from './testAssets/mockHttpsServer.js'; +import TestZip from './testAssets/testZip.js'; +import { createTestFile } from './testAssets/testFile.js'; import { PackageInstallation, LogPlatformInfo, @@ -24,10 +24,10 @@ import { InstallationStart, InstallationSuccess, PackageInstallStart, -} from '../../../src/shared/loggingEvents'; -import TestEventBus from './testAssets/testEventBus'; -import { testPackageJSON } from './testAssets/testAssets'; -import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator'; +} from '../../../src/shared/loggingEvents.js'; +import TestEventBus from './testAssets/testEventBus.js'; +import { testPackageJSON } from './testAssets/testAssets.js'; +import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator.js'; [true, false].forEach((useFramework) => { describe(`OmnisharpDownloader (useFramework: ${useFramework})`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts index 78f882771e..3555e2497d 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts @@ -4,19 +4,19 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { OmnisharpManager } from '../../../src/omnisharp/omnisharpManager'; -import MockHttpsServer from './testAssets/mockHttpsServer'; -import TestZip from './testAssets/testZip'; -import { createTestFile } from './testAssets/testFile'; -import { PlatformInformation } from '../../../src/shared/platform'; -import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader'; -import NetworkSettings from '../../../src/networkSettings'; -import { EventStream } from '../../../src/eventStream'; -import { testPackageJSON } from './testAssets/testAssets'; -import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../createTmpAsset'; +import { OmnisharpManager } from '../../../src/omnisharp/omnisharpManager.js'; +import MockHttpsServer from './testAssets/mockHttpsServer.js'; +import TestZip from './testAssets/testZip.js'; +import { createTestFile } from './testAssets/testFile.js'; +import { PlatformInformation } from '../../../src/shared/platform.js'; +import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader.js'; +import NetworkSettings from '../../../src/networkSettings.js'; +import { EventStream } from '../../../src/eventStream.js'; +import { testPackageJSON } from './testAssets/testAssets.js'; +import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../createTmpAsset.js'; import * as path from 'path'; -import * as util from '../../../src/common'; -import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator'; +import * as util from '../../../src/common.js'; +import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator.js'; describe(OmnisharpManager.name, () => { let server: MockHttpsServer; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts index 68425752c9..f902d89136 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts @@ -8,10 +8,10 @@ import { SetBinaryAndGetPackage, GetPackagesFromVersion, modernNetVersion, -} from '../../../src/omnisharp/omnisharpPackageCreator'; -import { Package } from '../../../src/packageManager/package'; -import { testPackageJSON } from './testAssets/testAssets'; -import { isNotNull } from '../testUtil'; +} from '../../../src/omnisharp/omnisharpPackageCreator.js'; +import { Package } from '../../../src/packageManager/package.js'; +import { testPackageJSON } from './testAssets/testAssets.js'; +import { isNotNull } from '../testUtil.js'; describe('GetOmnisharpPackage : Output package depends on the input package and other input parameters like serverUrl', () => { let serverUrl: string; diff --git a/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts b/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts index 29af13fbf2..f03db12e4d 100644 --- a/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts @@ -5,11 +5,11 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { registerOmnisharpOptionChanges } from '../../../src/omnisharp/omnisharpOptionChanges'; +import { registerOmnisharpOptionChanges } from '../../../src/omnisharp/omnisharpOptionChanges.js'; import { describe, beforeEach, test, expect } from '@jest/globals'; import * as vscode from 'vscode'; -import { getVSCodeWithConfig, updateConfig } from '../../fakes'; +import { getVSCodeWithConfig, updateConfig } from '../../fakes.js'; describe('OmniSharpConfigChangeObserver', () => { let doClickOk: () => void; diff --git a/test/omnisharp/omnisharpUnitTests/optionStream.test.ts b/test/omnisharp/omnisharpUnitTests/optionStream.test.ts index 6817977ef3..65d5f94ea4 100644 --- a/test/omnisharp/omnisharpUnitTests/optionStream.test.ts +++ b/test/omnisharp/omnisharpUnitTests/optionStream.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import { Observable } from 'rxjs'; -import createOptionStream from '../../../src/shared/observables/createOptionStream'; -import Disposable from '../../../src/disposable'; +import createOptionStream from '../../../src/shared/observables/createOptionStream.js'; +import Disposable from '../../../src/disposable.js'; describe('OptionStream', () => { let listenerFunction: Array<(e: vscode.ConfigurationChangeEvent) => any>; diff --git a/test/omnisharp/omnisharpUnitTests/options.test.ts b/test/omnisharp/omnisharpUnitTests/options.test.ts index e69d912fc4..47a95fe879 100644 --- a/test/omnisharp/omnisharpUnitTests/options.test.ts +++ b/test/omnisharp/omnisharpUnitTests/options.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import * as path from 'path'; -import { commonOptions, omnisharpOptions } from '../../../src/shared/options'; -import { getWorkspaceConfiguration } from '../../fakes'; +import { commonOptions, omnisharpOptions } from '../../../src/shared/options.js'; +import { getWorkspaceConfiguration } from '../../fakes.js'; describe('Options tests', () => { beforeEach(() => { diff --git a/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts b/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts index 9d8854a2bf..d9bea42f9f 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts @@ -5,12 +5,12 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import * as path from 'path'; -import * as util from '../../../../src/common'; -import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset'; -import TestZip from '../testAssets/testZip'; -import { downloadAndInstallPackages } from '../../../../src/packageManager/downloadAndInstallPackages'; -import NetworkSettings from '../../../../src/networkSettings'; -import { EventStream } from '../../../../src/eventStream'; +import * as util from '../../../../src/common.js'; +import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset.js'; +import TestZip from '../testAssets/testZip.js'; +import { downloadAndInstallPackages } from '../../../../src/packageManager/downloadAndInstallPackages.js'; +import NetworkSettings from '../../../../src/networkSettings.js'; +import { EventStream } from '../../../../src/eventStream.js'; import { DownloadStart, DownloadSizeObtained, @@ -21,13 +21,13 @@ import { IntegrityCheckFailure, DownloadFailure, InstallationFailure, -} from '../../../../src/shared/loggingEvents'; -import MockHttpsServer from '../testAssets/mockHttpsServer'; -import { createTestFile } from '../testAssets/testFile'; -import TestEventBus from '../testAssets/testEventBus'; -import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage'; -import { AbsolutePath } from '../../../../src/packageManager/absolutePath'; -import { DownloadValidator } from '../../../../src/packageManager/isValidDownload'; +} from '../../../../src/shared/loggingEvents.js'; +import MockHttpsServer from '../testAssets/mockHttpsServer.js'; +import { createTestFile } from '../testAssets/testFile.js'; +import TestEventBus from '../testAssets/testEventBus.js'; +import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage.js'; +import { AbsolutePath } from '../../../../src/packageManager/absolutePath.js'; +import { DownloadValidator } from '../../../../src/packageManager/isValidDownload.js'; describe(`${downloadAndInstallPackages.name}`, () => { let tmpInstallDir: TmpAsset; diff --git a/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts b/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts index 5775793899..b128f24cdf 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { EventStream } from '../../../../src/eventStream'; -import { DownloadFile } from '../../../../src/packageManager/fileDownloader'; -import NetworkSettings from '../../../../src/networkSettings'; +import { EventStream } from '../../../../src/eventStream.js'; +import { DownloadFile } from '../../../../src/packageManager/fileDownloader.js'; +import NetworkSettings from '../../../../src/networkSettings.js'; import { DownloadStart, DownloadSizeObtained, @@ -14,9 +14,9 @@ import { DownloadSuccess, DownloadFallBack, DownloadFailure, -} from '../../../../src/shared/loggingEvents'; -import MockHttpsServer from '../testAssets/mockHttpsServer'; -import TestEventBus from '../testAssets/testEventBus'; +} from '../../../../src/shared/loggingEvents.js'; +import MockHttpsServer from '../testAssets/mockHttpsServer.js'; +import TestEventBus from '../testAssets/testEventBus.js'; describe('FileDownloader', () => { const fileDescription = 'Test file'; diff --git a/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts b/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts index c53f7f1923..e6f2553c08 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { isValidDownload } from '../../../../src/packageManager/isValidDownload'; -import { EventStream } from '../../../../src/eventStream'; +import { isValidDownload } from '../../../../src/packageManager/isValidDownload.js'; +import { EventStream } from '../../../../src/eventStream.js'; describe(`${isValidDownload.name}`, () => { const sampleBuffer = Buffer.from('sampleBuffer'); diff --git a/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts b/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts index e3a5c29426..35a6ae86b7 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts @@ -3,19 +3,25 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { getNotInstalledPackagesForPlatform } from '../../../../src/packageManager/packageFilterer'; -import { Package } from '../../../../src/packageManager/package'; -import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage'; +import { Package } from '../../../../src/packageManager/package.js'; +import type { AbsolutePathPackage as AbsolutePathPackageType } from '../../../../src/packageManager/absolutePathPackage.js'; import { MockedFunction } from 'jest-mock'; -import * as fs from 'fs'; +import type * as fs from 'fs'; import { join } from 'path'; -// Necessary when spying on module members. -jest.mock('fs', () => ({ __esModule: true, ...(jest.requireActual('fs')) })); +const mockStat = jest.fn() as unknown as MockedFunction< + (path: fs.PathLike, callback: (err: NodeJS.ErrnoException | null, stats: fs.Stats | undefined) => void) => void +>; +jest.unstable_mockModule('fs', async () => ({ + ...(await import('node:fs')), + stat: mockStat, +})); +const { PlatformInformation } = await import('../../../../src/shared/platform.js'); +const { getNotInstalledPackagesForPlatform } = await import('../../../../src/packageManager/packageFilterer.js'); +const { AbsolutePathPackage } = await import('../../../../src/packageManager/absolutePathPackage.js'); describe(`${getNotInstalledPackagesForPlatform.name}`, () => { - let absolutePathPackages: AbsolutePathPackage[]; + let absolutePathPackages: AbsolutePathPackageType[]; const extensionPath = '/ExtensionPath'; const packages = [ { @@ -79,13 +85,7 @@ describe(`${getNotInstalledPackagesForPlatform.name}`, () => { absolutePathPackages = packages.map((pkg) => AbsolutePathPackage.getAbsolutePathPackage(pkg, extensionPath)); const installLockPath = join(absolutePathPackages[1].installPath.value, 'install.Lock'); //mock the install lock path so the package should be filtered - const statSpy = jest.spyOn(fs, 'stat') as unknown as MockedFunction< - ( - path: fs.PathLike, - callback: (err: NodeJS.ErrnoException | null, stats: fs.Stats | undefined) => void - ) => void - >; - statSpy.mockImplementation((path, callback) => { + mockStat.mockImplementation((path, callback) => { if (installLockPath === path) { callback(null, { isFile: () => true } as unknown as fs.Stats); } else { diff --git a/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts b/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts index 4badabccc1..746b4e3d40 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeAll, afterAll, beforeEach } from '@jest/globals'; -import { getProxyAgent } from '../../../../src/packageManager/proxy'; +import { getProxyAgent } from '../../../../src/packageManager/proxy.js'; import url from 'url'; describe(`${getProxyAgent.name}`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts b/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts index 6e9b8ab61d..3ff993f400 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts @@ -4,18 +4,18 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import * as path from 'path'; -import * as util from '../../../../src/common'; -import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset'; -import { InstallZip } from '../../../../src/packageManager/zipInstaller'; -import { EventStream } from '../../../../src/eventStream'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { BaseEvent, InstallationStart, ZipError } from '../../../../src/shared/loggingEvents'; -import { createTestFile } from '../testAssets/testFile'; -import TestZip from '../testAssets/testZip'; -import TestEventBus from '../testAssets/testEventBus'; -import { AbsolutePath } from '../../../../src/packageManager/absolutePath'; +import * as util from '../../../../src/common.js'; +import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset.js'; +import { InstallZip } from '../../../../src/packageManager/zipInstaller.js'; +import { EventStream } from '../../../../src/eventStream.js'; +import { PlatformInformation } from '../../../../src/shared/platform.js'; +import { BaseEvent, InstallationStart, ZipError } from '../../../../src/shared/loggingEvents.js'; +import { createTestFile } from '../testAssets/testFile.js'; +import TestZip from '../testAssets/testZip.js'; +import TestEventBus from '../testAssets/testEventBus.js'; +import { AbsolutePath } from '../../../../src/packageManager/absolutePath.js'; describe('ZipInstaller', () => { const binaries = [createTestFile('binary1', 'binary1.txt'), createTestFile('binary2', 'binary2.txt')]; diff --git a/test/omnisharp/omnisharpUnitTests/platform.test.ts b/test/omnisharp/omnisharpUnitTests/platform.test.ts index 4d332c22dd..f60fa77386 100644 --- a/test/omnisharp/omnisharpUnitTests/platform.test.ts +++ b/test/omnisharp/omnisharpUnitTests/platform.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { LinuxDistribution } from '../../../src/shared/platform'; +import { LinuxDistribution } from '../../../src/shared/platform.js'; describe('Platform', () => { test('Retrieve correct information for Ubuntu 14.04', () => { diff --git a/test/omnisharp/omnisharpUnitTests/processPicker.test.ts b/test/omnisharp/omnisharpUnitTests/processPicker.test.ts index 1f9f7f2381..8d89e665e5 100644 --- a/test/omnisharp/omnisharpUnitTests/processPicker.test.ts +++ b/test/omnisharp/omnisharpUnitTests/processPicker.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { RemoteAttachPicker, Process, CimProcessParser } from '../../../src/shared/processPicker'; +import { RemoteAttachPicker, Process, CimProcessParser } from '../../../src/shared/processPicker.js'; describe('Remote Process Picker: Validate quoting arguments.', () => { test('Argument with no spaces', () => { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts b/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts index 47a8db2c84..e863eb57ff 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ConfigurationChangeEvent } from '../../../../src/vscodeAdapter'; +import { ConfigurationChangeEvent } from '../../../../src/vscodeAdapter.js'; export function GetConfigChangeEvent(changingConfig: string): ConfigurationChangeEvent { return { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/mockHttpsServer.ts b/test/omnisharp/omnisharpUnitTests/testAssets/mockHttpsServer.ts index 3dafd8e9cb..92e8942e2c 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/mockHttpsServer.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/mockHttpsServer.ts @@ -3,11 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as fs from 'fs-extra'; +import fs from 'fs-extra'; import getPort from 'get-port'; +import { createRequire } from 'node:module'; -// There are no typings for this library. -// eslint-disable-next-line @typescript-eslint/no-var-requires +// mock-http-server is CommonJS-only and has no type declarations. +const require = createRequire(import.meta.url); const ServerMock = require('mock-http-server'); export default class MockHttpsServer { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts b/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts index 5370d02e07..84a07a0f8b 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventStream } from '../../../../src/eventStream'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; -import Disposable, { IDisposable } from '../../../../src/disposable'; +import { EventStream } from '../../../../src/eventStream.js'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; +import Disposable, { IDisposable } from '../../../../src/disposable.js'; export default class TestEventBus { private eventBus: Array; diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts b/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts index 45d109b9a0..7336d2d811 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import archiver from 'archiver'; -import { TestFile } from './testFile'; +import { TestFile } from './testFile.js'; export default class TestZip { constructor( diff --git a/test/omnisharp/runFeatureTests.ts b/test/omnisharp/runFeatureTests.ts index ac23047302..104d7a1ca3 100644 --- a/test/omnisharp/runFeatureTests.ts +++ b/test/omnisharp/runFeatureTests.ts @@ -4,17 +4,19 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; +import { fileURLToPath } from 'url'; import { runTests } from '@vscode/test-electron'; async function main() { try { + const currentDirectory = path.dirname(fileURLToPath(import.meta.url)); // The folder containing the Extension Manifest package.json // Passed to `--extensionDevelopmentPath` - const extensionDevelopmentPath = path.resolve(__dirname, '../../'); + const extensionDevelopmentPath = path.resolve(currentDirectory, '../../'); // The path to the extension test runner script // Passed to --extensionTestsPath - const extensionTestsPath = path.resolve(__dirname, './omnisharpFeatureTests/index'); + const extensionTestsPath = path.resolve(currentDirectory, './omnisharpFeatureTests/index'); // Download VS Code, unzip it and run the integration test const exitCode = await runTests({ diff --git a/test/razor/razorIntegrationTests/completion.integration.test.ts b/test/razor/razorIntegrationTests/completion.integration.test.ts index 76444b5011..a84b9bc0a0 100644 --- a/test/razor/razorIntegrationTests/completion.integration.test.ts +++ b/test/razor/razorIntegrationTests/completion.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; describe(`Razor Hover ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/formatting.integration.test.ts b/test/razor/razorIntegrationTests/formatting.integration.test.ts index 8f31b37e02..20ef8c1ced 100644 --- a/test/razor/razorIntegrationTests/formatting.integration.test.ts +++ b/test/razor/razorIntegrationTests/formatting.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; describe(`Razor Formatting ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/hover.integration.test.ts b/test/razor/razorIntegrationTests/hover.integration.test.ts index 1ef66f6fb6..dc91591e24 100644 --- a/test/razor/razorIntegrationTests/hover.integration.test.ts +++ b/test/razor/razorIntegrationTests/hover.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; describe(`Razor Hover ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/index.ts b/test/razor/razorIntegrationTests/index.ts index d09e2d3853..5cbd0a82c6 100644 --- a/test/razor/razorIntegrationTests/index.ts +++ b/test/razor/razorIntegrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests'; +import { runIntegrationTests } from '../../runIntegrationTests.js'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/razor/razorIntegrationTests/jest.config.mjs b/test/razor/razorIntegrationTests/jest.config.mjs index 4441b27616..c2e634c872 100644 --- a/test/razor/razorIntegrationTests/jest.config.mjs +++ b/test/razor/razorIntegrationTests/jest.config.mjs @@ -2,7 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { baseProjectConfig } from '../../../baseJestConfig.mjs'; +import { baseIntegrationProjectConfig } from '../../../baseJestConfig.mjs'; import { jestProjectNames } from '../../jestProjectNames.mjs'; /** @@ -10,7 +10,7 @@ import { jestProjectNames } from '../../jestProjectNames.mjs'; */ /** @type {import('jest').Config} */ const integrationTestConfig = { - ...baseProjectConfig, + ...baseIntegrationProjectConfig, displayName: jestProjectNames.razorIntegration, roots: [''], testEnvironment: '/../../vsCodeEnvironment.ts', diff --git a/test/razor/razorIntegrationTests/reference.integration.test.ts b/test/razor/razorIntegrationTests/reference.integration.test.ts index db16443eb2..0d0662129f 100644 --- a/test/razor/razorIntegrationTests/reference.integration.test.ts +++ b/test/razor/razorIntegrationTests/reference.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; describe(`Razor References ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/rename.integration.test.ts b/test/razor/razorIntegrationTests/rename.integration.test.ts index cfcf51c37f..849defa0c4 100644 --- a/test/razor/razorIntegrationTests/rename.integration.test.ts +++ b/test/razor/razorIntegrationTests/rename.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; describe(`Razor Rename ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts b/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts index 8fdef79f25..8a58807665 100644 --- a/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts +++ b/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts @@ -3,7 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; +import { + ITestAssetWorkspace, + TestAssetWorkspace, +} from '../../../lsptoolshost/integrationTests/testAssets/testAssets.js'; const workspace: ITestAssetWorkspace = { description: 'Basic Razor app', diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts index 6ddf2220ac..3500b7b9d8 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts index cff873f625..4975a3e71e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts index 5acec8d531..1cd31ea110 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts index 26671f7d54..86e7c12080 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts index f04db7eb76..a3d4e1fa50 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts index 0bda9a4f81..c8152a0ccc 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts index cc714c4dca..a1bb71ceeb 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts index 2b8722132f..9670c57c4b 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts index d800857605..a1aed89ce0 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts index 68e6c8342a..d3be90e515 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts index 37cb1d37dc..b2e2f8534f 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts index dff265a4ab..be5893e8d8 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts @@ -4,45 +4,45 @@ *--------------------------------------------------------------------------------------------*/ import { describe } from '@jest/globals'; -import { RunAddTagHelperDirectiveSuite } from './addTagHelperDirective'; -import { RunAttributeDirectiveSuite } from './attributeDirective'; -import { RunCodeBlockSuite } from './codeBlock'; -import { RunCodeDirectiveSuite } from './codeDirective'; -import { RunDoStatementSuite } from './doStatement'; -import { RunElsePartSuite } from './elsePart'; -import { RunExplicitExpressionInAttributeSuite } from './explicitExpressionInAttribute'; -import { RunExplicitExpressionSuite } from './explicitExpressions'; -import { RunForeachStatementSuite } from './foreachStatement'; -import { RunForStatementSuite } from './forStatement'; -import { RunFunctionsDirectiveSuite } from './functionsDirective'; -import { RunIfStatementSuite } from './ifStatement'; -import { RunImplementsDirectiveSuite } from './implementsDirective'; -import { RunImplicitExpressionInAttributeSuite } from './implicitExpressionInAttribute'; -import { RunImplicitExpressionSuite } from './implicitExpressions'; -import { RunInheritsDirectiveSuite } from './inheritsDirective'; -import { RunInjectDirectiveSuite } from './injectDirective'; -import { RunLayoutDirectiveSuite } from './layoutDirective'; -import { RunLockStatementSuite } from './lockStatement'; -import { RunModelDirectiveSuite } from './modelDirective'; -import { RunNamespaceDirectiveSuite } from './namespaceDirective'; -import { RunPageDirectiveSuite } from './pageDirective'; -import { RunRazorCommentSuite } from './razorComment'; -import { RunRazorTemplateSuite } from './razorTemplate'; -import { RunRemoveTagHelperDirectiveSuite } from './removeTagHelperDirective'; -import { RunScriptBlockSuite } from './scriptBlock'; -import { RunSectionDirectiveSuite } from './sectionDirective'; -import { RunStyleBlockSuite } from './styleBlock'; -import { RunSwitchStatementSuite } from './switchStatement'; -import { RunTagHelperPrefixDirectiveSuite } from './tagHelperPrefixDirective'; -import { RunTransitionsSuite } from './transitions'; -import { RunTryStatementSuite } from './tryStatement'; -import { RunUsingDirectiveSuite } from './usingDirective'; -import { RunUsingStatementSuite } from './usingStatement'; -import { RunWhileStatementSuite } from './whileStatement'; -import { RunRendermodeDirectiveSuite } from './rendermodeDirective'; -import { RunPreservewhitespaceDirectiveSuite } from './preservewhitespaceDirective'; -import { RunTypeparamDirectiveSuite } from './typeparamDirective'; -import { RunHTMLDynamicAttributeSuite } from './htmlDynamicAttribute'; +import { RunAddTagHelperDirectiveSuite } from './addTagHelperDirective.js'; +import { RunAttributeDirectiveSuite } from './attributeDirective.js'; +import { RunCodeBlockSuite } from './codeBlock.js'; +import { RunCodeDirectiveSuite } from './codeDirective.js'; +import { RunDoStatementSuite } from './doStatement.js'; +import { RunElsePartSuite } from './elsePart.js'; +import { RunExplicitExpressionInAttributeSuite } from './explicitExpressionInAttribute.js'; +import { RunExplicitExpressionSuite } from './explicitExpressions.js'; +import { RunForeachStatementSuite } from './foreachStatement.js'; +import { RunForStatementSuite } from './forStatement.js'; +import { RunFunctionsDirectiveSuite } from './functionsDirective.js'; +import { RunIfStatementSuite } from './ifStatement.js'; +import { RunImplementsDirectiveSuite } from './implementsDirective.js'; +import { RunImplicitExpressionInAttributeSuite } from './implicitExpressionInAttribute.js'; +import { RunImplicitExpressionSuite } from './implicitExpressions.js'; +import { RunInheritsDirectiveSuite } from './inheritsDirective.js'; +import { RunInjectDirectiveSuite } from './injectDirective.js'; +import { RunLayoutDirectiveSuite } from './layoutDirective.js'; +import { RunLockStatementSuite } from './lockStatement.js'; +import { RunModelDirectiveSuite } from './modelDirective.js'; +import { RunNamespaceDirectiveSuite } from './namespaceDirective.js'; +import { RunPageDirectiveSuite } from './pageDirective.js'; +import { RunRazorCommentSuite } from './razorComment.js'; +import { RunRazorTemplateSuite } from './razorTemplate.js'; +import { RunRemoveTagHelperDirectiveSuite } from './removeTagHelperDirective.js'; +import { RunScriptBlockSuite } from './scriptBlock.js'; +import { RunSectionDirectiveSuite } from './sectionDirective.js'; +import { RunStyleBlockSuite } from './styleBlock.js'; +import { RunSwitchStatementSuite } from './switchStatement.js'; +import { RunTagHelperPrefixDirectiveSuite } from './tagHelperPrefixDirective.js'; +import { RunTransitionsSuite } from './transitions.js'; +import { RunTryStatementSuite } from './tryStatement.js'; +import { RunUsingDirectiveSuite } from './usingDirective.js'; +import { RunUsingStatementSuite } from './usingStatement.js'; +import { RunWhileStatementSuite } from './whileStatement.js'; +import { RunRendermodeDirectiveSuite } from './rendermodeDirective.js'; +import { RunPreservewhitespaceDirectiveSuite } from './preservewhitespaceDirective.js'; +import { RunTypeparamDirectiveSuite } from './typeparamDirective.js'; +import { RunHTMLDynamicAttributeSuite } from './htmlDynamicAttribute.js'; // We bring together all test suites and wrap them in one here. The reason behind this is that // modules get reloaded per test suite and the vscode-textmate library doesn't support the way diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts index 3a86ebec48..f44c90567e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts index 0c46756f4c..b25d4288f8 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts index 7a14291168..3af2e46240 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts index 60a32935d4..7a2c7967d3 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts index 788a66cd49..c9322a764c 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts index 7e09070506..3e6b1206e1 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITokenizedContent } from './ITokenizedContent'; +import { ITokenizedContent } from './ITokenizedContent.js'; export function createSnapshot(tokenizedContent: ITokenizedContent): string { const snapshotLines: string[] = []; diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts index 36acf8d37b..48562bd167 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { expect } from '@jest/globals'; -import { createSnapshot } from './snapshotFactory'; -import { tokenize } from './tokenizedContentProvider'; +import { createSnapshot } from './snapshotFactory.js'; +import { tokenize } from './tokenizedContentProvider.js'; export async function assertMatchesSnapshot(content: string) { const tokenizedContent = await tokenize(content); diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts index c04117bcbc..9128f02448 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts @@ -5,14 +5,20 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as oniguruma from 'vscode-oniguruma'; -import { IGrammar, INITIAL, IRawGrammar, ITokenizeLineResult, parseRawGrammar, Registry } from 'vscode-textmate'; -import { ITokenizedContent } from './ITokenizedContent'; +import { fileURLToPath } from 'url'; +import oniguruma from 'vscode-oniguruma'; +import vscodeTextmate from 'vscode-textmate'; +import type { IGrammar, IRawGrammar, ITokenizeLineResult } from 'vscode-textmate'; +import { ITokenizedContent } from './ITokenizedContent.js'; +const { INITIAL, parseRawGrammar, Registry } = vscodeTextmate; let razorGrammarCache: IGrammar | undefined; const wasmBin = fs.readFileSync( - path.join(__dirname, '../../../../../../node_modules/vscode-oniguruma/release/onig.wasm') + path.join( + path.dirname(fileURLToPath(import.meta.url)), + '../../../../../../node_modules/vscode-oniguruma/release/onig.wasm' + ) ).buffer; const vscodeOnigurumaLib = oniguruma.loadWASM(wasmBin).then(() => { return { diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts index b3a29d0204..89e1ab94db 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts index 7dfbdcada2..63dc24606e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts index 0b1ae02425..2a0e6f0ee4 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts index c2c0542270..15eb4b95a4 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts index 6764132696..e39367d7e2 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts index 39f5c5cc4e..820b809532 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts index 03294fecd7..550bcac0a0 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts index c81b59d014..3f5d513285 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts index 45db85a3eb..575b1bbca6 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts index 00f384c295..4f4d17a928 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts index bf7aaf493e..700dafc412 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts index 9da60b4e5b..cf51111a77 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts index 49a55f3a41..d7a948d68a 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts index 7c3ad559a5..487a365beb 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts index 741e7a392b..24b1ad249f 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts index 736624bd27..8f60b60a29 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts index befb4f29a0..ce20f10c3b 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts index 7a4f6831ef..a610a70a04 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts index bc85c2719b..3a3d38c426 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts index 8930205497..88a3c6c4a7 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts index cd77473a5e..c3107c28cb 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts index 6d65b804d6..ace424f6a8 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts index 2a57cfd265..68af5b5dd8 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/runIntegrationTests.ts b/test/runIntegrationTests.ts index 0711f3bb1b..4a2906e922 100644 --- a/test/runIntegrationTests.ts +++ b/test/runIntegrationTests.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as jest from 'jest'; +import jest from 'jest'; import { Config } from '@jest/types'; import * as path from 'path'; diff --git a/test/tasks/versionHelper.test.ts b/test/tasks/versionHelper.test.ts index 2ba42ef180..1995b791a0 100644 --- a/test/tasks/versionHelper.test.ts +++ b/test/tasks/versionHelper.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getNextReleaseVersion } from '../../tasks/snap/snapTasks'; +import { getNextReleaseVersion } from '../../tasks/snap/snapTasks.js'; import { describe, test, expect } from '@jest/globals'; describe('getNextReleaseVersion', () => { diff --git a/test/untrustedWorkspace/integrationTests/index.ts b/test/untrustedWorkspace/integrationTests/index.ts index 17e719816c..ae4e386a8d 100644 --- a/test/untrustedWorkspace/integrationTests/index.ts +++ b/test/untrustedWorkspace/integrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests'; +import { runIntegrationTests } from '../../runIntegrationTests.js'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/untrustedWorkspace/integrationTests/jest.config.mjs b/test/untrustedWorkspace/integrationTests/jest.config.mjs index 5ef730dd3d..7e85705ec7 100644 --- a/test/untrustedWorkspace/integrationTests/jest.config.mjs +++ b/test/untrustedWorkspace/integrationTests/jest.config.mjs @@ -2,7 +2,7 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { baseProjectConfig } from '../../../baseJestConfig.mjs'; +import { baseIntegrationProjectConfig } from '../../../baseJestConfig.mjs'; import { jestProjectNames } from '../../jestProjectNames.mjs'; /** @@ -10,7 +10,7 @@ import { jestProjectNames } from '../../jestProjectNames.mjs'; */ /** @type {import('jest').Config} */ const integrationTestConfig = { - ...baseProjectConfig, + ...baseIntegrationProjectConfig, displayName: jestProjectNames.untrustedIntegration, roots: [''], testEnvironment: '/../../vsCodeEnvironment.ts', diff --git a/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts b/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts index 2068e1dfd4..f08b24e786 100644 --- a/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts +++ b/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts @@ -5,7 +5,7 @@ import { describe, expect, jest, test } from '@jest/globals'; import * as vscode from 'vscode'; -import { CSharpExtensionExports, LimitedExtensionExports } from '../../../src/csharpExtensionExports'; +import { CSharpExtensionExports, LimitedExtensionExports } from '../../../src/csharpExtensionExports.js'; describe(`Untrusted Workspace`, () => { test(`Limited activation in untrusted workspace`, async () => { diff --git a/test/vsCodeEnvironment.ts b/test/vsCodeEnvironment.ts index 0c886c1164..4d727493bb 100644 --- a/test/vsCodeEnvironment.ts +++ b/test/vsCodeEnvironment.ts @@ -27,4 +27,4 @@ class VsCodeEnvironment extends TestEnvironment { } } -module.exports = VsCodeEnvironment; +export default VsCodeEnvironment; diff --git a/test/vsCodeFramework.ts b/test/vsCodeFramework.ts index 816be12031..4c791b7741 100644 --- a/test/vsCodeFramework.ts +++ b/test/vsCodeFramework.ts @@ -7,3 +7,4 @@ import { jest } from '@jest/globals'; // Defines a virtual mock for the vscode library since it doesn't exist until it gets loaded in by the vscode extension process. jest.mock('vscode', () => (global as any).vscode, { virtual: true }); +jest.unstable_mockModule('vscode', () => (global as any).vscode, { virtual: true }); diff --git a/test/vsCodeUnitFramework.ts b/test/vsCodeUnitFramework.ts new file mode 100644 index 0000000000..d7e90436e0 --- /dev/null +++ b/test/vsCodeUnitFramework.ts @@ -0,0 +1,10 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { jest } from '@jest/globals'; +import * as mockVsCode from '../__mocks__/vscode.js'; + +jest.mock('vscode', () => mockVsCode, { virtual: true }); +jest.unstable_mockModule('vscode', () => mockVsCode, { virtual: true }); diff --git a/test/vscodeLauncher.ts b/test/vscodeLauncher.ts index 639925b8d3..298e7b3fd8 100644 --- a/test/vscodeLauncher.ts +++ b/test/vscodeLauncher.ts @@ -6,7 +6,7 @@ import * as cp from 'child_process'; import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; -import { execChildProcess } from '../src/common'; +import { execChildProcess } from '../src/common.js'; export async function prepareVSCodeAndExecuteTests( extensionDevelopmentPath: string, diff --git a/tsconfig.jest.json b/tsconfig.jest.json new file mode 100644 index 0000000000..e20794f4bf --- /dev/null +++ b/tsconfig.jest.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "Node" + } +} diff --git a/tsconfig.json b/tsconfig.json index 1a974044fc..c184bd5d8c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "esModuleInterop": true, "target": "ES2022", - "module": "CommonJS", + "module": "NodeNext", "outDir": "out", "lib": [ "ES2021" @@ -27,8 +27,9 @@ "vscode-jsonrpc/node": ["./node_modules/vscode-jsonrpc/lib/node/main"], }, "sourceMap": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "moduleDetection": "force", + "isolatedModules": true, "strict": true, "forceConsistentCasingInFileNames": true, "skipLibCheck": true, diff --git a/wallaby.js b/wallaby.js index 2f854e80bd..fb2c0313b6 100644 --- a/wallaby.js +++ b/wallaby.js @@ -1,20 +1,20 @@ -module.exports = function(_wallaby) { - return { - env: { - type: "node" - }, - files: [ - "src/**/*.ts*", - "src/**/*.css", - "test/omnisharp/omnisharpUnitTests/**/*.ts*", - "!test/omnisharp/omnisharpUnitTests/**/*.test.ts*" - ], - tests: ["test/omnisharp/omnisharpUnitTests/**/*.test.ts*"], +export default function (_wallaby) { + return { + env: { + type: 'node', + }, + files: [ + 'src/**/*.ts*', + 'src/**/*.css', + 'test/omnisharp/omnisharpUnitTests/**/*.ts*', + '!test/omnisharp/omnisharpUnitTests/**/*.test.ts*', + ], + tests: ['test/omnisharp/omnisharpUnitTests/**/*.test.ts*'], - debug: true, + debug: true, - setup: function(wallaby) { - wallaby.testFramework.ui("tdd"); - } - }; -}; + setup(wallaby) { + wallaby.testFramework.ui('tdd'); + }, + }; +} From 61309d961bf02141d1ccc0d065500f344e1643ab Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 3 Aug 2026 18:08:36 -0700 Subject: [PATCH 2/3] Use hybrid TypeScript module resolution Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2af8a1f5-c78a-435b-805d-0328d6cd4106 --- __mocks__/vscode.ts | 4 +- esbuild.mjs | 5 -- package.json | 5 +- src/activateOmniSharp.ts | 16 ++-- src/activateRoslyn.ts | 38 ++++----- src/checkSupportedPlatform.ts | 4 +- src/common.ts | 2 +- src/compositeDisposable.ts | 2 +- src/coreclrDebug/activate.ts | 26 +++--- src/coreclrDebug/util.ts | 6 +- src/csharpExtensionExports.ts | 8 +- src/eventStream.ts | 2 +- src/installRuntimeDependencies.ts | 14 ++-- src/lsptoolshost/activate.ts | 50 +++++------ src/lsptoolshost/autoInsert/onAutoInsert.ts | 4 +- .../autoInsert/onAutoInsertFeature.ts | 2 +- src/lsptoolshost/commands.ts | 22 ++--- src/lsptoolshost/copilot/contextProviders.ts | 6 +- src/lsptoolshost/copilot/copilotChatSurvey.ts | 8 +- src/lsptoolshost/debugger/debugger.ts | 18 ++-- ...slynWorkspaceDebugConfigurationProvider.ts | 12 +-- .../diagnostics/buildDiagnosticsService.ts | 2 +- .../diagnostics/buildResultReporterService.ts | 2 +- .../diagnostics/diagnosticMiddleware.ts | 2 +- .../diagnostics/fixAllCodeAction.ts | 4 +- .../diagnostics/nestedCodeAction.ts | 4 +- .../dotnetRuntimeExtensionResolver.ts | 16 ++-- .../extensions/builtInComponents.ts | 2 +- .../roslynLanguageServerExportChannel.ts | 2 +- .../generators/sourceGeneratorsRefresh.ts | 6 +- .../handlers/showToastNotification.ts | 10 +-- src/lsptoolshost/logging/collectLogs.ts | 10 +-- src/lsptoolshost/logging/loggingUtils.ts | 8 +- src/lsptoolshost/logging/profiling.ts | 2 +- .../options/configurationMiddleware.ts | 4 +- src/lsptoolshost/options/optionChanges.ts | 12 +-- .../projectContext/projectContextCommands.ts | 6 +- .../projectContext/projectContextFeature.ts | 2 +- .../projectContext/projectContextService.ts | 16 ++-- .../projectContext/projectContextStatus.ts | 10 +-- src/lsptoolshost/projectRestore/restore.ts | 8 +- .../razor/documentContentsRequest.ts | 2 +- src/lsptoolshost/razor/htmlDocument.ts | 2 +- .../razor/htmlDocumentContentProvider.ts | 6 +- src/lsptoolshost/razor/htmlDocumentManager.ts | 14 ++-- src/lsptoolshost/razor/razorEndpoints.ts | 34 ++++---- .../razor/showGeneratedDocumentCommand.ts | 12 +-- .../server/languageServerEvents.ts | 2 +- .../server/roslynLanguageClient.ts | 14 ++-- .../server/roslynLanguageServer.ts | 58 ++++++------- src/lsptoolshost/server/roslynProtocol.ts | 2 +- src/lsptoolshost/server/serverCommands.ts | 4 +- .../serviceBroker/brokeredServicesHosting.ts | 2 +- .../solutionSnapshotProvider.ts | 4 +- src/lsptoolshost/testing/unitTesting.ts | 12 +-- .../workspace/miscellaneousFileNotifier.ts | 8 +- .../workspace/workspaceCommands.ts | 6 +- src/lsptoolshost/workspace/workspaceStatus.ts | 6 +- src/main.ts | 57 ++++++------- src/networkSettings.ts | 2 +- src/omnisharp/dotnetResolver.ts | 8 +- src/omnisharp/engines/IEngine.ts | 16 ++-- src/omnisharp/engines/lspEngine.ts | 30 +++---- src/omnisharp/engines/stdioEngine.ts | 82 +++++++++---------- src/omnisharp/features/abstractProvider.ts | 6 +- src/omnisharp/features/changeForwarding.ts | 10 +-- src/omnisharp/features/codeActionProvider.ts | 16 ++-- src/omnisharp/features/codeLensProvider.ts | 16 ++-- src/omnisharp/features/commands.ts | 28 +++---- src/omnisharp/features/completionProvider.ts | 14 ++-- .../definitionMetadataDocumentProvider.ts | 4 +- src/omnisharp/features/definitionProvider.ts | 16 ++-- src/omnisharp/features/diagnosticsProvider.ts | 24 +++--- .../features/documentHighlightProvider.ts | 8 +- .../features/documentSymbolProvider.ts | 8 +- src/omnisharp/features/documentation.ts | 2 +- src/omnisharp/features/dotnetTest.ts | 26 +++--- .../features/fileOpenCloseProvider.ts | 10 +-- src/omnisharp/features/fixAll.ts | 2 +- src/omnisharp/features/fixAllProvider.ts | 18 ++-- .../features/formattingEditProvider.ts | 6 +- src/omnisharp/features/hoverProvider.ts | 8 +- .../features/implementationProvider.ts | 8 +- src/omnisharp/features/inlayHintProvider.ts | 16 ++-- src/omnisharp/features/referenceProvider.ts | 14 ++-- src/omnisharp/features/renameProvider.ts | 8 +- .../features/semanticTokensProvider.ts | 14 ++-- .../features/signatureHelpProvider.ts | 8 +- .../sourceGeneratedDocumentProvider.ts | 8 +- src/omnisharp/features/structureProvider.ts | 6 +- .../features/virtualDocumentTracker.ts | 14 ++-- .../features/workspaceSymbolProvider.ts | 16 ++-- .../fileOperationsResponseEditBuilder.ts | 6 +- src/omnisharp/languageMiddlewareFeature.ts | 2 +- src/omnisharp/launcher.ts | 8 +- .../backgroundWorkStatusBarObserver.ts | 10 +-- .../observers/baseStatusBarItemObserver.ts | 4 +- .../observers/csharpLoggerObserver.ts | 8 +- .../observers/dotnetChannelObserver.ts | 6 +- .../observers/dotnetLoggerObserver.ts | 8 +- .../observers/dotnetTestChannelObserver.ts | 6 +- .../observers/dotnetTestLoggerObserver.ts | 10 +-- .../observers/errorMessageObserver.ts | 10 +-- .../observers/informationMessageObserver.ts | 10 +-- .../observers/omnisharpChannelObserver.ts | 10 +-- .../omnisharpDebugModeLoggerObserver.ts | 8 +- .../observers/omnisharpLoggerObserver.ts | 12 +-- .../observers/omnisharpStatusBarObserver.ts | 8 +- .../observers/projectStatusBarObserver.ts | 8 +- .../observers/razorLoggerObserver.ts | 8 +- src/omnisharp/observers/telemetryObserver.ts | 18 ++-- .../observers/warningMessageObserver.ts | 10 +-- src/omnisharp/omniSharpMonoResolver.ts | 8 +- src/omnisharp/omnisharpDownloader.ts | 24 +++--- src/omnisharp/omnisharpLanguageServer.ts | 82 +++++++++---------- src/omnisharp/omnisharpLoggingEvents.ts | 12 +-- src/omnisharp/omnisharpManager.ts | 8 +- src/omnisharp/omnisharpOptionChanges.ts | 8 +- src/omnisharp/omnisharpPackageCreator.ts | 2 +- ...isharpWorkspaceDebugInformationProvider.ts | 10 +-- src/omnisharp/prioritization.ts | 2 +- src/omnisharp/protocol.ts | 2 +- src/omnisharp/requestQueue.ts | 6 +- src/omnisharp/requirementCheck.ts | 10 +-- src/omnisharp/server.ts | 52 ++++++------ src/omnisharp/typeConversion.ts | 2 +- src/omnisharp/utils.ts | 6 +- src/packageManager/IInstallDependencies.ts | 2 +- src/packageManager/absolutePathPackage.ts | 6 +- .../downloadAndInstallPackages.ts | 26 +++--- src/packageManager/fileDownloader.ts | 10 +-- .../getAbsolutePathPackagesToInstall.ts | 8 +- src/packageManager/isValidDownload.ts | 4 +- src/packageManager/package.ts | 2 +- src/packageManager/packageError.ts | 4 +- src/packageManager/packageFilterer.ts | 6 +- src/packageManager/zipInstaller.ts | 8 +- src/razor/razorOmnisharp.ts | 4 +- src/razor/razorOmnisharpDownloader.ts | 18 ++-- .../blazorDebugConfigurationProvider.ts | 16 ++-- .../src/blazorDebug/terminateDebugHandler.ts | 2 +- .../colorPresentationHandler.ts | 8 +- .../serializableColorPresentation.ts | 2 +- .../serializableColorPresentationParams.ts | 4 +- .../src/documentColor/documentColorHandler.ts | 4 +- .../serializableColorInformation.ts | 2 +- src/razor/src/folding/foldingRangeHandler.ts | 2 +- src/razor/src/formatting/formattingHandler.ts | 6 +- .../serializableFormattingResponse.ts | 2 +- src/razor/src/razorLanguage.ts | 2 +- src/razor/src/razorLanguageConfiguration.ts | 2 +- src/razor/src/rpc/serializableRange.ts | 2 +- src/razor/src/rpc/serializableTextEdit.ts | 2 +- src/shared/assets.ts | 8 +- src/shared/configurationProvider.ts | 14 ++-- .../constants/IHostExecutableResolver.ts | 2 +- src/shared/dotnetConfigurationProvider.ts | 12 +-- src/shared/limitedActivationStatus.ts | 6 +- src/shared/loggingEvents.ts | 4 +- src/shared/migrateOptions.ts | 6 +- src/shared/observables/createOptionStream.ts | 2 +- src/shared/observers/baseChannelObserver.ts | 4 +- src/shared/observers/baseLoggerObserver.ts | 6 +- src/shared/observers/csharpChannelObserver.ts | 6 +- src/shared/observers/csharpLoggerObserver.ts | 8 +- src/shared/observers/optionChangeObserver.ts | 4 +- src/shared/observers/utils/showMessage.ts | 2 +- src/shared/platform.ts | 2 +- src/shared/processPicker.ts | 4 +- src/shared/projectConfiguration.ts | 6 +- src/shared/reportIssue.ts | 8 +- src/shared/telemetryReporter.ts | 2 +- src/shared/utils/getDotnetInfo.ts | 6 +- src/shared/workspaceConfigurationProvider.ts | 10 +-- src/statusBarItemAdapter.ts | 2 +- src/textEditorAdapter.ts | 2 +- src/tools/runtimeDependencyPackageUtils.ts | 8 +- src/tools/updatePackageDependencies.ts | 14 ++-- src/utils/dotnetDevCertsHttps.ts | 4 +- src/utils/getCSharpDevKit.ts | 4 +- src/utils/getMonoVersion.ts | 2 +- src/utils/getMsBuildInfo.ts | 4 +- tasks/compilation/copyEsmSupportFiles.ts | 2 +- tasks/components/publishRoslynCopilot.ts | 6 +- tasks/debugger/fixLocUrls.ts | 2 +- tasks/debugger/generateOptionsSchema.ts | 4 +- tasks/debugger/updatePackageDependencies.ts | 4 +- .../publishLocalizationContent.ts | 2 +- tasks/packaging/installDependencies.ts | 4 +- tasks/packaging/installDependenciesClean.ts | 4 +- tasks/packaging/offlinePackagingTasks.ts | 24 +++--- tasks/packaging/updateRoslynVersion.ts | 6 +- tasks/packaging/vsceTasks.ts | 6 +- tasks/packaging/vsixReleasePackage.ts | 4 +- tasks/profiling/profiling.ts | 6 +- tasks/projectPaths.ts | 4 +- tasks/signing/installSignPlugin.ts | 6 +- tasks/signing/signJs.ts | 6 +- tasks/signing/signVsix.ts | 6 +- tasks/signing/signingTasks.ts | 2 +- tasks/signing/verifyVsix.ts | 4 +- tasks/snap/incrementVersion.ts | 4 +- tasks/snap/snapTasks.ts | 2 +- tasks/snap/updateChangelog.ts | 6 +- tasks/snap/updateVersionForStableRelease.ts | 4 +- tasks/spawnNode.ts | 2 +- tasks/tags/createTags.ts | 8 +- tasks/tests/omnisharptest.ts | 4 +- tasks/tests/omnisharptestIntegration.ts | 4 +- tasks/tests/omnisharptestTasks.ts | 4 +- tasks/tests/omnisharptestUnit.ts | 4 +- tasks/tests/test.ts | 4 +- tasks/tests/testArtifacts.ts | 4 +- tasks/tests/testHelpers.ts | 4 +- tasks/tests/testIntegrationCsharp.ts | 4 +- tasks/tests/testIntegrationDevkit.ts | 4 +- tasks/tests/testIntegrationRazorCohost.ts | 4 +- tasks/tests/testIntegrationUntrusted.ts | 4 +- tasks/tests/testTasks.ts | 2 +- tasks/tests/testUnit.ts | 4 +- test/createTmpAsset.ts | 2 +- test/fakes.ts | 8 +- .../buildDiagnostics.integration.test.ts | 6 +- .../classification.integration.test.ts | 4 +- .../codeactions.integration.test.ts | 4 +- .../codelens.integration.test.ts | 4 +- .../commandEnablement.integration.test.ts | 6 +- .../completion.integration.test.ts | 4 +- .../integrationTests/diagnosticsHelpers.ts | 2 +- .../documentDiagnostics.integration.test.ts | 8 +- ...documentSymbolProvider.integration.test.ts | 4 +- .../fileBasedPrograms.integration.test.ts | 6 +- .../formatting.integration.test.ts | 6 +- ...formattingEditorConfig.integration.test.ts | 6 +- .../gotoDefinition.integration.test.ts | 4 +- .../gotoImplementation.integration.test.ts | 4 +- .../hover.integration.test.ts | 4 +- .../integrationTests/integrationHelpers.ts | 8 +- .../lspInlayHints.integration.test.ts | 4 +- .../onAutoInsert.integration.test.ts | 4 +- .../references.integration.test.ts | 4 +- .../signatureHelp.integration.test.ts | 4 +- .../sourceGenerator.integration.test.ts | 4 +- .../integrationTests/testAssets/razorApp.ts | 2 +- .../testAssets/singleCsproj.ts | 2 +- .../testAssets/slnFilterWithCsproj.ts | 2 +- .../testAssets/slnWithCsproj.ts | 2 +- .../testAssets/slnWithGenerator.ts | 2 +- .../testAssets/testAssetWorkspace.ts | 12 +-- .../integrationTests/testAssets/testAssets.ts | 4 +- .../unitTests.integration.test.ts | 6 +- .../workspaceDiagnostics.integration.test.ts | 8 +- .../unitTests/captureActivityLogs.test.ts | 2 +- .../unitTests/configurationMiddleware.test.ts | 2 +- .../unitTests/csharpChannelObserver.test.ts | 6 +- .../unitTests/csharpLoggerObserver.test.ts | 12 +-- test/lsptoolshost/unitTests/json.test.ts | 2 +- ...languageServerConfigChangeObserver.test.ts | 4 +- .../unitTests/migrateOptions.test.ts | 10 +-- .../unitTests/roslynLanguageClient.test.ts | 4 +- .../advisor.integration.test.ts | 6 +- .../codeActionRename.integration.test.ts | 8 +- .../codeLensProvider.integration.test.ts | 6 +- .../completionProvider.integration.test.ts | 6 +- .../definitionProvider.test.ts | 10 +-- .../diagnostics.integration.test.ts | 8 +- ...documentSymbolProvider.integration.test.ts | 4 +- ...nCommentAutoFormatting.integration.test.ts | 2 +- .../dotnetTest.integration.test.ts | 14 ++-- .../hoverProvider.integration.test.ts | 4 +- .../implementationProvider.test.ts | 6 +- .../inlayHints.integration.test.ts | 12 +-- .../integrationHelpers.ts | 8 +- .../languageMiddleware.integration.test.ts | 6 +- .../launchConfiguration.integration.test.ts | 8 +- .../launcher.test.ts | 4 +- .../omnisharpCommands.integration.test.ts | 9 +- .../parsedEnvironmentFile.test.ts | 2 +- .../reAnalyze.integration.test.ts | 16 ++-- .../referenceProvider.test.ts | 6 +- .../semanticTokensProvider.test.ts | 4 +- .../signatureHelp.integration.test.ts | 4 +- .../sourceGeneratorDefinitionProvider.test.ts | 8 +- .../testAssets/activeTestAssetWorkspace.ts | 14 ++-- .../testAssets/omnisharpTestAssetWorkspace.ts | 15 ++-- .../typeDefinitionProvider.test.ts | 10 +-- ...virtualDocumentTracker.integration.test.ts | 6 +- ...orkspaceSymbolProvider.integration.test.ts | 4 +- .../omnisharpUnitTests/absolutePath.test.ts | 4 +- .../omnisharpUnitTests/assets.test.ts | 8 +- .../blazorWebAssemblyDetection.test.ts | 8 +- .../omnisharpUnitTests/common.test.ts | 2 +- .../coreclrDebug/targetArchitecture.test.ts | 6 +- .../fakes/fakeDotnetResolver.ts | 4 +- .../fakes/fakeMonoResolver.ts | 4 +- .../features/reportIssue.test.ts | 8 +- .../informationMessageObserver.test.ts | 4 +- .../installRuntimeDependencies.test.ts | 16 ++-- .../backgroundWorkStatusBarObserver.test.ts | 8 +- .../logging/dotnetChannelObserver.test.ts | 6 +- .../logging/dotnetLoggerObserver.test.ts | 8 +- .../logging/dotnetTestChannelObserver.test.ts | 8 +- .../logging/dotnetTestLoggerObserver.test.ts | 10 +-- .../logging/errorMessageObserver.test.ts | 10 +-- .../logging/omnisharpChannelObserver.test.ts | 8 +- .../omnisharpDebugModeLoggerObserver.test.ts | 8 +- .../logging/omnisharpLoggerObserver.test.ts | 10 +-- .../omnisharpStatusBarObserver.test.ts | 8 +- .../logging/projectStatusBarObserver.test.ts | 8 +- .../logging/razorLoggerObserver.test.ts | 6 +- .../logging/telemetryObserver.test.ts | 16 ++-- .../logging/warningMessageObserver.test.ts | 6 +- .../omnisharp/omniSharpMonoResolver.test.ts | 4 +- .../omnisharpDownloader.test.ts | 26 +++--- .../omnisharpManager.test.ts | 24 +++--- .../omnisharpPackageCreator.test.ts | 8 +- .../optionChangeObserver.test.ts | 4 +- .../omnisharpUnitTests/optionStream.test.ts | 4 +- .../omnisharpUnitTests/options.test.ts | 4 +- .../downloadAndInstallPackages.test.ts | 26 +++--- .../packages/fileDownloader.test.ts | 12 +-- .../packages/isValidDownload.test.ts | 4 +- .../packages/packageFilterer.test.ts | 10 +-- .../omnisharpUnitTests/packages/proxy.test.ts | 2 +- .../packages/zipInstaller.test.ts | 20 ++--- .../omnisharpUnitTests/platform.test.ts | 2 +- .../omnisharpUnitTests/processPicker.test.ts | 2 +- .../testAssets/getConfigChangeEvent.ts | 2 +- .../testAssets/testEventBus.ts | 6 +- .../omnisharpUnitTests/testAssets/testZip.ts | 2 +- .../completion.integration.test.ts | 4 +- .../formatting.integration.test.ts | 4 +- .../hover.integration.test.ts | 4 +- .../reference.integration.test.ts | 4 +- .../rename.integration.test.ts | 4 +- .../testAssets/testAssetWorkspace.ts | 5 +- .../tests/addTagHelperDirective.ts | 2 +- .../tests/attributeDirective.ts | 2 +- .../tests/codeBlock.ts | 2 +- .../tests/codeDirective.ts | 2 +- .../tests/doStatement.ts | 2 +- .../tests/elsePart.ts | 2 +- .../tests/explicitExpressionInAttribute.ts | 2 +- .../tests/explicitExpressions.ts | 2 +- .../tests/forStatement.ts | 2 +- .../tests/foreachStatement.ts | 2 +- .../tests/functionsDirective.ts | 2 +- .../tests/grammarTests.test.ts | 78 +++++++++--------- .../tests/htmlDynamicAttribute.ts | 2 +- .../tests/ifStatement.ts | 2 +- .../tests/implementsDirective.ts | 2 +- .../tests/implicitExpressionInAttribute.ts | 2 +- .../tests/implicitExpressions.ts | 2 +- .../tests/infrastructure/snapshotFactory.ts | 2 +- .../tests/infrastructure/testUtilities.ts | 4 +- .../tokenizedContentProvider.ts | 2 +- .../tests/inheritsDirective.ts | 2 +- .../tests/injectDirective.ts | 2 +- .../tests/layoutDirective.ts | 2 +- .../tests/lockStatement.ts | 2 +- .../tests/modelDirective.ts | 2 +- .../tests/namespaceDirective.ts | 2 +- .../tests/pageDirective.ts | 2 +- .../tests/preservewhitespaceDirective.ts | 2 +- .../tests/razorComment.ts | 2 +- .../tests/razorTemplate.ts | 2 +- .../tests/removeTagHelperDirective.ts | 2 +- .../tests/rendermodeDirective.ts | 2 +- .../tests/scriptBlock.ts | 2 +- .../tests/sectionDirective.ts | 2 +- .../tests/styleBlock.ts | 2 +- .../tests/switchStatement.ts | 2 +- .../tests/tagHelperPrefixDirective.ts | 2 +- .../tests/transitions.ts | 2 +- .../tests/tryStatement.ts | 2 +- .../tests/typeparamDirective.ts | 2 +- .../tests/usingDirective.ts | 2 +- .../tests/usingStatement.ts | 2 +- .../tests/whileStatement.ts | 2 +- test/tasks/versionHelper.test.ts | 2 +- .../untrustedWorkspace.integration.test.ts | 2 +- test/vsCodeUnitFramework.ts | 2 +- test/vscodeLauncher.ts | 2 +- tsconfig.integration.json | 17 ++++ tsconfig.json | 5 +- 385 files changed, 1471 insertions(+), 1493 deletions(-) create mode 100644 tsconfig.integration.json diff --git a/__mocks__/vscode.ts b/__mocks__/vscode.ts index 1bb6b270c5..70e123e5b5 100644 --- a/__mocks__/vscode.ts +++ b/__mocks__/vscode.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from '../src/vscodeAdapter.js'; -import { getFakeVsCode } from '../test/fakes.js'; +import * as vscodeAdapter from '../src/vscodeAdapter'; +import { getFakeVsCode } from '../test/fakes'; // This module creates a manual mock for the vscode module for running in unit tests. // Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules. diff --git a/esbuild.mjs b/esbuild.mjs index dabb1ab213..b93b58c19b 100644 --- a/esbuild.mjs +++ b/esbuild.mjs @@ -50,12 +50,7 @@ async function main() { banner: { js: [ `import { createRequire } from 'node:module';`, - `import { dirname as commonJsDirname } from 'node:path';`, - `import { fileURLToPath as commonJsFileURLToPath } from 'node:url';`, `const require = createRequire(import.meta.url);`, - `// Temporary CommonJS globals until bundled source usages are converted to ESM.`, - `const __filename = commonJsFileURLToPath(import.meta.url);`, - `const __dirname = commonJsDirname(__filename);`, ].join('\n'), }, minify: production, diff --git a/package.json b/package.json index 160b3e710f..9892b10918 100644 --- a/package.json +++ b/package.json @@ -65,9 +65,10 @@ } ], "scripts": { - "compile": "tsc -p tsconfig.json && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", - "compileDev": "tsc -p tsconfig.json && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compile": "tsc -p tsconfig.json && npm run compile:integrationTests && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compileDev": "tsc -p tsconfig.json && npm run compile:integrationTests && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", "compile:copyEsmSupportFiles": "node --import tsx tasks/compilation/copyEsmSupportFiles.ts", + "compile:integrationTests": "tsc -p tsconfig.integration.json", "compile:razorTextMate": "npx js-yaml src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml > src/razor/syntaxes/aspnetcorerazor.tmLanguage.json", "createTags": "npx tsx tasks/tags/createTags.ts", "fixLocUrls": "npx tsx tasks/debugger/fixLocUrls.ts", diff --git a/src/activateOmniSharp.ts b/src/activateOmniSharp.ts index 4111cd36f8..97358bc848 100644 --- a/src/activateOmniSharp.ts +++ b/src/activateOmniSharp.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { OmnisharpExtensionExports } from './csharpExtensionExports.js'; -import { PlatformInformation } from './shared/platform.js'; +import { OmnisharpExtensionExports } from './csharpExtensionExports'; +import { PlatformInformation } from './shared/platform'; import { Observable } from 'rxjs'; -import { NetworkSettingsProvider } from './networkSettings.js'; -import { ITelemetryReporter } from './shared/telemetryReporter.js'; -import { activateOmniSharpLanguageServer } from './omnisharp/omnisharpLanguageServer.js'; -import { EventStream } from './eventStream.js'; -import { razorOptions } from './shared/options.js'; -import { activateRazorOmniSharpExtension } from './razor/razorOmnisharp.js'; +import { NetworkSettingsProvider } from './networkSettings'; +import { ITelemetryReporter } from './shared/telemetryReporter'; +import { activateOmniSharpLanguageServer } from './omnisharp/omnisharpLanguageServer'; +import { EventStream } from './eventStream'; +import { razorOptions } from './shared/options'; +import { activateRazorOmniSharpExtension } from './razor/razorOmnisharp'; export function activateOmniSharp( context: vscode.ExtensionContext, diff --git a/src/activateRoslyn.ts b/src/activateRoslyn.ts index d928592c53..a27672c72b 100644 --- a/src/activateRoslyn.ts +++ b/src/activateRoslyn.ts @@ -4,27 +4,27 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { CSharpExtensionExports } from './csharpExtensionExports.js'; -import { PlatformInformation } from './shared/platform.js'; +import { CSharpExtensionExports } from './csharpExtensionExports'; +import { PlatformInformation } from './shared/platform'; import { Observable } from 'rxjs'; -import { EventStream } from './eventStream.js'; -import { ITelemetryReporterWithLevel } from './shared/telemetryReporter.js'; -import { RoslynLanguageServer } from './lsptoolshost/server/roslynLanguageServer.js'; -import { CSharpDevKitExports } from './csharpDevKitExports.js'; -import { RoslynLanguageServerEvents, ServerState } from './lsptoolshost/server/languageServerEvents.js'; -import { activateRoslynLanguageServer, createCaptureActivityLogs } from './lsptoolshost/activate.js'; -import Descriptors from './lsptoolshost/solutionSnapshot/descriptors.js'; -import { getBrokeredServiceContainer } from './lsptoolshost/serviceBroker/brokeredServicesHosting.js'; -import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker.js'; -import { RoslynLanguageServerExport } from './lsptoolshost/extensions/roslynLanguageServerExportChannel.js'; -import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider.js'; -import { languageServerOptions } from './shared/options.js'; -import { csharpDevkitExtensionId } from './utils/getCSharpDevKit.js'; +import { EventStream } from './eventStream'; +import { ITelemetryReporterWithLevel } from './shared/telemetryReporter'; +import { RoslynLanguageServer } from './lsptoolshost/server/roslynLanguageServer'; +import { CSharpDevKitExports } from './csharpDevKitExports'; +import { RoslynLanguageServerEvents, ServerState } from './lsptoolshost/server/languageServerEvents'; +import { activateRoslynLanguageServer, createCaptureActivityLogs } from './lsptoolshost/activate'; +import Descriptors from './lsptoolshost/solutionSnapshot/descriptors'; +import { getBrokeredServiceContainer } from './lsptoolshost/serviceBroker/brokeredServicesHosting'; +import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker'; +import { RoslynLanguageServerExport } from './lsptoolshost/extensions/roslynLanguageServerExportChannel'; +import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider'; +import { languageServerOptions } from './shared/options'; +import { csharpDevkitExtensionId } from './utils/getCSharpDevKit'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; -import { SolutionSnapshotProvider } from './lsptoolshost/solutionSnapshot/solutionSnapshotProvider.js'; -import { BuildResultDiagnostics } from './lsptoolshost/diagnostics/buildResultReporterService.js'; -import { getComponentFolder } from './lsptoolshost/extensions/builtInComponents.js'; -import { ObservableLogOutputChannel } from './lsptoolshost/logging/observableLogOutputChannel.js'; +import { SolutionSnapshotProvider } from './lsptoolshost/solutionSnapshot/solutionSnapshotProvider'; +import { BuildResultDiagnostics } from './lsptoolshost/diagnostics/buildResultReporterService'; +import { getComponentFolder } from './lsptoolshost/extensions/builtInComponents'; +import { ObservableLogOutputChannel } from './lsptoolshost/logging/observableLogOutputChannel'; export function activateRoslyn( context: vscode.ExtensionContext, diff --git a/src/checkSupportedPlatform.ts b/src/checkSupportedPlatform.ts index d1bbc52b52..36fb5b8bc9 100644 --- a/src/checkSupportedPlatform.ts +++ b/src/checkSupportedPlatform.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { PlatformInformation } from './shared/platform.js'; -import { ActionOption, showErrorMessage } from './shared/observers/utils/showMessage.js'; +import { PlatformInformation } from './shared/platform'; +import { ActionOption, showErrorMessage } from './shared/observers/utils/showMessage'; export function checkIsSupportedPlatform(context: vscode.ExtensionContext, platformInfo: PlatformInformation): boolean { if (!isSupportedPlatform(platformInfo)) { diff --git a/src/common.ts b/src/common.ts index 918786ee4e..d3dc6d33e9 100644 --- a/src/common.ts +++ b/src/common.ts @@ -7,7 +7,7 @@ import * as cp from 'child_process'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import { AbsolutePath } from './packageManager/absolutePath.js'; +import { AbsolutePath } from './packageManager/absolutePath'; let extensionPath: string; diff --git a/src/compositeDisposable.ts b/src/compositeDisposable.ts index 7eff8f5bea..799577d1d7 100644 --- a/src/compositeDisposable.ts +++ b/src/compositeDisposable.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Subscription } from 'rxjs'; -import Disposable, { IDisposable } from './disposable.js'; +import Disposable, { IDisposable } from './disposable'; export default class CompositeDisposable extends Disposable { private disposables = new Subscription(); diff --git a/src/coreclrDebug/activate.ts b/src/coreclrDebug/activate.ts index 1085b42ef7..de2355afb5 100644 --- a/src/coreclrDebug/activate.ts +++ b/src/coreclrDebug/activate.ts @@ -5,23 +5,23 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import * as common from '../common.js'; -import { CoreClrDebugUtil, getTargetArchitecture, MINIMUM_SUPPORT_MACOS_DISPLAY_NAME } from './util.js'; -import { PlatformInformation } from '../shared/platform.js'; +import * as common from '../common'; +import { CoreClrDebugUtil, getTargetArchitecture, MINIMUM_SUPPORT_MACOS_DISPLAY_NAME } from './util'; +import { PlatformInformation } from '../shared/platform'; import { DebuggerPrerequisiteWarning, DebuggerPrerequisiteFailure, DebuggerNotInstalledFailure, -} from '../shared/loggingEvents.js'; -import { EventStream } from '../eventStream.js'; -import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils.js'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; -import { RemoteAttachPicker } from '../shared/processPicker.js'; -import CompositeDisposable from '../compositeDisposable.js'; -import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider.js'; -import { omnisharpOptions } from '../shared/options.js'; -import { ActionOption, CommandOption, showErrorMessage } from '../shared/observers/utils/showMessage.js'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit.js'; +} from '../shared/loggingEvents'; +import { EventStream } from '../eventStream'; +import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; +import { RemoteAttachPicker } from '../shared/processPicker'; +import CompositeDisposable from '../compositeDisposable'; +import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider'; +import { omnisharpOptions } from '../shared/options'; +import { ActionOption, CommandOption, showErrorMessage } from '../shared/observers/utils/showMessage'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit'; export async function activate( thisExtension: vscode.Extension, diff --git a/src/coreclrDebug/util.ts b/src/coreclrDebug/util.ts index c18d0699a7..9dd9b67213 100644 --- a/src/coreclrDebug/util.ts +++ b/src/coreclrDebug/util.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import * as fs from 'fs'; import * as semver from 'semver'; import * as os from 'os'; -import { PlatformInformation } from '../shared/platform.js'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; -import { DotnetInfo } from '../shared/utils/dotnetInfo.js'; +import { PlatformInformation } from '../shared/platform'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; +import { DotnetInfo } from '../shared/utils/dotnetInfo'; const MINIMUM_SUPPORTED_DOTNET_CLI = '1.0.0'; diff --git a/src/csharpExtensionExports.ts b/src/csharpExtensionExports.ts index 8ee2569c30..7c34d28cd9 100644 --- a/src/csharpExtensionExports.ts +++ b/src/csharpExtensionExports.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { Advisor } from './omnisharp/features/diagnosticsProvider.js'; -import { EventStream } from './eventStream.js'; -import TestManager from './omnisharp/features/dotnetTest.js'; +import { Advisor } from './omnisharp/features/diagnosticsProvider'; +import { EventStream } from './eventStream'; +import TestManager from './omnisharp/features/dotnetTest'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; -import { LanguageServerEvents } from './lsptoolshost/server/languageServerEvents.js'; +import { LanguageServerEvents } from './lsptoolshost/server/languageServerEvents'; import { PartialResultParams, ProtocolRequestType, RequestParam, RequestType } from 'vscode-languageclient'; export interface LimitedExtensionExports { diff --git a/src/eventStream.ts b/src/eventStream.ts index efd24a4567..946370b936 100644 --- a/src/eventStream.ts +++ b/src/eventStream.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Subject, Subscription } from 'rxjs'; -import { BaseEvent } from './shared/loggingEvents.js'; +import { BaseEvent } from './shared/loggingEvents'; export class EventStream { private sink: Subject; diff --git a/src/installRuntimeDependencies.ts b/src/installRuntimeDependencies.ts index 54ff862e71..3cdab86cd2 100644 --- a/src/installRuntimeDependencies.ts +++ b/src/installRuntimeDependencies.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from './shared/platform.js'; -import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents.js'; -import { EventStream } from './eventStream.js'; -import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils.js'; -import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall.js'; -import { DependencyInstallationStatus, IInstallDependencies } from './packageManager/IInstallDependencies.js'; -import { AbsolutePathPackage } from './packageManager/absolutePathPackage.js'; +import { PlatformInformation } from './shared/platform'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents'; +import { EventStream } from './eventStream'; +import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils'; +import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall'; +import { DependencyInstallationStatus, IInstallDependencies } from './packageManager/IInstallDependencies'; +import { AbsolutePathPackage } from './packageManager/absolutePathPackage'; export async function installRuntimeDependencies( packageJSON: any, diff --git a/src/lsptoolshost/activate.ts b/src/lsptoolshost/activate.ts index aa0698ec10..c376efaa6b 100644 --- a/src/lsptoolshost/activate.ts +++ b/src/lsptoolshost/activate.ts @@ -7,32 +7,32 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; import { fileURLToPath } from 'url'; -import { registerCommands } from './commands.js'; -import { registerDebugger } from './debugger/debugger.js'; -import { PlatformInformation } from '../shared/platform.js'; -import { ITelemetryReporterWithLevel } from '../shared/telemetryReporter.js'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit.js'; -import { DotnetRuntimeExtensionResolver } from './dotnetRuntime/dotnetRuntimeExtensionResolver.js'; -import { registerUnitTestingCommands } from './testing/unitTesting.js'; -import { registerLanguageServerOptionChanges } from './options/optionChanges.js'; +import { registerCommands } from './commands'; +import { registerDebugger } from './debugger/debugger'; +import { PlatformInformation } from '../shared/platform'; +import { ITelemetryReporterWithLevel } from '../shared/telemetryReporter'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit'; +import { DotnetRuntimeExtensionResolver } from './dotnetRuntime/dotnetRuntimeExtensionResolver'; +import { registerUnitTestingCommands } from './testing/unitTesting'; +import { registerLanguageServerOptionChanges } from './options/optionChanges'; import { Observable } from 'rxjs'; -import { RoslynLanguageServerEvents } from './server/languageServerEvents.js'; -import { registerCodeActionFixAllCommands } from './diagnostics/fixAllCodeAction.js'; -import { commonOptions, languageServerOptions } from '../shared/options.js'; -import { registerNestedCodeActionCommands } from './diagnostics/nestedCodeAction.js'; -import { registerRestoreCommands } from './projectRestore/restore.js'; -import { registerMiscellaneousFileNotifier } from './workspace/miscellaneousFileNotifier.js'; -import { TelemetryEventNames } from '../shared/telemetryEventNames.js'; -import { WorkspaceStatus } from './workspace/workspaceStatus.js'; -import { ProjectContextStatus } from './projectContext/projectContextStatus.js'; -import { RoslynLanguageServer } from './server/roslynLanguageServer.js'; -import { registerCopilotContextProviders } from './copilot/contextProviders.js'; -import { registerCopilotChatSurvey } from './copilot/copilotChatSurvey.js'; -import { registerRazorEndpoints } from './razor/razorEndpoints.js'; -import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel.js'; -import { registerSourceGeneratorRefresh } from './generators/sourceGeneratorsRefresh.js'; -import { ActivityLogCapture } from '../csharpExtensionExports.js'; -import { createActivityLogCapture } from './logging/loggingUtils.js'; +import { RoslynLanguageServerEvents } from './server/languageServerEvents'; +import { registerCodeActionFixAllCommands } from './diagnostics/fixAllCodeAction'; +import { commonOptions, languageServerOptions } from '../shared/options'; +import { registerNestedCodeActionCommands } from './diagnostics/nestedCodeAction'; +import { registerRestoreCommands } from './projectRestore/restore'; +import { registerMiscellaneousFileNotifier } from './workspace/miscellaneousFileNotifier'; +import { TelemetryEventNames } from '../shared/telemetryEventNames'; +import { WorkspaceStatus } from './workspace/workspaceStatus'; +import { ProjectContextStatus } from './projectContext/projectContextStatus'; +import { RoslynLanguageServer } from './server/roslynLanguageServer'; +import { registerCopilotContextProviders } from './copilot/contextProviders'; +import { registerCopilotChatSurvey } from './copilot/copilotChatSurvey'; +import { registerRazorEndpoints } from './razor/razorEndpoints'; +import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel'; +import { registerSourceGeneratorRefresh } from './generators/sourceGeneratorsRefresh'; +import { ActivityLogCapture } from '../csharpExtensionExports'; +import { createActivityLogCapture } from './logging/loggingUtils'; let _channel: ObservableLogOutputChannel; let _traceChannel: ObservableLogOutputChannel; diff --git a/src/lsptoolshost/autoInsert/onAutoInsert.ts b/src/lsptoolshost/autoInsert/onAutoInsert.ts index 2a3c2edd59..e0d9d94a7b 100644 --- a/src/lsptoolshost/autoInsert/onAutoInsert.ts +++ b/src/lsptoolshost/autoInsert/onAutoInsert.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as RoslynProtocol from '../server/roslynProtocol.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import * as RoslynProtocol from '../server/roslynProtocol'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; import { FormattingOptions, InsertTextFormat, Range, TextDocumentIdentifier } from 'vscode-languageclient'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts b/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts index cefc84e30a..a68a9acb6b 100644 --- a/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts +++ b/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts @@ -21,7 +21,7 @@ import { ServerCapabilities, } from 'vscode-languageclient'; -import * as RoslynProtocol from '../server/roslynProtocol.js'; +import * as RoslynProtocol from '../server/roslynProtocol'; import { randomUUID } from 'crypto'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/commands.ts b/src/lsptoolshost/commands.ts index 89deada5bb..f27069f480 100644 --- a/src/lsptoolshost/commands.ts +++ b/src/lsptoolshost/commands.ts @@ -4,23 +4,23 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from './server/roslynLanguageServer.js'; -import reportIssue from '../shared/reportIssue.js'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; -import { registerWorkspaceCommands } from './workspace/workspaceCommands.js'; -import { registerServerCommands } from './server/serverCommands.js'; +import { RoslynLanguageServer } from './server/roslynLanguageServer'; +import reportIssue from '../shared/reportIssue'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { registerWorkspaceCommands } from './workspace/workspaceCommands'; +import { registerServerCommands } from './server/serverCommands'; import { changeProjectContext, changeProjectContextCommandName, changeProjectContextEditor, changeProjectContextFileExplorer, openAndChangeProjectContext, -} from './projectContext/projectContextCommands.js'; -import { ITelemetryReporter } from '../shared/telemetryReporter.js'; -import { TelemetryEventNames } from '../shared/telemetryEventNames.js'; -import { registerCollectLogsCommand } from './logging/collectLogs.js'; -import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel.js'; +} from './projectContext/projectContextCommands'; +import { ITelemetryReporter } from '../shared/telemetryReporter'; +import { TelemetryEventNames } from '../shared/telemetryEventNames'; +import { registerCollectLogsCommand } from './logging/collectLogs'; +import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel'; export function registerCommands( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/copilot/contextProviders.ts b/src/lsptoolshost/copilot/contextProviders.ts index 6f73555fbd..12f1c5c806 100644 --- a/src/lsptoolshost/copilot/contextProviders.ts +++ b/src/lsptoolshost/copilot/contextProviders.ts @@ -10,9 +10,9 @@ import { } from '@github/copilot-language-server'; import * as vscode from 'vscode'; import * as lsp from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { CSharpExtensionId } from '../../constants/csharpExtensionId.js'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { CSharpExtensionId } from '../../constants/csharpExtensionId'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; type ActiveExperiments = { [name: string]: string | number | boolean | string[] }; diff --git a/src/lsptoolshost/copilot/copilotChatSurvey.ts b/src/lsptoolshost/copilot/copilotChatSurvey.ts index 9e40176362..2365699d8d 100644 --- a/src/lsptoolshost/copilot/copilotChatSurvey.ts +++ b/src/lsptoolshost/copilot/copilotChatSurvey.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import type { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { LanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; -import { ITelemetryReporter } from '../../shared/telemetryReporter.js'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames.js'; +import type { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { LanguageServerEvents, ServerState } from '../server/languageServerEvents'; +import { ITelemetryReporter } from '../../shared/telemetryReporter'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames'; // Stored under separate keys so a snooze write can never overwrite a terminal "shown" // value set in another window (globalState.update replaces the whole value for a key). diff --git a/src/lsptoolshost/debugger/debugger.ts b/src/lsptoolshost/debugger/debugger.ts index c972d2cf95..47ccce90e1 100644 --- a/src/lsptoolshost/debugger/debugger.ts +++ b/src/lsptoolshost/debugger/debugger.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { addAssetsIfNecessary, generateAssets } from '../../shared/assets.js'; -import { DotnetWorkspaceConfigurationProvider } from '../../shared/workspaceConfigurationProvider.js'; -import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { RoslynWorkspaceDebugInformationProvider } from '../debugger/roslynWorkspaceDebugConfigurationProvider.js'; -import { PlatformInformation } from '../../shared/platform.js'; -import { DotnetConfigurationResolver } from '../../shared/dotnetConfigurationProvider.js'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; -import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; +import { addAssetsIfNecessary, generateAssets } from '../../shared/assets'; +import { DotnetWorkspaceConfigurationProvider } from '../../shared/workspaceConfigurationProvider'; +import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynWorkspaceDebugInformationProvider } from '../debugger/roslynWorkspaceDebugConfigurationProvider'; +import { PlatformInformation } from '../../shared/platform'; +import { DotnetConfigurationResolver } from '../../shared/dotnetConfigurationProvider'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents'; export function registerDebugger( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts b/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts index 1cacdf2b9f..b3bbb45ae1 100644 --- a/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts +++ b/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { mapAsync } from '../../common.js'; +import { mapAsync } from '../../common'; import { IWorkspaceDebugInformationProvider, ProjectDebugInformation, -} from '../../shared/IWorkspaceDebugInformationProvider.js'; +} from '../../shared/IWorkspaceDebugInformationProvider'; import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyHostedServer, isBlazorWebAssemblyProject, isWebProject, -} from '../../shared/utils.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +} from '../../shared/utils'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; import { ProjectDebugConfiguration, WorkspaceDebugConfigurationParams, WorkspaceDebugConfigurationRequest, -} from '../server/roslynProtocol.js'; -import { UriConverter } from '../utils/uriConverter.js'; +} from '../server/roslynProtocol'; +import { UriConverter } from '../utils/uriConverter'; export class RoslynWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { constructor( diff --git a/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts b/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts index 99f6633b16..70458d3bd5 100644 --- a/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts +++ b/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { languageServerOptions } from '../../shared/options.js'; +import { languageServerOptions } from '../../shared/options'; export enum AnalysisSetting { FullSolution = 'fullSolution', diff --git a/src/lsptoolshost/diagnostics/buildResultReporterService.ts b/src/lsptoolshost/diagnostics/buildResultReporterService.ts index 258432a755..ed2587e661 100644 --- a/src/lsptoolshost/diagnostics/buildResultReporterService.ts +++ b/src/lsptoolshost/diagnostics/buildResultReporterService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { CancellationToken } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; import * as vscode from 'vscode'; interface IBuildResultDiagnostics { diff --git a/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts b/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts index e36a2ec97a..5adba60290 100644 --- a/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts +++ b/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { ProvideDiagnosticSignature, ProvideWorkspaceDiagnosticSignature, vsdiag } from 'vscode-languageclient'; -import { languageServerOptions } from '../../shared/options.js'; +import { languageServerOptions } from '../../shared/options'; export async function provideDiagnostics( document: vscode.TextDocument | vscode.Uri, diff --git a/src/lsptoolshost/diagnostics/fixAllCodeAction.ts b/src/lsptoolshost/diagnostics/fixAllCodeAction.ts index 378823e947..6e251ffb72 100644 --- a/src/lsptoolshost/diagnostics/fixAllCodeAction.ts +++ b/src/lsptoolshost/diagnostics/fixAllCodeAction.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as RoslynProtocol from '../server/roslynProtocol.js'; +import * as RoslynProtocol from '../server/roslynProtocol'; import { LSPAny } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; export function registerCodeActionFixAllCommands( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/diagnostics/nestedCodeAction.ts b/src/lsptoolshost/diagnostics/nestedCodeAction.ts index b49d551705..98d6462424 100644 --- a/src/lsptoolshost/diagnostics/nestedCodeAction.ts +++ b/src/lsptoolshost/diagnostics/nestedCodeAction.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { CodeAction, CodeActionResolveRequest, LSPAny } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { getFixAllResponse } from './fixAllCodeAction.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { getFixAllResponse } from './fixAllCodeAction'; export function registerNestedCodeActionCommands( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts index 3e5588236f..aebfa77e19 100644 --- a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts +++ b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts @@ -5,21 +5,21 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { HostExecutableInformation } from '../../shared/constants/hostExecutableInformation.js'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; -import { PlatformInformation } from '../../shared/platform.js'; -import { languageServerOptions } from '../../shared/options.js'; +import { HostExecutableInformation } from '../../shared/constants/hostExecutableInformation'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; +import { PlatformInformation } from '../../shared/platform'; +import { languageServerOptions } from '../../shared/options'; import { existsSync } from 'fs'; -import { CSharpExtensionId } from '../../constants/csharpExtensionId.js'; +import { CSharpExtensionId } from '../../constants/csharpExtensionId'; import { readFile } from 'fs/promises'; import { DotnetInstallMode, IDotnetAcquireContext, IDotnetAcquireResult, IDotnetFindPathContext, -} from './dotnetRuntimeExtensionApi.js'; -import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion.js'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +} from './dotnetRuntimeExtensionApi'; +import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; const DotNetMajorVersion = '10'; const DotNetMinorVersion = '0'; diff --git a/src/lsptoolshost/extensions/builtInComponents.ts b/src/lsptoolshost/extensions/builtInComponents.ts index 7575300ec5..179eaa2ea5 100644 --- a/src/lsptoolshost/extensions/builtInComponents.ts +++ b/src/lsptoolshost/extensions/builtInComponents.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; import { fileURLToPath } from 'url'; -import { LanguageServerOptions } from '../../shared/options.js'; +import { LanguageServerOptions } from '../../shared/options'; interface ComponentInfo { defaultFolderName: string; diff --git a/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts b/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts index b1946c7b7b..b158753b9f 100644 --- a/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts +++ b/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; import { ParameterStructures, PartialResultParams, diff --git a/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts b/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts index 34df95aa23..a006fa06b8 100644 --- a/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts +++ b/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; -import { RefreshSourceGeneratorsNotification } from '../server/roslynProtocol.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; +import { RefreshSourceGeneratorsNotification } from '../server/roslynProtocol'; export function registerSourceGeneratorRefresh( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/handlers/showToastNotification.ts b/src/lsptoolshost/handlers/showToastNotification.ts index 4da2fbb66f..e11f52d1b9 100644 --- a/src/lsptoolshost/handlers/showToastNotification.ts +++ b/src/lsptoolshost/handlers/showToastNotification.ts @@ -4,14 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageClient } from '../server/roslynLanguageClient.js'; +import { RoslynLanguageClient } from '../server/roslynLanguageClient'; import { MessageType } from 'vscode-languageclient'; -import { ShowToastNotification } from '../server/roslynProtocol.js'; -import { - showErrorMessage, - showInformationMessage, - showWarningMessage, -} from '../../shared/observers/utils/showMessage.js'; +import { ShowToastNotification } from '../server/roslynProtocol'; +import { showErrorMessage, showInformationMessage, showWarningMessage } from '../../shared/observers/utils/showMessage'; export function registerShowToastNotification(client: RoslynLanguageClient) { client.onNotification(ShowToastNotification.type, async (notification) => { diff --git a/src/lsptoolshost/logging/collectLogs.ts b/src/lsptoolshost/logging/collectLogs.ts index 4df967ca28..fff9750de0 100644 --- a/src/lsptoolshost/logging/collectLogs.ts +++ b/src/lsptoolshost/logging/collectLogs.ts @@ -6,9 +6,9 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage.js'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel'; import { DumpRequest, collectDumps, @@ -21,8 +21,8 @@ import { createActivityLogCapture, generateReadmeContent, LogsToCollect, -} from './loggingUtils.js'; -import { runDotnetTraceInTerminal } from './profiling.js'; +} from './loggingUtils'; +import { runDotnetTraceInTerminal } from './profiling'; /** Represents the types of data the user can choose to collect */ type CollectOption = 'activityLogs' | 'performanceTrace' | 'memoryDump' | 'gcDump'; diff --git a/src/lsptoolshost/logging/loggingUtils.ts b/src/lsptoolshost/logging/loggingUtils.ts index 7b234b8146..33e1d3b6ee 100644 --- a/src/lsptoolshost/logging/loggingUtils.ts +++ b/src/lsptoolshost/logging/loggingUtils.ts @@ -7,10 +7,10 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import archiver from 'archiver'; -import { execChildProcess } from '../../common.js'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel.js'; -import { ActivityLogCapture, ActivityLogResult } from '../../csharpExtensionExports.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { execChildProcess } from '../../common'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel'; +import { ActivityLogCapture, ActivityLogResult } from '../../csharpExtensionExports'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; /** * Configuration for a dump tool. diff --git a/src/lsptoolshost/logging/profiling.ts b/src/lsptoolshost/logging/profiling.ts index 33d8e74bb5..0ed2d5cb0d 100644 --- a/src/lsptoolshost/logging/profiling.ts +++ b/src/lsptoolshost/logging/profiling.ts @@ -7,7 +7,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import { EOL } from 'os'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel.js'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel'; const TraceTerminalName = 'dotnet-trace'; diff --git a/src/lsptoolshost/options/configurationMiddleware.ts b/src/lsptoolshost/options/configurationMiddleware.ts index 528676c55e..e8bfc1bd89 100644 --- a/src/lsptoolshost/options/configurationMiddleware.ts +++ b/src/lsptoolshost/options/configurationMiddleware.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { ConfigurationParams } from 'vscode-languageclient'; -import { convertServerOptionNameToClientConfigurationName as convertServerOptionNameToClientConfigurationName } from './optionNameConverter.js'; -import { readEquivalentVsCodeConfiguration } from './universalEditorConfigProvider.js'; +import { convertServerOptionNameToClientConfigurationName as convertServerOptionNameToClientConfigurationName } from './optionNameConverter'; +import { readEquivalentVsCodeConfiguration } from './universalEditorConfigProvider'; export function readConfigurations(params: ConfigurationParams): (string | null)[] { // Note: null means there is no such configuration in client. diff --git a/src/lsptoolshost/options/optionChanges.ts b/src/lsptoolshost/options/optionChanges.ts index 5596ef9489..0bc5f878d4 100644 --- a/src/lsptoolshost/options/optionChanges.ts +++ b/src/lsptoolshost/options/optionChanges.ts @@ -5,14 +5,10 @@ import * as vscode from 'vscode'; import { Observable } from 'rxjs'; -import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../../shared/options.js'; -import { - HandleOptionChanges, - OptionChangeObserver, - OptionChanges, -} from '../../shared/observers/optionChangeObserver.js'; -import Disposable from '../../disposable.js'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.js'; +import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../../shared/options'; +import { HandleOptionChanges, OptionChangeObserver, OptionChanges } from '../../shared/observers/optionChangeObserver'; +import Disposable from '../../disposable'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; export function registerLanguageServerOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { diff --git a/src/lsptoolshost/projectContext/projectContextCommands.ts b/src/lsptoolshost/projectContext/projectContextCommands.ts index 2acfc515a7..4715f74ab5 100644 --- a/src/lsptoolshost/projectContext/projectContextCommands.ts +++ b/src/lsptoolshost/projectContext/projectContextCommands.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { isRelevantDocument } from './projectContextService.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { VSProjectContext } from '../server/roslynProtocol.js'; +import { isRelevantDocument } from './projectContextService'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { VSProjectContext } from '../server/roslynProtocol'; import { CancellationToken } from 'vscode-languageclient'; export const changeProjectContextCommandName = 'csharp.changeProjectContext'; diff --git a/src/lsptoolshost/projectContext/projectContextFeature.ts b/src/lsptoolshost/projectContext/projectContextFeature.ts index a3d91df426..e8759839fc 100644 --- a/src/lsptoolshost/projectContext/projectContextFeature.ts +++ b/src/lsptoolshost/projectContext/projectContextFeature.ts @@ -22,7 +22,7 @@ import { TextDocumentRegistrationOptions, } from 'vscode-languageclient'; -import * as RoslynProtocol from '../server/roslynProtocol.js'; +import * as RoslynProtocol from '../server/roslynProtocol'; import { randomUUID } from 'crypto'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/projectContext/projectContextService.ts b/src/lsptoolshost/projectContext/projectContextService.ts index dc7b5828bb..53df227d52 100644 --- a/src/lsptoolshost/projectContext/projectContextService.ts +++ b/src/lsptoolshost/projectContext/projectContextService.ts @@ -4,20 +4,20 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; import { ProjectContextRefreshRequest, VSGetProjectContextsRequest, VSProjectContext, VSProjectContextList, -} from '../server/roslynProtocol.js'; +} from '../server/roslynProtocol'; import { TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter.js'; -import { LanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; -import { RoslynLanguageClient } from '../server/roslynLanguageClient.js'; -import { languageServerOptions } from '../../shared/options.js'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.js'; -import { RazorLanguage } from '../../razor/src/razorLanguage.js'; +import { UriConverter } from '../utils/uriConverter'; +import { LanguageServerEvents, ServerState } from '../server/languageServerEvents'; +import { RoslynLanguageClient } from '../server/roslynLanguageClient'; +import { languageServerOptions } from '../../shared/options'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; +import { RazorLanguage } from '../../razor/src/razorLanguage'; export interface ProjectContextChangeEvent { document: vscode.TextDocument; diff --git a/src/lsptoolshost/projectContext/projectContextStatus.ts b/src/lsptoolshost/projectContext/projectContextStatus.ts index 5dc66fce74..7c3028962a 100644 --- a/src/lsptoolshost/projectContext/projectContextStatus.ts +++ b/src/lsptoolshost/projectContext/projectContextStatus.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { languageServerOptions } from '../../shared/options.js'; -import { RazorLanguage } from '../../razor/src/razorLanguage.js'; -import { ServerState } from '../server/languageServerEvents.js'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { languageServerOptions } from '../../shared/options'; +import { RazorLanguage } from '../../razor/src/razorLanguage'; +import { ServerState } from '../server/languageServerEvents'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; export class ProjectContextStatus { static createStatusItem(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { diff --git a/src/lsptoolshost/projectRestore/restore.ts b/src/lsptoolshost/projectRestore/restore.ts index 2763c923db..dbabc0b2d1 100644 --- a/src/lsptoolshost/projectRestore/restore.ts +++ b/src/lsptoolshost/projectRestore/restore.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { RestorableProjects, RestoreParams, RestoreRequest } from '../server/roslynProtocol.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RestorableProjects, RestoreParams, RestoreRequest } from '../server/roslynProtocol'; import path from 'path'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage.js'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; import { CancellationToken } from 'vscode-languageclient'; let _restoreInProgress = false; diff --git a/src/lsptoolshost/razor/documentContentsRequest.ts b/src/lsptoolshost/razor/documentContentsRequest.ts index 9843b947b3..ea9584b05f 100644 --- a/src/lsptoolshost/razor/documentContentsRequest.ts +++ b/src/lsptoolshost/razor/documentContentsRequest.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { TextDocumentIdentifier } from 'vscode-languageclient'; -import { GeneratedDocumentKind } from './generatedDocumentKind.js'; +import { GeneratedDocumentKind } from './generatedDocumentKind'; export class DocumentContentsRequest { constructor( diff --git a/src/lsptoolshost/razor/htmlDocument.ts b/src/lsptoolshost/razor/htmlDocument.ts index 1357ef0d25..e39f2e9773 100644 --- a/src/lsptoolshost/razor/htmlDocument.ts +++ b/src/lsptoolshost/razor/htmlDocument.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getUriPath } from '../../razor/src/uriPaths.js'; +import { getUriPath } from '../../razor/src/uriPaths'; export class HtmlDocument { public readonly path: string; diff --git a/src/lsptoolshost/razor/htmlDocumentContentProvider.ts b/src/lsptoolshost/razor/htmlDocumentContentProvider.ts index 17e6e43f76..1401a6d05e 100644 --- a/src/lsptoolshost/razor/htmlDocumentContentProvider.ts +++ b/src/lsptoolshost/razor/htmlDocumentContentProvider.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; -import { HtmlDocumentManager } from './htmlDocumentManager.js'; -import { getUriPath } from '../../razor/src/uriPaths.js'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; +import { HtmlDocumentManager } from './htmlDocumentManager'; +import { getUriPath } from '../../razor/src/uriPaths'; export class HtmlDocumentContentProvider implements vscode.TextDocumentContentProvider { public static readonly scheme = 'razor-html'; diff --git a/src/lsptoolshost/razor/htmlDocumentManager.ts b/src/lsptoolshost/razor/htmlDocumentManager.ts index 72fdd431e2..69f0f8531b 100644 --- a/src/lsptoolshost/razor/htmlDocumentManager.ts +++ b/src/lsptoolshost/razor/htmlDocumentManager.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { PlatformInformation } from '../../shared/platform.js'; -import { getUriPath } from '../../razor/src/uriPaths.js'; -import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider.js'; -import { HtmlDocument } from './htmlDocument.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; +import { PlatformInformation } from '../../shared/platform'; +import { getUriPath } from '../../razor/src/uriPaths'; +import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider'; +import { HtmlDocument } from './htmlDocument'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; import { RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter.js'; +import { UriConverter } from '../utils/uriConverter'; const virtualHtmlSuffix = '__virtual.html'; diff --git a/src/lsptoolshost/razor/razorEndpoints.ts b/src/lsptoolshost/razor/razorEndpoints.ts index 6fba7a97c5..3c619c4f18 100644 --- a/src/lsptoolshost/razor/razorEndpoints.ts +++ b/src/lsptoolshost/razor/razorEndpoints.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; import { ColorPresentationRequest, CompletionRequest, @@ -29,21 +29,21 @@ import { SignatureHelp, SignatureHelpRequest, } from 'vscode-languageclient'; -import { HtmlUpdateParameters } from './htmlUpdateParameters.js'; -import { UriConverter } from '../utils/uriConverter.js'; -import { PlatformInformation } from '../../shared/platform.js'; -import { HtmlDocumentManager } from './htmlDocumentManager.js'; -import { DocumentColorHandler } from '../../razor/src/documentColor/documentColorHandler.js'; -import { ColorPresentationHandler } from '../../razor/src/colorPresentation/colorPresentationHandler.js'; -import { convertRangeToSerializable } from '../../razor/src/rpc/serializableRange.js'; -import { FoldingRangeHandler } from '../../razor/src/folding/foldingRangeHandler.js'; -import { CompletionHandler } from '../../razor/src/completion/completionHandler.js'; -import { FormattingHandler } from '../../razor/src/formatting/formattingHandler.js'; -import { HtmlDocument } from './htmlDocument.js'; -import { HtmlForwardedRequest } from './htmlForwardedRequest.js'; -import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider.js'; -import { ShowGeneratedDocumentCommand } from './showGeneratedDocumentCommand.js'; -import { RazorLanguageConfiguration } from '../../razor/src/razorLanguageConfiguration.js'; +import { HtmlUpdateParameters } from './htmlUpdateParameters'; +import { UriConverter } from '../utils/uriConverter'; +import { PlatformInformation } from '../../shared/platform'; +import { HtmlDocumentManager } from './htmlDocumentManager'; +import { DocumentColorHandler } from '../../razor/src/documentColor/documentColorHandler'; +import { ColorPresentationHandler } from '../../razor/src/colorPresentation/colorPresentationHandler'; +import { convertRangeToSerializable } from '../../razor/src/rpc/serializableRange'; +import { FoldingRangeHandler } from '../../razor/src/folding/foldingRangeHandler'; +import { CompletionHandler } from '../../razor/src/completion/completionHandler'; +import { FormattingHandler } from '../../razor/src/formatting/formattingHandler'; +import { HtmlDocument } from './htmlDocument'; +import { HtmlForwardedRequest } from './htmlForwardedRequest'; +import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider'; +import { ShowGeneratedDocumentCommand } from './showGeneratedDocumentCommand'; +import { RazorLanguageConfiguration } from '../../razor/src/razorLanguageConfiguration'; export function registerRazorEndpoints( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts b/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts index a52730152d..de5f8afab9 100644 --- a/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts +++ b/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RazorLanguage } from '../../razor/src/razorLanguage.js'; -import { getUriPath } from '../../razor/src/uriPaths.js'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { DocumentContentsRequest } from './documentContentsRequest.js'; +import { RazorLanguage } from '../../razor/src/razorLanguage'; +import { getUriPath } from '../../razor/src/uriPaths'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { DocumentContentsRequest } from './documentContentsRequest'; import { CancellationToken, RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter.js'; -import { GeneratedDocumentKind } from './generatedDocumentKind.js'; +import { UriConverter } from '../utils/uriConverter'; +import { GeneratedDocumentKind } from './generatedDocumentKind'; export class ShowGeneratedDocumentCommand { private static requestType = new RequestType( diff --git a/src/lsptoolshost/server/languageServerEvents.ts b/src/lsptoolshost/server/languageServerEvents.ts index 3f06222ed5..3aa9756ef3 100644 --- a/src/lsptoolshost/server/languageServerEvents.ts +++ b/src/lsptoolshost/server/languageServerEvents.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IDisposable } from '../../disposable.js'; +import { IDisposable } from '../../disposable'; export enum ServerState { Stopped = 0, diff --git a/src/lsptoolshost/server/roslynLanguageClient.ts b/src/lsptoolshost/server/roslynLanguageClient.ts index 3b371114a5..d063636fea 100644 --- a/src/lsptoolshost/server/roslynLanguageClient.ts +++ b/src/lsptoolshost/server/roslynLanguageClient.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; import { CancellationToken, ErrorHandler, LanguageClientOptions, MessageSignature, State } from 'vscode-languageclient'; -import CompositeDisposable from '../../compositeDisposable.js'; -import { IDisposable } from '../../disposable.js'; -import { languageServerOptions } from '../../shared/options.js'; -import { RoslynLspErrorCodes } from './roslynProtocol.js'; -import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage.js'; -import { ITelemetryReporter } from '../../shared/telemetryReporter.js'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames.js'; +import CompositeDisposable from '../../compositeDisposable'; +import { IDisposable } from '../../disposable'; +import { languageServerOptions } from '../../shared/options'; +import { RoslynLspErrorCodes } from './roslynProtocol'; +import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage'; +import { ITelemetryReporter } from '../../shared/telemetryReporter'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames'; /** * Implementation of the base LanguageClient type that allows for additional items to be disposed of diff --git a/src/lsptoolshost/server/roslynLanguageServer.ts b/src/lsptoolshost/server/roslynLanguageServer.ts index 58d3ddf2cb..c59110efc3 100644 --- a/src/lsptoolshost/server/roslynLanguageServer.ts +++ b/src/lsptoolshost/server/roslynLanguageServer.ts @@ -23,37 +23,37 @@ import { Trace, } from 'vscode-languageclient'; import { Executable, TransportKind } from 'vscode-languageclient/node'; -import { PlatformInformation } from '../../shared/platform.js'; -import { readConfigurations } from '../options/configurationMiddleware.js'; -import * as RoslynProtocol from './roslynProtocol.js'; -import { CSharpDevKitExports } from '../../csharpDevKitExports.js'; -import { SolutionSnapshotId } from '../solutionSnapshot/ISolutionSnapshotProvider.js'; -import { ITelemetryReporterWithLevel } from '../../shared/telemetryReporter.js'; -import { csharpDevkitExtensionId, getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +import { PlatformInformation } from '../../shared/platform'; +import { readConfigurations } from '../options/configurationMiddleware'; +import * as RoslynProtocol from './roslynProtocol'; +import { CSharpDevKitExports } from '../../csharpDevKitExports'; +import { SolutionSnapshotId } from '../solutionSnapshot/ISolutionSnapshotProvider'; +import { ITelemetryReporterWithLevel } from '../../shared/telemetryReporter'; +import { csharpDevkitExtensionId, getCSharpDevKit } from '../../utils/getCSharpDevKit'; import { randomUUID } from 'crypto'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; -import { RoslynLanguageClient } from './roslynLanguageClient.js'; -import { provideDiagnostics, provideWorkspaceDiagnostics } from '../diagnostics/diagnosticMiddleware.js'; -import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration.js'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.js'; -import { DotnetInfo } from '../../shared/utils/dotnetInfo.js'; -import { RoslynLanguageServerEvents, ServerState } from './languageServerEvents.js'; -import { registerShowToastNotification } from '../handlers/showToastNotification.js'; -import { registerOnAutoInsert } from '../autoInsert/onAutoInsert.js'; -import { commonOptions, languageServerOptions, omnisharpOptions } from '../../shared/options.js'; -import { VSTextDocumentIdentifier } from './roslynProtocol.js'; -import { IDisposable } from '../../disposable.js'; -import { BuildDiagnosticsService } from '../diagnostics/buildDiagnosticsService.js'; -import { getComponentPaths } from '../extensions/builtInComponents.js'; -import { OnAutoInsertFeature } from '../autoInsert/onAutoInsertFeature.js'; -import { ProjectContextService } from '../projectContext/projectContextService.js'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.js'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames.js'; -import { getProfilingEnvVars } from '../logging/profiling.js'; -import { getServerPath } from '../activate.js'; -import { UriConverter } from '../utils/uriConverter.js'; -import { ProjectContextFeature } from '../projectContext/projectContextFeature.js'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; +import { RoslynLanguageClient } from './roslynLanguageClient'; +import { provideDiagnostics, provideWorkspaceDiagnostics } from '../diagnostics/diagnosticMiddleware'; +import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; +import { DotnetInfo } from '../../shared/utils/dotnetInfo'; +import { RoslynLanguageServerEvents, ServerState } from './languageServerEvents'; +import { registerShowToastNotification } from '../handlers/showToastNotification'; +import { registerOnAutoInsert } from '../autoInsert/onAutoInsert'; +import { commonOptions, languageServerOptions, omnisharpOptions } from '../../shared/options'; +import { VSTextDocumentIdentifier } from './roslynProtocol'; +import { IDisposable } from '../../disposable'; +import { BuildDiagnosticsService } from '../diagnostics/buildDiagnosticsService'; +import { getComponentPaths } from '../extensions/builtInComponents'; +import { OnAutoInsertFeature } from '../autoInsert/onAutoInsertFeature'; +import { ProjectContextService } from '../projectContext/projectContextService'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames'; +import { getProfilingEnvVars } from '../logging/profiling'; +import { getServerPath } from '../activate'; +import { UriConverter } from '../utils/uriConverter'; +import { ProjectContextFeature } from '../projectContext/projectContextFeature'; // Flag indicating if C# Devkit was installed the last time we activated. // Used to determine if we need to restart the server on extension changes. diff --git a/src/lsptoolshost/server/roslynProtocol.ts b/src/lsptoolshost/server/roslynProtocol.ts index 7d155b93d0..d54d74c6c6 100644 --- a/src/lsptoolshost/server/roslynProtocol.ts +++ b/src/lsptoolshost/server/roslynProtocol.ts @@ -25,7 +25,7 @@ import { URI, WorkDoneProgressParams, } from 'vscode-languageclient'; -import { ProjectConfigurationMessage } from '../../shared/projectConfiguration.js'; +import { ProjectConfigurationMessage } from '../../shared/projectConfiguration'; export interface VSProjectContextList { _vs_projectContexts: VSProjectContext[]; diff --git a/src/lsptoolshost/server/serverCommands.ts b/src/lsptoolshost/server/serverCommands.ts index eaae7174f3..17cf5914a6 100644 --- a/src/lsptoolshost/server/serverCommands.ts +++ b/src/lsptoolshost/server/serverCommands.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { UriConverter } from '../utils/uriConverter.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { UriConverter } from '../utils/uriConverter'; import * as languageClient from 'vscode-languageclient'; /** diff --git a/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts b/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts index 77c7ef1580..f0da662abc 100644 --- a/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts +++ b/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts @@ -11,7 +11,7 @@ import { ServiceMoniker, ServiceRegistration, } from '@microsoft/servicehub-framework'; -import Descriptors from '../solutionSnapshot/descriptors.js'; +import Descriptors from '../solutionSnapshot/descriptors'; export class CSharpExtensionServiceBroker extends GlobalBrokeredServiceContainer { registerExternalServices(...monikers: ServiceMoniker[]) { diff --git a/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts b/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts index 76c7520768..f346bed7ac 100644 --- a/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts +++ b/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider'; /** * Brokered service implementation. diff --git a/src/lsptoolshost/testing/unitTesting.ts b/src/lsptoolshost/testing/unitTesting.ts index 714dadf3c3..f6a396ba02 100644 --- a/src/lsptoolshost/testing/unitTesting.ts +++ b/src/lsptoolshost/testing/unitTesting.ts @@ -7,12 +7,12 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import * as languageClient from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from '../server/roslynProtocol.js'; -import { commonOptions } from '../../shared/options.js'; -import { UriConverter } from '../utils/uriConverter.js'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage.js'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from '../server/roslynProtocol'; +import { commonOptions } from '../../shared/options'; +import { UriConverter } from '../utils/uriConverter'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; export function registerUnitTestingCommands(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { if (getCSharpDevKit()) { diff --git a/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts b/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts index cf699e4793..d1c5833328 100644 --- a/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts +++ b/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import * as crypto from 'crypto'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { ActionOption, showWarningMessage } from '../../shared/observers/utils/showMessage.js'; -import { languageServerOptions } from '../../shared/options.js'; -import { ServerState } from '../server/languageServerEvents.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { ActionOption, showWarningMessage } from '../../shared/observers/utils/showMessage'; +import { languageServerOptions } from '../../shared/options'; +import { ServerState } from '../server/languageServerEvents'; const SuppressMiscellaneousFilesToastsOption = 'dotnet.server.suppressMiscellaneousFilesToasts'; const NotifiedDocuments = new Set(); diff --git a/src/lsptoolshost/workspace/workspaceCommands.ts b/src/lsptoolshost/workspace/workspaceCommands.ts index a3b9de19c8..73ee7764d1 100644 --- a/src/lsptoolshost/workspace/workspaceCommands.ts +++ b/src/lsptoolshost/workspace/workspaceCommands.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer.js'; -import { createLaunchTargetForSolution } from '../../shared/launchTarget.js'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit.js'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { createLaunchTargetForSolution } from '../../shared/launchTarget'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; /** * Register commands that drive the workspace. diff --git a/src/lsptoolshost/workspace/workspaceStatus.ts b/src/lsptoolshost/workspace/workspaceStatus.ts index cd1962b867..f23c81f9d3 100644 --- a/src/lsptoolshost/workspace/workspaceStatus.ts +++ b/src/lsptoolshost/workspace/workspaceStatus.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents.js'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.js'; -import { languageServerOptions } from '../../shared/options.js'; +import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; +import { languageServerOptions } from '../../shared/options'; export class WorkspaceStatus { static createStatusItem(context: vscode.ExtensionContext, languageServerEvents: RoslynLanguageServerEvents) { diff --git a/src/main.ts b/src/main.ts index 280b475474..9976fe7885 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,36 +3,33 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as coreclrdebug from './coreclrDebug/activate.js'; -import * as util from './common.js'; +import * as coreclrdebug from './coreclrDebug/activate'; +import * as util from './common'; import * as vscode from 'vscode'; -import { ActivationFailure } from './shared/loggingEvents.js'; -import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver.js'; -import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver.js'; -import { EventStream } from './eventStream.js'; -import { PlatformInformation } from './shared/platform.js'; +import { ActivationFailure } from './shared/loggingEvents'; +import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver'; +import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver'; +import { EventStream } from './eventStream'; +import { PlatformInformation } from './shared/platform'; import telemetryReporterModule from '@vscode/extension-telemetry'; -import { vscodeNetworkSettingsProvider } from './networkSettings.js'; -import createOptionStream from './shared/observables/createOptionStream.js'; -import { AbsolutePathPackage } from './packageManager/absolutePathPackage.js'; -import { IInstallDependencies } from './packageManager/IInstallDependencies.js'; -import { installRuntimeDependencies } from './installRuntimeDependencies.js'; -import { MigrateOptions } from './shared/migrateOptions.js'; -import { - CSharpExtensionExports, - LimitedExtensionExports, - OmnisharpExtensionExports, -} from './csharpExtensionExports.js'; -import { getCSharpDevKit } from './utils/getCSharpDevKit.js'; -import { commonOptions, omnisharpOptions } from './shared/options.js'; -import { TelemetryEventNames } from './shared/telemetryEventNames.js'; -import { checkDotNetRuntimeExtensionVersion } from './checkDotNetRuntimeExtensionVersion.js'; -import { checkIsSupportedPlatform } from './checkSupportedPlatform.js'; -import { activateRoslyn } from './activateRoslyn.js'; -import { LimitedActivationStatus } from './shared/limitedActivationStatus.js'; - -const TelemetryReporter = telemetryReporterModule.default; +import { vscodeNetworkSettingsProvider } from './networkSettings'; +import createOptionStream from './shared/observables/createOptionStream'; +import { AbsolutePathPackage } from './packageManager/absolutePathPackage'; +import { IInstallDependencies } from './packageManager/IInstallDependencies'; +import { installRuntimeDependencies } from './installRuntimeDependencies'; +import { MigrateOptions } from './shared/migrateOptions'; +import { CSharpExtensionExports, LimitedExtensionExports, OmnisharpExtensionExports } from './csharpExtensionExports'; +import { getCSharpDevKit } from './utils/getCSharpDevKit'; +import { commonOptions, omnisharpOptions } from './shared/options'; +import { TelemetryEventNames } from './shared/telemetryEventNames'; +import { checkDotNetRuntimeExtensionVersion } from './checkDotNetRuntimeExtensionVersion'; +import { checkIsSupportedPlatform } from './checkSupportedPlatform'; +import { activateRoslyn } from './activateRoslyn'; +import { LimitedActivationStatus } from './shared/limitedActivationStatus'; + +// The package ships CommonJS with its constructor on exports.default; esbuild preserves that nested shape. +const TelemetryReporter = (telemetryReporterModule as unknown as { default: typeof telemetryReporterModule }).default; export async function activate( context: vscode.ExtensionContext @@ -91,8 +88,8 @@ export async function activate( const installDependencies: IInstallDependencies = async (dependencies: AbsolutePathPackage[]) => { // Defer loading the download/zip stack (yauzl, proxy agents, fs-extra, etc.) until a // component actually needs to be downloaded, which normally never happens after install. - const { downloadAndInstallPackages } = await import('./packageManager/downloadAndInstallPackages.js'); - const { isValidDownload } = await import('./packageManager/isValidDownload.js'); + const { downloadAndInstallPackages } = await import('./packageManager/downloadAndInstallPackages'); + const { isValidDownload } = await import('./packageManager/isValidDownload'); return downloadAndInstallPackages( dependencies, networkSettingsProvider, @@ -158,7 +155,7 @@ export async function activate( } else { // Defer loading the OmniSharp implementation and its module graph until we actually // activate it, so the default Roslyn activations don't pay to compile/execute it. - const { activateOmniSharp } = await import('./activateOmniSharp.js'); + const { activateOmniSharp } = await import('./activateOmniSharp'); exports = activateOmniSharp( context, platformInfo, diff --git a/src/networkSettings.ts b/src/networkSettings.ts index a6002be0a7..f94e0b5f23 100644 --- a/src/networkSettings.ts +++ b/src/networkSettings.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from './vscodeAdapter.js'; +import { vscode } from './vscodeAdapter'; export default class NetworkSettings { constructor( diff --git a/src/omnisharp/dotnetResolver.ts b/src/omnisharp/dotnetResolver.ts index 2f6b1a68f9..741f42254e 100644 --- a/src/omnisharp/dotnetResolver.ts +++ b/src/omnisharp/dotnetResolver.ts @@ -7,10 +7,10 @@ import { exec } from 'child_process'; import * as path from 'path'; import * as semver from 'semver'; import { promisify } from 'util'; -import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation.js'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; -import { PlatformInformation } from '../shared/platform.js'; -import { omnisharpOptions } from '../shared/options.js'; +import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { PlatformInformation } from '../shared/platform'; +import { omnisharpOptions } from '../shared/options'; export class DotnetResolver implements IHostExecutableResolver { private readonly minimumDotnetVersion = '6.0.100'; diff --git a/src/omnisharp/engines/IEngine.ts b/src/omnisharp/engines/IEngine.ts index d75d5101b6..48affd1778 100644 --- a/src/omnisharp/engines/IEngine.ts +++ b/src/omnisharp/engines/IEngine.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CancellationToken } from '../../vscodeAdapter.js'; -import { LaunchTarget } from '../../shared/launchTarget.js'; -import Disposable from '../../disposable.js'; -import { OmniSharpServer } from '../server.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { Advisor } from '../features/diagnosticsProvider.js'; -import TestManager from '../features/dotnetTest.js'; -import { EventStream } from '../../eventStream.js'; +import { CancellationToken } from '../../vscodeAdapter'; +import { LaunchTarget } from '../../shared/launchTarget'; +import Disposable from '../../disposable'; +import { OmniSharpServer } from '../server'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { Advisor } from '../features/diagnosticsProvider'; +import TestManager from '../features/dotnetTest'; +import { EventStream } from '../../eventStream'; export interface IEngine { start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string): Promise; diff --git a/src/omnisharp/engines/lspEngine.ts b/src/omnisharp/engines/lspEngine.ts index 3d63ddac69..d62dd3b953 100644 --- a/src/omnisharp/engines/lspEngine.ts +++ b/src/omnisharp/engines/lspEngine.ts @@ -3,22 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol.js'; -import { CancellationToken } from '../../vscodeAdapter.js'; -import { configure } from '../launcher.js'; -import { LaunchTarget } from '../../shared/launchTarget.js'; +import * as protocol from '../protocol'; +import { CancellationToken } from '../../vscodeAdapter'; +import { configure } from '../launcher'; +import { LaunchTarget } from '../../shared/launchTarget'; import { EventEmitter } from 'events'; import { setTimeout } from 'timers'; -import * as ObservableEvents from '../omnisharpLoggingEvents.js'; -import { EventStream } from '../../eventStream.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import Disposable from '../../disposable.js'; +import * as ObservableEvents from '../omnisharpLoggingEvents'; +import { EventStream } from '../../eventStream'; +import CompositeDisposable from '../../compositeDisposable'; +import Disposable from '../../disposable'; import { ExtensionContext, CancellationTokenSource, LogOutputChannel, Location, CodeLens, Uri } from 'vscode'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { Events, OmniSharpServer } from '../server.js'; -import { IEngine } from './IEngine.js'; -import { PlatformInformation } from '../../shared/platform.js'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { Events, OmniSharpServer } from '../server'; +import { IEngine } from './IEngine'; +import { PlatformInformation } from '../../shared/platform'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; import { CallHierarchyPrepareRequest, Command, @@ -38,8 +38,8 @@ import { TypeHierarchyPrepareRequest, } from 'vscode-languageclient'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; -import { Advisor } from '../features/diagnosticsProvider.js'; -import dotnetTest from '../features/dotnetTest.js'; +import { Advisor } from '../features/diagnosticsProvider'; +import dotnetTest from '../features/dotnetTest'; export class LspEngine implements IEngine { client: LanguageClient | undefined; diff --git a/src/omnisharp/engines/stdioEngine.ts b/src/omnisharp/engines/stdioEngine.ts index dd151a7eba..5fa9640d8e 100644 --- a/src/omnisharp/engines/stdioEngine.ts +++ b/src/omnisharp/engines/stdioEngine.ts @@ -3,52 +3,52 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol.js'; -import * as utils from '../../common.js'; -import { CancellationToken } from '../../vscodeAdapter.js'; +import * as protocol from '../protocol'; +import * as utils from '../../common'; +import { CancellationToken } from '../../vscodeAdapter'; import { ChildProcess, exec } from 'child_process'; -import { LaunchTarget } from '../../shared/launchTarget.js'; +import { LaunchTarget } from '../../shared/launchTarget'; import { ReadLine, createInterface } from 'readline'; -import { Request, RequestQueueCollection } from '../requestQueue.js'; +import { Request, RequestQueueCollection } from '../requestQueue'; import { EventEmitter } from 'events'; -import { omnisharpOptions } from '../../shared/options.js'; -import { PlatformInformation } from '../../shared/platform.js'; -import { launchOmniSharp } from '../launcher.js'; +import { omnisharpOptions } from '../../shared/options'; +import { PlatformInformation } from '../../shared/platform'; +import { launchOmniSharp } from '../launcher'; import { setTimeout } from 'timers'; -import * as ObservableEvents from '../omnisharpLoggingEvents.js'; -import { EventStream } from '../../eventStream.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import Disposable from '../../disposable.js'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; -import { removeBOMFromBuffer, removeBOMFromString } from '../../utils/removeBom.js'; -import { IEngine } from './IEngine.js'; -import { Events, OmniSharpServer } from '../server.js'; -import DefinitionMetadataDocumentProvider from '../features/definitionMetadataDocumentProvider.js'; -import SourceGeneratedDocumentProvider from '../features/sourceGeneratedDocumentProvider.js'; +import * as ObservableEvents from '../omnisharpLoggingEvents'; +import { EventStream } from '../../eventStream'; +import CompositeDisposable from '../../compositeDisposable'; +import Disposable from '../../disposable'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; +import { removeBOMFromBuffer, removeBOMFromString } from '../../utils/removeBom'; +import { IEngine } from './IEngine'; +import { Events, OmniSharpServer } from '../server'; +import DefinitionMetadataDocumentProvider from '../features/definitionMetadataDocumentProvider'; +import SourceGeneratedDocumentProvider from '../features/sourceGeneratedDocumentProvider'; import * as vscode from 'vscode'; -import OmniSharpCodeLensProvider from '../features/codeLensProvider.js'; -import OmniSharpDocumentHighlightProvider from '../features/documentHighlightProvider.js'; -import OmniSharpDocumentSymbolProvider from '../features/documentSymbolProvider.js'; -import OmniSharpHoverProvider from '../features/hoverProvider.js'; -import OmniSharpRenameProvider from '../features/renameProvider.js'; -import OmniSharpFormatProvider from '../features/formattingEditProvider.js'; -import OmniSharpWorkspaceSymbolProvider from '../features/workspaceSymbolProvider.js'; -import OmniSharpSignatureHelpProvider from '../features/signatureHelpProvider.js'; -import { OmniSharpFixAllProvider } from '../features/fixAllProvider.js'; -import OmniSharpCompletionProvider, { CompletionAfterInsertCommand } from '../features/completionProvider.js'; -import OmniSharpReferenceProvider from '../features/referenceProvider.js'; -import OmniSharpImplementationProvider from '../features/implementationProvider.js'; -import OmniSharpSemanticTokensProvider from '../features/semanticTokensProvider.js'; -import OmniSharpInlayHintProvider from '../features/inlayHintProvider.js'; -import fileOpenClose from '../features/fileOpenCloseProvider.js'; -import trackVirtualDocuments from '../features/virtualDocumentTracker.js'; -import OmniSharpCodeActionProvider from '../features/codeActionProvider.js'; -import forwardChanges from '../features/changeForwarding.js'; -import OmniSharpDefinitionProvider from '../features/definitionProvider.js'; -import reportDiagnostics, { Advisor } from '../features/diagnosticsProvider.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import TestManager from '../features/dotnetTest.js'; -import { OmniSharpStructureProvider } from '../features/structureProvider.js'; +import OmniSharpCodeLensProvider from '../features/codeLensProvider'; +import OmniSharpDocumentHighlightProvider from '../features/documentHighlightProvider'; +import OmniSharpDocumentSymbolProvider from '../features/documentSymbolProvider'; +import OmniSharpHoverProvider from '../features/hoverProvider'; +import OmniSharpRenameProvider from '../features/renameProvider'; +import OmniSharpFormatProvider from '../features/formattingEditProvider'; +import OmniSharpWorkspaceSymbolProvider from '../features/workspaceSymbolProvider'; +import OmniSharpSignatureHelpProvider from '../features/signatureHelpProvider'; +import { OmniSharpFixAllProvider } from '../features/fixAllProvider'; +import OmniSharpCompletionProvider, { CompletionAfterInsertCommand } from '../features/completionProvider'; +import OmniSharpReferenceProvider from '../features/referenceProvider'; +import OmniSharpImplementationProvider from '../features/implementationProvider'; +import OmniSharpSemanticTokensProvider from '../features/semanticTokensProvider'; +import OmniSharpInlayHintProvider from '../features/inlayHintProvider'; +import fileOpenClose from '../features/fileOpenCloseProvider'; +import trackVirtualDocuments from '../features/virtualDocumentTracker'; +import OmniSharpCodeActionProvider from '../features/codeActionProvider'; +import forwardChanges from '../features/changeForwarding'; +import OmniSharpDefinitionProvider from '../features/definitionProvider'; +import reportDiagnostics, { Advisor } from '../features/diagnosticsProvider'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import TestManager from '../features/dotnetTest'; +import { OmniSharpStructureProvider } from '../features/structureProvider'; export class StdioEngine implements IEngine { private static _nextId = 1; diff --git a/src/omnisharp/features/abstractProvider.ts b/src/omnisharp/features/abstractProvider.ts index 05520298c1..02ae33c313 100644 --- a/src/omnisharp/features/abstractProvider.ts +++ b/src/omnisharp/features/abstractProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { OmniSharpServer } from '../server'; +import CompositeDisposable from '../../compositeDisposable'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; export default abstract class AbstractProvider { protected _server: OmniSharpServer; diff --git a/src/omnisharp/features/changeForwarding.ts b/src/omnisharp/features/changeForwarding.ts index 84686a5918..b07394c43b 100644 --- a/src/omnisharp/features/changeForwarding.ts +++ b/src/omnisharp/features/changeForwarding.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { Uri, workspace } from 'vscode'; -import { OmniSharpServer } from '../server.js'; -import * as serverUtils from '../utils.js'; -import { FileChangeType } from '../protocol.js'; -import { IDisposable } from '../../disposable.js'; -import CompositeDisposable from '../../compositeDisposable.js'; +import { OmniSharpServer } from '../server'; +import * as serverUtils from '../utils'; +import { FileChangeType } from '../protocol'; +import { IDisposable } from '../../disposable'; +import CompositeDisposable from '../../compositeDisposable'; function forwardDocumentChanges(server: OmniSharpServer): IDisposable { return workspace.onDidChangeTextDocument((event) => { diff --git a/src/omnisharp/features/codeActionProvider.ts b/src/omnisharp/features/codeActionProvider.ts index eade6470f0..736457a937 100644 --- a/src/omnisharp/features/codeActionProvider.ts +++ b/src/omnisharp/features/codeActionProvider.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { OmniSharpServer } from '../server.js'; -import AbstractProvider from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { buildEditForResponse } from '../fileOperationsResponseEditBuilder.js'; -import { omnisharpOptions } from '../../shared/options.js'; +import { OmniSharpServer } from '../server'; +import AbstractProvider from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import CompositeDisposable from '../../compositeDisposable'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { buildEditForResponse } from '../fileOperationsResponseEditBuilder'; +import { omnisharpOptions } from '../../shared/options'; export default class OmniSharpCodeActionProvider extends AbstractProvider diff --git a/src/omnisharp/features/codeLensProvider.ts b/src/omnisharp/features/codeLensProvider.ts index 202d7e13d4..be46b9bf63 100644 --- a/src/omnisharp/features/codeLensProvider.ts +++ b/src/omnisharp/features/codeLensProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; import * as vscode from 'vscode'; -import { toLocation } from '../typeConversion.js'; -import AbstractProvider from './abstractProvider.js'; -import { OmniSharpServer } from '../server.js'; -import { omnisharpOptions } from '../../shared/options.js'; -import TestManager from './dotnetTest.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; +import { toLocation } from '../typeConversion'; +import AbstractProvider from './abstractProvider'; +import { OmniSharpServer } from '../server'; +import { omnisharpOptions } from '../../shared/options'; +import TestManager from './dotnetTest'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; diff --git a/src/omnisharp/features/commands.ts b/src/omnisharp/features/commands.ts index ebbf730eb3..8f26d58031 100644 --- a/src/omnisharp/features/commands.ts +++ b/src/omnisharp/features/commands.ts @@ -3,30 +3,30 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server.js'; -import * as serverUtils from '../utils.js'; -import { findLaunchTargets } from '../launcher.js'; -import { LaunchTarget } from '../../shared/launchTarget.js'; +import { OmniSharpServer } from '../server'; +import * as serverUtils from '../utils'; +import { findLaunchTargets } from '../launcher'; +import { LaunchTarget } from '../../shared/launchTarget'; import * as cp from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; -import * as protocol from '../protocol.js'; +import * as protocol from '../protocol'; import * as vscode from 'vscode'; -import { generateAssets } from '../../shared/assets.js'; +import { generateAssets } from '../../shared/assets'; import { ShowOmniSharpChannel, CommandDotNetRestoreStart, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed, -} from '../omnisharpLoggingEvents.js'; -import { EventStream } from '../../eventStream.js'; -import { PlatformInformation } from '../../shared/platform.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import reportIssue from '../../shared/reportIssue.js'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.js'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.js'; -import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider.js'; +} from '../omnisharpLoggingEvents'; +import { EventStream } from '../../eventStream'; +import { PlatformInformation } from '../../shared/platform'; +import CompositeDisposable from '../../compositeDisposable'; +import reportIssue from '../../shared/reportIssue'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; +import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider'; export default function registerCommands( context: vscode.ExtensionContext, diff --git a/src/omnisharp/features/completionProvider.ts b/src/omnisharp/features/completionProvider.ts index b1fb64e81d..14ea102e35 100644 --- a/src/omnisharp/features/completionProvider.ts +++ b/src/omnisharp/features/completionProvider.ts @@ -20,18 +20,18 @@ import { workspace, CompletionItemLabel, } from 'vscode'; -import AbstractProvider from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; +import AbstractProvider from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; import { CompletionTriggerKind as LspCompletionTriggerKind, InsertTextFormat, CancellationToken, } from 'vscode-languageclient'; -import { createRequest } from '../typeConversion.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { OmniSharpServer } from '../server.js'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; +import { createRequest } from '../typeConversion'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { OmniSharpServer } from '../server'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker'; export const CompletionAfterInsertCommand = 'csharp.completion.afterInsert'; diff --git a/src/omnisharp/features/definitionMetadataDocumentProvider.ts b/src/omnisharp/features/definitionMetadataDocumentProvider.ts index cb6f7dfbe8..4c1bc653c8 100644 --- a/src/omnisharp/features/definitionMetadataDocumentProvider.ts +++ b/src/omnisharp/features/definitionMetadataDocumentProvider.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { TextDocument, TextDocumentContentProvider, Uri, workspace } from 'vscode'; -import { MetadataResponse } from '../protocol.js'; -import { IDisposable } from '../../disposable.js'; +import { MetadataResponse } from '../protocol'; +import { IDisposable } from '../../disposable'; export default class DefinitionMetadataDocumentProvider implements TextDocumentContentProvider, IDisposable { readonly scheme = 'omnisharp-metadata'; diff --git a/src/omnisharp/features/definitionProvider.ts b/src/omnisharp/features/definitionProvider.ts index 6273459cbb..a57ceb5921 100644 --- a/src/omnisharp/features/definitionProvider.ts +++ b/src/omnisharp/features/definitionProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils.js'; +import * as serverUtils from '../utils'; import { CancellationToken, TypeDefinitionProvider, @@ -19,13 +19,13 @@ import { MetadataRequest, MetadataSource, V2, -} from '../protocol.js'; -import { createRequest, toRange3, toVscodeLocation } from '../typeConversion.js'; -import AbstractSupport from './abstractProvider.js'; -import DefinitionMetadataOrSourceGeneratedDocumentProvider from './definitionMetadataDocumentProvider.js'; -import { OmniSharpServer } from '../server.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.js'; +} from '../protocol'; +import { createRequest, toRange3, toVscodeLocation } from '../typeConversion'; +import AbstractSupport from './abstractProvider'; +import DefinitionMetadataOrSourceGeneratedDocumentProvider from './definitionMetadataDocumentProvider'; +import { OmniSharpServer } from '../server'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; export default class OmniSharpDefinitionProvider extends AbstractSupport diff --git a/src/omnisharp/features/diagnosticsProvider.ts b/src/omnisharp/features/diagnosticsProvider.ts index a7fd56f1b1..2d31cbb0d8 100644 --- a/src/omnisharp/features/diagnosticsProvider.ts +++ b/src/omnisharp/features/diagnosticsProvider.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server.js'; -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { toRange } from '../typeConversion.js'; +import { OmniSharpServer } from '../server'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { toRange } from '../typeConversion'; import * as vscode from 'vscode'; -import CompositeDisposable from '../../compositeDisposable.js'; -import { IDisposable } from '../../disposable.js'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; -import { TextDocument } from '../../vscodeAdapter.js'; +import CompositeDisposable from '../../compositeDisposable'; +import { IDisposable } from '../../disposable'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +import { TextDocument } from '../../vscodeAdapter'; import { Subject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import { BackgroundDiagnosticStatus } from '../protocol.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { omnisharpOptions } from '../../shared/options.js'; +import { BackgroundDiagnosticStatus } from '../protocol'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { omnisharpOptions } from '../../shared/options'; export class Advisor { private _disposable: CompositeDisposable; diff --git a/src/omnisharp/features/documentHighlightProvider.ts b/src/omnisharp/features/documentHighlightProvider.ts index df77ac0d74..f93d1fcf8f 100644 --- a/src/omnisharp/features/documentHighlightProvider.ts +++ b/src/omnisharp/features/documentHighlightProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { createRequest, toRange } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { createRequest, toRange } from '../typeConversion'; import { DocumentHighlightProvider, DocumentHighlight, diff --git a/src/omnisharp/features/documentSymbolProvider.ts b/src/omnisharp/features/documentSymbolProvider.ts index 6e330aec88..88bacf3b9f 100644 --- a/src/omnisharp/features/documentSymbolProvider.ts +++ b/src/omnisharp/features/documentSymbolProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; import * as vscode from 'vscode'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; import SymbolRangeNames = protocol.V2.SymbolRangeNames; -import { toRange3 } from '../typeConversion.js'; +import { toRange3 } from '../typeConversion'; export default class OmniSharpDocumentSymbolProvider extends AbstractSupport implements vscode.DocumentSymbolProvider { async provideDocumentSymbols( diff --git a/src/omnisharp/features/documentation.ts b/src/omnisharp/features/documentation.ts index c87aba6fdf..9295367945 100644 --- a/src/omnisharp/features/documentation.ts +++ b/src/omnisharp/features/documentation.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol.js'; +import * as protocol from '../protocol'; const summaryStartTag = //i; const summaryEndTag = /<\/summary>/i; diff --git a/src/omnisharp/features/dotnetTest.ts b/src/omnisharp/features/dotnetTest.ts index 628692604e..e333f9fddb 100644 --- a/src/omnisharp/features/dotnetTest.ts +++ b/src/omnisharp/features/dotnetTest.ts @@ -6,13 +6,13 @@ import * as net from 'net'; import * as os from 'os'; import * as path from 'path'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import * as utils from '../../common.js'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import * as utils from '../../common'; import * as vscode from 'vscode'; -import AbstractProvider from './abstractProvider.js'; -import * as DebuggerEventsProtocol from '../../coreclrDebug/debuggerEventsProtocol.js'; -import { OmniSharpServer } from '../server.js'; +import AbstractProvider from './abstractProvider'; +import * as DebuggerEventsProtocol from '../../coreclrDebug/debuggerEventsProtocol'; +import { OmniSharpServer } from '../server'; import { TestExecutionCountReport, ReportDotNetTestResults, @@ -28,13 +28,13 @@ import { DotNetTestDebugStartFailure, DotNetTestRunInContextStart, DotNetTestDebugInContextStart, -} from '../omnisharpLoggingEvents.js'; -import { EventStream } from '../../eventStream.js'; -import LaunchConfiguration from './launchConfiguration.js'; -import Disposable from '../../disposable.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { commonOptions } from '../../shared/options.js'; +} from '../omnisharpLoggingEvents'; +import { EventStream } from '../../eventStream'; +import LaunchConfiguration from './launchConfiguration'; +import Disposable from '../../disposable'; +import CompositeDisposable from '../../compositeDisposable'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { commonOptions } from '../../shared/options'; const TelemetryReportingDelay = 2 * 60 * 1000; // two minutes diff --git a/src/omnisharp/features/fileOpenCloseProvider.ts b/src/omnisharp/features/fileOpenCloseProvider.ts index fe75a0775b..4600387020 100644 --- a/src/omnisharp/features/fileOpenCloseProvider.ts +++ b/src/omnisharp/features/fileOpenCloseProvider.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDisposable } from '../../disposable.js'; -import { OmniSharpServer } from '../server.js'; +import { IDisposable } from '../../disposable'; +import { OmniSharpServer } from '../server'; import * as vscode from 'vscode'; -import CompositeDisposable from '../../compositeDisposable.js'; -import * as serverUtils from '../utils.js'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; +import CompositeDisposable from '../../compositeDisposable'; +import * as serverUtils from '../utils'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker'; export default function fileOpenClose(server: OmniSharpServer): IDisposable { return new FileOpenCloseProvider(server); diff --git a/src/omnisharp/features/fixAll.ts b/src/omnisharp/features/fixAll.ts index 175189337e..c932f814cc 100644 --- a/src/omnisharp/features/fixAll.ts +++ b/src/omnisharp/features/fixAll.ts @@ -3,6 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractProvider from './abstractProvider.js'; +import AbstractProvider from './abstractProvider'; export class FixAll extends AbstractProvider {} diff --git a/src/omnisharp/features/fixAllProvider.ts b/src/omnisharp/features/fixAllProvider.ts index 8a89dae97b..20d50d74ff 100644 --- a/src/omnisharp/features/fixAllProvider.ts +++ b/src/omnisharp/features/fixAllProvider.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as serverUtils from '../utils.js'; -import * as protocol from '../protocol.js'; -import { OmniSharpServer } from '../server.js'; -import { FixAllScope, FixAllItem } from '../protocol.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import AbstractProvider from './abstractProvider.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { buildEditForResponse } from '../fileOperationsResponseEditBuilder.js'; -import { showWarningMessage } from '../../shared/observers/utils/showMessage.js'; +import * as serverUtils from '../utils'; +import * as protocol from '../protocol'; +import { OmniSharpServer } from '../server'; +import { FixAllScope, FixAllItem } from '../protocol'; +import CompositeDisposable from '../../compositeDisposable'; +import AbstractProvider from './abstractProvider'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { buildEditForResponse } from '../fileOperationsResponseEditBuilder'; +import { showWarningMessage } from '../../shared/observers/utils/showMessage'; import { CancellationToken } from 'vscode-languageclient'; export class OmniSharpFixAllProvider extends AbstractProvider implements vscode.CodeActionProvider { diff --git a/src/omnisharp/features/formattingEditProvider.ts b/src/omnisharp/features/formattingEditProvider.ts index 0d523df8d2..fc1145c025 100644 --- a/src/omnisharp/features/formattingEditProvider.ts +++ b/src/omnisharp/features/formattingEditProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; import { DocumentRangeFormattingEditProvider, FormattingOptions, diff --git a/src/omnisharp/features/hoverProvider.ts b/src/omnisharp/features/hoverProvider.ts index 47929ee4e2..6c7f76ebeb 100644 --- a/src/omnisharp/features/hoverProvider.ts +++ b/src/omnisharp/features/hoverProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { createRequest } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { createRequest } from '../typeConversion'; import { HoverProvider, Hover, TextDocument, CancellationToken, Position, MarkdownString } from 'vscode'; export default class OmniSharpHoverProvider extends AbstractSupport implements HoverProvider { diff --git a/src/omnisharp/features/implementationProvider.ts b/src/omnisharp/features/implementationProvider.ts index 3f79ffd3bb..1b6db10bc0 100644 --- a/src/omnisharp/features/implementationProvider.ts +++ b/src/omnisharp/features/implementationProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import { FindImplementationsRequest } from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { createRequest, toLocation } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import { FindImplementationsRequest } from '../protocol'; +import * as serverUtils from '../utils'; +import { createRequest, toLocation } from '../typeConversion'; import { TextDocument, Position, CancellationToken, ImplementationProvider, Definition } from 'vscode'; export default class OmniSharpImplementationProvider extends AbstractSupport implements ImplementationProvider { diff --git a/src/omnisharp/features/inlayHintProvider.ts b/src/omnisharp/features/inlayHintProvider.ts index 63e73cd828..d5f32a3f00 100644 --- a/src/omnisharp/features/inlayHintProvider.ts +++ b/src/omnisharp/features/inlayHintProvider.ts @@ -2,20 +2,20 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils.js'; +import * as serverUtils from '../utils'; import * as vscode from 'vscode'; -import AbstractProvider from './abstractProvider.js'; -import { OmniSharpServer } from '../server.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import CompositeDisposable from '../../compositeDisposable.js'; +import AbstractProvider from './abstractProvider'; +import { OmniSharpServer } from '../server'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import CompositeDisposable from '../../compositeDisposable'; import { InlayHint, InlayHintRequest, InlayHintResolve as InlayHintResolveRequest, LinePositionSpanTextChange, -} from '../protocol.js'; -import { fromVSCodeRange, toVSCodePosition, toVSCodeTextEdit } from '../typeConversion.js'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker.js'; +} from '../protocol'; +import { fromVSCodeRange, toVSCodePosition, toVSCodeTextEdit } from '../typeConversion'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker'; export default class OmniSharpInlayHintProvider extends AbstractProvider implements vscode.InlayHintsProvider { private readonly _onDidChangeInlayHints = new vscode.EventEmitter(); diff --git a/src/omnisharp/features/referenceProvider.ts b/src/omnisharp/features/referenceProvider.ts index 2e178ff160..275ccbdc64 100644 --- a/src/omnisharp/features/referenceProvider.ts +++ b/src/omnisharp/features/referenceProvider.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { createRequest, toLocation, toLocationFromUri } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { createRequest, toLocation, toLocationFromUri } from '../typeConversion'; import { ReferenceProvider, Location, TextDocument, CancellationToken, Position } from 'vscode'; -import { OmniSharpServer } from '../server.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.js'; +import { OmniSharpServer } from '../server'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; export default class OmniSharpReferenceProvider extends AbstractSupport implements ReferenceProvider { public constructor( diff --git a/src/omnisharp/features/renameProvider.ts b/src/omnisharp/features/renameProvider.ts index 520f3ab448..d0a0a347ba 100644 --- a/src/omnisharp/features/renameProvider.ts +++ b/src/omnisharp/features/renameProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { createRequest } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { createRequest } from '../typeConversion'; import { RenameProvider, WorkspaceEdit, TextDocument, Uri, CancellationToken, Position, Range } from 'vscode'; export default class OmniSharpRenameProvider extends AbstractSupport implements RenameProvider { diff --git a/src/omnisharp/features/semanticTokensProvider.ts b/src/omnisharp/features/semanticTokensProvider.ts index 45dca53154..d90749eca2 100644 --- a/src/omnisharp/features/semanticTokensProvider.ts +++ b/src/omnisharp/features/semanticTokensProvider.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import { SemanticTokenTypes } from 'vscode-languageclient'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { createRequest, toRange2 } from '../typeConversion.js'; -import AbstractProvider from './abstractProvider.js'; -import { OmniSharpServer } from '../server.js'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import { omnisharpOptions } from '../../shared/options.js'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { createRequest, toRange2 } from '../typeConversion'; +import AbstractProvider from './abstractProvider'; +import { OmniSharpServer } from '../server'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { omnisharpOptions } from '../../shared/options'; // The default TokenTypes defined by VS Code https://github.com/microsoft/vscode/blob/master/src/vs/platform/theme/common/tokenClassificationRegistry.ts#L393 enum DefaultTokenType { diff --git a/src/omnisharp/features/signatureHelpProvider.ts b/src/omnisharp/features/signatureHelpProvider.ts index 24dd71e152..44791bf5a3 100644 --- a/src/omnisharp/features/signatureHelpProvider.ts +++ b/src/omnisharp/features/signatureHelpProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import * as serverUtils from '../utils.js'; -import { createRequest } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import * as serverUtils from '../utils'; +import { createRequest } from '../typeConversion'; import { SignatureHelpProvider, SignatureHelp, @@ -16,7 +16,7 @@ import { Position, } from 'vscode'; import { MarkdownString } from 'vscode'; -import { SignatureHelpParameter } from '../protocol.js'; +import { SignatureHelpParameter } from '../protocol'; export default class OmniSharpSignatureHelpProvider extends AbstractSupport implements SignatureHelpProvider { public async provideSignatureHelp( diff --git a/src/omnisharp/features/sourceGeneratedDocumentProvider.ts b/src/omnisharp/features/sourceGeneratedDocumentProvider.ts index 42030d798e..e84da6d38d 100644 --- a/src/omnisharp/features/sourceGeneratedDocumentProvider.ts +++ b/src/omnisharp/features/sourceGeneratedDocumentProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils.js'; +import * as serverUtils from '../utils'; import { CancellationToken, Event, @@ -15,9 +15,9 @@ import { window, workspace, } from 'vscode'; -import { IDisposable } from '../../disposable.js'; -import { SourceGeneratedFileInfo, SourceGeneratedFileResponse, UpdateType } from '../protocol.js'; -import { OmniSharpServer } from '../server.js'; +import { IDisposable } from '../../disposable'; +import { SourceGeneratedFileInfo, SourceGeneratedFileResponse, UpdateType } from '../protocol'; +import { OmniSharpServer } from '../server'; export default class SourceGeneratedDocumentProvider implements TextDocumentContentProvider, IDisposable { readonly scheme = 'omnisharp-source-generated'; diff --git a/src/omnisharp/features/structureProvider.ts b/src/omnisharp/features/structureProvider.ts index 1f01eb3441..437e50eeb3 100644 --- a/src/omnisharp/features/structureProvider.ts +++ b/src/omnisharp/features/structureProvider.ts @@ -11,9 +11,9 @@ import { FoldingRange, FoldingRangeKind, } from 'vscode'; -import AbstractSupport from './abstractProvider.js'; -import { blockStructure } from '../utils.js'; -import { V2 } from '../protocol.js'; +import AbstractSupport from './abstractProvider'; +import { blockStructure } from '../utils'; +import { V2 } from '../protocol'; export class OmniSharpStructureProvider extends AbstractSupport implements FoldingRangeProvider { async provideFoldingRanges( diff --git a/src/omnisharp/features/virtualDocumentTracker.ts b/src/omnisharp/features/virtualDocumentTracker.ts index 5cdfc31829..1fd67f63a9 100644 --- a/src/omnisharp/features/virtualDocumentTracker.ts +++ b/src/omnisharp/features/virtualDocumentTracker.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { workspace, TextDocument, Uri } from 'vscode'; -import { OmniSharpServer } from '../server.js'; -import * as serverUtils from '../utils.js'; -import { FileChangeType } from '../protocol.js'; -import { IDisposable } from '../../disposable.js'; -import CompositeDisposable from '../../compositeDisposable.js'; -import { EventStream } from '../../eventStream.js'; -import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents.js'; +import { OmniSharpServer } from '../server'; +import * as serverUtils from '../utils'; +import { FileChangeType } from '../protocol'; +import { IDisposable } from '../../disposable'; +import CompositeDisposable from '../../compositeDisposable'; +import { EventStream } from '../../eventStream'; +import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents'; async function trackCurrentVirtualDocuments(server: OmniSharpServer, eventStream: EventStream) { for (let i = 0; i < workspace.textDocuments.length; i++) { diff --git a/src/omnisharp/features/workspaceSymbolProvider.ts b/src/omnisharp/features/workspaceSymbolProvider.ts index a8e352289c..61d6b50b96 100644 --- a/src/omnisharp/features/workspaceSymbolProvider.ts +++ b/src/omnisharp/features/workspaceSymbolProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider.js'; -import { OmniSharpServer } from '../server.js'; -import * as protocol from '../protocol.js'; -import * as serverUtils from '../utils.js'; -import { toRange } from '../typeConversion.js'; +import AbstractSupport from './abstractProvider'; +import { OmniSharpServer } from '../server'; +import * as protocol from '../protocol'; +import * as serverUtils from '../utils'; +import { toRange } from '../typeConversion'; import { CancellationToken, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Location } from 'vscode'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.js'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.js'; -import { omnisharpOptions } from '../../shared/options.js'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; +import { omnisharpOptions } from '../../shared/options'; export default class OmniSharpWorkspaceSymbolProvider extends AbstractSupport implements WorkspaceSymbolProvider { constructor( diff --git a/src/omnisharp/fileOperationsResponseEditBuilder.ts b/src/omnisharp/fileOperationsResponseEditBuilder.ts index b0e522c74d..cb652e80a7 100644 --- a/src/omnisharp/fileOperationsResponseEditBuilder.ts +++ b/src/omnisharp/fileOperationsResponseEditBuilder.ts @@ -5,9 +5,9 @@ import * as vscode from 'vscode'; import { Uri } from 'vscode'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.js'; -import { FileModificationType, FileOperationResponse, ModifiedFileResponse, RenamedFileResponse } from './protocol.js'; -import { toRange2 } from './typeConversion.js'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; +import { FileModificationType, FileOperationResponse, ModifiedFileResponse, RenamedFileResponse } from './protocol'; +import { toRange2 } from './typeConversion'; export async function buildEditForResponse( changes: FileOperationResponse[], diff --git a/src/omnisharp/languageMiddlewareFeature.ts b/src/omnisharp/languageMiddlewareFeature.ts index e45ebee780..cfaba25aee 100644 --- a/src/omnisharp/languageMiddlewareFeature.ts +++ b/src/omnisharp/languageMiddlewareFeature.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IDisposable } from '../disposable.js'; +import { IDisposable } from '../disposable'; export interface LanguageMiddleware extends RemapApi { language: string; diff --git a/src/omnisharp/launcher.ts b/src/omnisharp/launcher.ts index 728c5c6ece..3356eccd78 100644 --- a/src/omnisharp/launcher.ts +++ b/src/omnisharp/launcher.ts @@ -6,12 +6,12 @@ import { spawn } from 'child_process'; import { ChildProcessWithoutNullStreams } from 'child_process'; -import { PlatformInformation } from '../shared/platform.js'; +import { PlatformInformation } from '../shared/platform'; import * as path from 'path'; import * as vscode from 'vscode'; -import { commonOptions, omnisharpOptions } from '../shared/options.js'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; -import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget.js'; +import { commonOptions, omnisharpOptions } from '../shared/options'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget'; export const vslsTarget: LaunchTarget = { label: 'VSLS', diff --git a/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts b/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts index 4b0d73931b..36b69a2c4e 100644 --- a/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts +++ b/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; -import { OmnisharpBackgroundDiagnosticStatus } from '../omnisharpLoggingEvents.js'; -import { EventType } from '../../shared/eventType.js'; -import { BackgroundDiagnosticStatus } from '../protocol.js'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; +import { BaseEvent } from '../../shared/loggingEvents'; +import { OmnisharpBackgroundDiagnosticStatus } from '../omnisharpLoggingEvents'; +import { EventType } from '../../shared/eventType'; +import { BackgroundDiagnosticStatus } from '../protocol'; export class BackgroundWorkStatusBarObserver extends BaseStatusBarItemObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/baseStatusBarItemObserver.ts b/src/omnisharp/observers/baseStatusBarItemObserver.ts index b39a42437f..03594675f3 100644 --- a/src/omnisharp/observers/baseStatusBarItemObserver.ts +++ b/src/omnisharp/observers/baseStatusBarItemObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent } from '../../shared/loggingEvents.js'; -import { StatusBarItem } from '../../vscodeAdapter.js'; +import { BaseEvent } from '../../shared/loggingEvents'; +import { StatusBarItem } from '../../vscodeAdapter'; export abstract class BaseStatusBarItemObserver { constructor(private statusBarItem: StatusBarItem) {} diff --git a/src/omnisharp/observers/csharpLoggerObserver.ts b/src/omnisharp/observers/csharpLoggerObserver.ts index 0f150e990c..c5ccbe252d 100644 --- a/src/omnisharp/observers/csharpLoggerObserver.ts +++ b/src/omnisharp/observers/csharpLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; -import { EventType } from '../../shared/eventType.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; -import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents.js'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import { EventType } from '../../shared/eventType'; +import { BaseEvent } from '../../shared/loggingEvents'; +import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents'; export class CSharpLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetChannelObserver.ts b/src/omnisharp/observers/dotnetChannelObserver.ts index ec9d74ed01..ec05783aef 100644 --- a/src/omnisharp/observers/dotnetChannelObserver.ts +++ b/src/omnisharp/observers/dotnetChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.js'; -import { EventType } from '../../shared/eventType.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; +import { EventType } from '../../shared/eventType'; +import { BaseEvent } from '../../shared/loggingEvents'; export class DotNetChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetLoggerObserver.ts b/src/omnisharp/observers/dotnetLoggerObserver.ts index 2351a5ec59..2fa1ad80e4 100644 --- a/src/omnisharp/observers/dotnetLoggerObserver.ts +++ b/src/omnisharp/observers/dotnetLoggerObserver.ts @@ -2,14 +2,14 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import { BaseEvent } from '../../shared/loggingEvents'; import { CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed, -} from '../omnisharpLoggingEvents.js'; -import { EventType } from '../../shared/eventType.js'; +} from '../omnisharpLoggingEvents'; +import { EventType } from '../../shared/eventType'; export class DotnetLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetTestChannelObserver.ts b/src/omnisharp/observers/dotnetTestChannelObserver.ts index 41b0be47db..eab8cd887e 100644 --- a/src/omnisharp/observers/dotnetTestChannelObserver.ts +++ b/src/omnisharp/observers/dotnetTestChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.js'; -import { EventType } from '../../shared/eventType.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; +import { EventType } from '../../shared/eventType'; +import { BaseEvent } from '../../shared/loggingEvents'; export default class DotnetTestChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetTestLoggerObserver.ts b/src/omnisharp/observers/dotnetTestLoggerObserver.ts index 3e3e5fa1e6..876f339a85 100644 --- a/src/omnisharp/observers/dotnetTestLoggerObserver.ts +++ b/src/omnisharp/observers/dotnetTestLoggerObserver.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseEvent } from '../../shared/loggingEvents'; import { DotNetTestRunStart, DotNetTestMessage, @@ -15,10 +15,10 @@ import { DotNetTestsInClassRunStart, DotNetTestRunInContextStart, DotNetTestDebugInContextStart, -} from '../omnisharpLoggingEvents.js'; -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; -import * as protocol from '../protocol.js'; -import { EventType } from '../../shared/eventType.js'; +} from '../omnisharpLoggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import * as protocol from '../protocol'; +import { EventType } from '../../shared/eventType'; export default class DotNetTestLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/errorMessageObserver.ts b/src/omnisharp/observers/errorMessageObserver.ts index 6c1a6a7c22..2ac535689f 100644 --- a/src/omnisharp/observers/errorMessageObserver.ts +++ b/src/omnisharp/observers/errorMessageObserver.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent, IntegrityCheckFailure, ZipError } from '../../shared/loggingEvents.js'; -import { DotNetTestRunFailure, DotNetTestDebugStartFailure } from '../omnisharpLoggingEvents.js'; -import { vscode } from '../../vscodeAdapter.js'; -import { EventType } from '../../shared/eventType.js'; +import { BaseEvent, IntegrityCheckFailure, ZipError } from '../../shared/loggingEvents'; +import { DotNetTestRunFailure, DotNetTestDebugStartFailure } from '../omnisharpLoggingEvents'; +import { vscode } from '../../vscodeAdapter'; +import { EventType } from '../../shared/eventType'; import { l10n } from 'vscode'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage.js'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage'; export class ErrorMessageObserver { constructor(private vscode: vscode) {} diff --git a/src/omnisharp/observers/informationMessageObserver.ts b/src/omnisharp/observers/informationMessageObserver.ts index 7a77b44bdf..8579793fa3 100644 --- a/src/omnisharp/observers/informationMessageObserver.ts +++ b/src/omnisharp/observers/informationMessageObserver.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from '../../vscodeAdapter.js'; -import { EventType } from '../../shared/eventType.js'; -import { omnisharpOptions } from '../../shared/options.js'; +import { vscode } from '../../vscodeAdapter'; +import { EventType } from '../../shared/eventType'; +import { omnisharpOptions } from '../../shared/options'; import { l10n } from 'vscode'; -import { BaseEvent } from '../../shared/loggingEvents.js'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.js'; +import { BaseEvent } from '../../shared/loggingEvents'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; export class InformationMessageObserver { constructor(private vscode: vscode) {} diff --git a/src/omnisharp/observers/omnisharpChannelObserver.ts b/src/omnisharp/observers/omnisharpChannelObserver.ts index 0e695da012..a47fd3d5c6 100644 --- a/src/omnisharp/observers/omnisharpChannelObserver.ts +++ b/src/omnisharp/observers/omnisharpChannelObserver.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.js'; -import { OutputChannel } from '../../vscodeAdapter.js'; -import { EventType } from '../../shared/eventType.js'; -import { omnisharpOptions } from '../../shared/options.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; +import { OutputChannel } from '../../vscodeAdapter'; +import { EventType } from '../../shared/eventType'; +import { omnisharpOptions } from '../../shared/options'; +import { BaseEvent } from '../../shared/loggingEvents'; export class OmnisharpChannelObserver extends BaseChannelObserver { constructor(channel: OutputChannel) { diff --git a/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts b/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts index 095c2a59d9..7a2f0390da 100644 --- a/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts +++ b/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; import * as os from 'os'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseEvent } from '../../shared/loggingEvents'; import { OmnisharpRequestMessage, OmnisharpServerEnqueueRequest, @@ -14,8 +14,8 @@ import { OmnisharpServerVerboseMessage, OmnisharpServerProcessRequestStart, OmnisharpEventPacketReceived, -} from '../omnisharpLoggingEvents.js'; -import { EventType } from '../../shared/eventType.js'; +} from '../omnisharpLoggingEvents'; +import { EventType } from '../../shared/eventType'; export class OmnisharpDebugModeLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/omnisharpLoggerObserver.ts b/src/omnisharp/observers/omnisharpLoggerObserver.ts index b9b959bcce..661b3c945f 100644 --- a/src/omnisharp/observers/omnisharpLoggerObserver.ts +++ b/src/omnisharp/observers/omnisharpLoggerObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import { BaseEvent } from '../../shared/loggingEvents'; import { OmnisharpInitialisation, OmnisharpLaunch, @@ -15,12 +15,12 @@ import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnStdErr, OmnisharpEventPacketReceived, -} from '../omnisharpLoggingEvents.js'; +} from '../omnisharpLoggingEvents'; import * as os from 'os'; -import { EventType } from '../../shared/eventType.js'; +import { EventType } from '../../shared/eventType'; import * as vscode from 'vscode'; -import { PlatformInformation } from '../../shared/platform.js'; -import { Logger } from '../../logger.js'; +import { PlatformInformation } from '../../shared/platform'; +import { Logger } from '../../logger'; export class OmnisharpLoggerObserver extends BaseLoggerObserver { constructor( diff --git a/src/omnisharp/observers/omnisharpStatusBarObserver.ts b/src/omnisharp/observers/omnisharpStatusBarObserver.ts index 8859657a67..a6218d57c0 100644 --- a/src/omnisharp/observers/omnisharpStatusBarObserver.ts +++ b/src/omnisharp/observers/omnisharpStatusBarObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent, DownloadProgress, DownloadStart, InstallationStart } from '../../shared/loggingEvents.js'; -import { OmnisharpServerOnStdErr } from '../omnisharpLoggingEvents.js'; -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.js'; -import { EventType } from '../../shared/eventType.js'; +import { BaseEvent, DownloadProgress, DownloadStart, InstallationStart } from '../../shared/loggingEvents'; +import { OmnisharpServerOnStdErr } from '../omnisharpLoggingEvents'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; +import { EventType } from '../../shared/eventType'; export enum StatusBarColors { Red = 'rgb(218,0,0)', diff --git a/src/omnisharp/observers/projectStatusBarObserver.ts b/src/omnisharp/observers/projectStatusBarObserver.ts index af8e6ed2a3..419bd4e232 100644 --- a/src/omnisharp/observers/projectStatusBarObserver.ts +++ b/src/omnisharp/observers/projectStatusBarObserver.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { basename } from 'path'; -import { BaseEvent } from '../../shared/loggingEvents.js'; -import { WorkspaceInformationUpdated } from '../omnisharpLoggingEvents.js'; -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.js'; -import { EventType } from '../../shared/eventType.js'; +import { BaseEvent } from '../../shared/loggingEvents'; +import { WorkspaceInformationUpdated } from '../omnisharpLoggingEvents'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; +import { EventType } from '../../shared/eventType'; export class ProjectStatusBarObserver extends BaseStatusBarItemObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/razorLoggerObserver.ts b/src/omnisharp/observers/razorLoggerObserver.ts index 1a9f423069..b3d2321b05 100644 --- a/src/omnisharp/observers/razorLoggerObserver.ts +++ b/src/omnisharp/observers/razorLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.js'; -import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist } from '../omnisharpLoggingEvents.js'; -import { EventType } from '../../shared/eventType.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist } from '../omnisharpLoggingEvents'; +import { EventType } from '../../shared/eventType'; +import { BaseEvent } from '../../shared/loggingEvents'; export class RazorLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/telemetryObserver.ts b/src/omnisharp/observers/telemetryObserver.ts index ffe175246d..35a29f3c12 100644 --- a/src/omnisharp/observers/telemetryObserver.ts +++ b/src/omnisharp/observers/telemetryObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../../shared/platform.js'; -import { BaseEvent, InstallationFailure } from '../../shared/loggingEvents.js'; +import { PlatformInformation } from '../../shared/platform'; +import { BaseEvent, InstallationFailure } from '../../shared/loggingEvents'; import { TestExecutionCountReport, TelemetryEventWithMeasures, @@ -12,13 +12,13 @@ import { ProjectConfiguration, TelemetryErrorEvent, OmnisharpInitialisation, -} from '../omnisharpLoggingEvents.js'; -import { PackageError } from '../../packageManager/packageError.js'; -import { EventType } from '../../shared/eventType.js'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.js'; -import { DotnetInfo } from '../../shared/utils/dotnetInfo.js'; -import { ITelemetryReporter, getTelemetryProps } from '../../shared/telemetryReporter.js'; -import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration.js'; +} from '../omnisharpLoggingEvents'; +import { PackageError } from '../../packageManager/packageError'; +import { EventType } from '../../shared/eventType'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; +import { DotnetInfo } from '../../shared/utils/dotnetInfo'; +import { ITelemetryReporter, getTelemetryProps } from '../../shared/telemetryReporter'; +import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration'; export class TelemetryObserver { private reporter: ITelemetryReporter; diff --git a/src/omnisharp/observers/warningMessageObserver.ts b/src/omnisharp/observers/warningMessageObserver.ts index 8d1ee7d19f..a044e219a7 100644 --- a/src/omnisharp/observers/warningMessageObserver.ts +++ b/src/omnisharp/observers/warningMessageObserver.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { debounceTime } from 'rxjs/operators'; -import { vscode } from '../../vscodeAdapter.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; -import { OmnisharpServerMsBuildProjectDiagnostics } from '../omnisharpLoggingEvents.js'; +import { vscode } from '../../vscodeAdapter'; +import { BaseEvent } from '../../shared/loggingEvents'; +import { OmnisharpServerMsBuildProjectDiagnostics } from '../omnisharpLoggingEvents'; import { Scheduler, Subject } from 'rxjs'; -import { EventType } from '../../shared/eventType.js'; +import { EventType } from '../../shared/eventType'; import { l10n } from 'vscode'; -import { CommandOption, showWarningMessage } from '../../shared/observers/utils/showMessage.js'; +import { CommandOption, showWarningMessage } from '../../shared/observers/utils/showMessage'; export class WarningMessageObserver { private warningMessageDebouncer: Subject; diff --git a/src/omnisharp/omniSharpMonoResolver.ts b/src/omnisharp/omniSharpMonoResolver.ts index 614a3592e0..6e3df3434a 100644 --- a/src/omnisharp/omniSharpMonoResolver.ts +++ b/src/omnisharp/omniSharpMonoResolver.ts @@ -5,10 +5,10 @@ import * as semver from 'semver'; import * as path from 'path'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; -import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation.js'; -import { IGetMonoVersion } from '../constants/IGetMonoVersion.js'; -import { omnisharpOptions } from '../shared/options.js'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; +import { IGetMonoVersion } from '../constants/IGetMonoVersion'; +import { omnisharpOptions } from '../shared/options'; export class OmniSharpMonoResolver implements IHostExecutableResolver { private readonly minimumMonoVersion = '6.4.0'; diff --git a/src/omnisharp/omnisharpDownloader.ts b/src/omnisharp/omnisharpDownloader.ts index 96277be449..dd0ea5bab0 100644 --- a/src/omnisharp/omnisharpDownloader.ts +++ b/src/omnisharp/omnisharpDownloader.ts @@ -3,23 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { GetPackagesFromVersion } from './omnisharpPackageCreator.js'; -import { PlatformInformation } from '../shared/platform.js'; +import { GetPackagesFromVersion } from './omnisharpPackageCreator'; +import { PlatformInformation } from '../shared/platform'; import { PackageInstallation, LogPlatformInfo, InstallationSuccess, InstallationFailure, -} from '../shared/loggingEvents.js'; -import { EventStream } from '../eventStream.js'; -import { NetworkSettingsProvider } from '../networkSettings.js'; -import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages.js'; -import { DownloadFile } from '../packageManager/fileDownloader.js'; -import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils.js'; -import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall.js'; -import { isValidDownload } from '../packageManager/isValidDownload.js'; -import { LatestBuildDownloadStart } from './omnisharpLoggingEvents.js'; -import { ITelemetryReporter } from '../shared/telemetryReporter.js'; +} from '../shared/loggingEvents'; +import { EventStream } from '../eventStream'; +import { NetworkSettingsProvider } from '../networkSettings'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; +import { DownloadFile } from '../packageManager/fileDownloader'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; +import { isValidDownload } from '../packageManager/isValidDownload'; +import { LatestBuildDownloadStart } from './omnisharpLoggingEvents'; +import { ITelemetryReporter } from '../shared/telemetryReporter'; export class OmnisharpDownloader { public constructor( diff --git a/src/omnisharp/omnisharpLanguageServer.ts b/src/omnisharp/omnisharpLanguageServer.ts index c55f175c4d..1c5325c328 100644 --- a/src/omnisharp/omnisharpLanguageServer.ts +++ b/src/omnisharp/omnisharpLanguageServer.ts @@ -4,53 +4,53 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as utils from './utils.js'; -import { DotNetChannelObserver } from './observers/dotnetChannelObserver.js'; -import { DotnetLoggerObserver } from './observers/dotnetLoggerObserver.js'; -import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver.js'; -import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver.js'; -import { OmnisharpLoggerObserver } from './observers/omnisharpLoggerObserver.js'; -import { OmnisharpChannelObserver } from './observers/omnisharpChannelObserver.js'; -import { WarningMessageObserver } from './observers/warningMessageObserver.js'; -import { InformationMessageObserver } from './observers/informationMessageObserver.js'; -import { ErrorMessageObserver } from './observers/errorMessageObserver.js'; -import { StatusBarItemAdapter } from '../statusBarItemAdapter.js'; -import { OmnisharpStatusBarObserver } from './observers/omnisharpStatusBarObserver.js'; -import { EventStream } from '../eventStream.js'; -import { NetworkSettingsProvider } from '../networkSettings.js'; -import { PlatformInformation } from '../shared/platform.js'; -import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver.js'; -import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver.js'; -import { OmnisharpDebugModeLoggerObserver } from './observers/omnisharpDebugModeLoggerObserver.js'; -import { RazorLoggerObserver } from './observers/razorLoggerObserver.js'; -import { RazorOmnisharpDownloader } from '../razor/razorOmnisharpDownloader.js'; -import { omnisharpOptions, razorOptions } from '../shared/options.js'; -import CompositeDisposable from '../compositeDisposable.js'; -import { OmniSharpMonoResolver } from './omniSharpMonoResolver.js'; -import { DotnetResolver } from './dotnetResolver.js'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.js'; -import { OmniSharpServer } from './server.js'; -import { Advisor } from './features/diagnosticsProvider.js'; -import TestManager from './features/dotnetTest.js'; -import { OmnisharpWorkspaceDebugInformationProvider } from './omnisharpWorkspaceDebugInformationProvider.js'; -import Disposable from '../disposable.js'; -import registerCommands from './features/commands.js'; -import { addAssetsIfNecessary } from '../shared/assets.js'; +import * as utils from './utils'; +import { DotNetChannelObserver } from './observers/dotnetChannelObserver'; +import { DotnetLoggerObserver } from './observers/dotnetLoggerObserver'; +import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver'; +import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver'; +import { OmnisharpLoggerObserver } from './observers/omnisharpLoggerObserver'; +import { OmnisharpChannelObserver } from './observers/omnisharpChannelObserver'; +import { WarningMessageObserver } from './observers/warningMessageObserver'; +import { InformationMessageObserver } from './observers/informationMessageObserver'; +import { ErrorMessageObserver } from './observers/errorMessageObserver'; +import { StatusBarItemAdapter } from '../statusBarItemAdapter'; +import { OmnisharpStatusBarObserver } from './observers/omnisharpStatusBarObserver'; +import { EventStream } from '../eventStream'; +import { NetworkSettingsProvider } from '../networkSettings'; +import { PlatformInformation } from '../shared/platform'; +import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver'; +import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver'; +import { OmnisharpDebugModeLoggerObserver } from './observers/omnisharpDebugModeLoggerObserver'; +import { RazorLoggerObserver } from './observers/razorLoggerObserver'; +import { RazorOmnisharpDownloader } from '../razor/razorOmnisharpDownloader'; +import { omnisharpOptions, razorOptions } from '../shared/options'; +import CompositeDisposable from '../compositeDisposable'; +import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; +import { DotnetResolver } from './dotnetResolver'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; +import { OmniSharpServer } from './server'; +import { Advisor } from './features/diagnosticsProvider'; +import TestManager from './features/dotnetTest'; +import { OmnisharpWorkspaceDebugInformationProvider } from './omnisharpWorkspaceDebugInformationProvider'; +import Disposable from '../disposable'; +import registerCommands from './features/commands'; +import { addAssetsIfNecessary } from '../shared/assets'; import { ActiveTextEditorChanged, OmnisharpStart, ProjectJsonDeprecatedWarning, RazorDevModeActive, -} from './omnisharpLoggingEvents.js'; -import { DotnetWorkspaceConfigurationProvider } from '../shared/workspaceConfigurationProvider.js'; -import { getMonoVersion } from '../utils/getMonoVersion.js'; -import { safeLength, sum } from '../common.js'; -import { TelemetryObserver } from './observers/telemetryObserver.js'; -import { ITelemetryReporter } from '../shared/telemetryReporter.js'; +} from './omnisharpLoggingEvents'; +import { DotnetWorkspaceConfigurationProvider } from '../shared/workspaceConfigurationProvider'; +import { getMonoVersion } from '../utils/getMonoVersion'; +import { safeLength, sum } from '../common'; +import { TelemetryObserver } from './observers/telemetryObserver'; +import { ITelemetryReporter } from '../shared/telemetryReporter'; import { Observable } from 'rxjs'; -import { registerOmnisharpOptionChanges } from './omnisharpOptionChanges.js'; -import { CSharpLoggerObserver } from './observers/csharpLoggerObserver.js'; -import { showWarningMessage } from '../shared/observers/utils/showMessage.js'; +import { registerOmnisharpOptionChanges } from './omnisharpOptionChanges'; +import { CSharpLoggerObserver } from './observers/csharpLoggerObserver'; +import { showWarningMessage } from '../shared/observers/utils/showMessage'; export interface ActivationResult { readonly server: OmniSharpServer; diff --git a/src/omnisharp/omnisharpLoggingEvents.ts b/src/omnisharp/omnisharpLoggingEvents.ts index fea26c1bf3..9fd7fdf1dd 100644 --- a/src/omnisharp/omnisharpLoggingEvents.ts +++ b/src/omnisharp/omnisharpLoggingEvents.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Request } from './requestQueue.js'; -import * as protocol from './protocol.js'; -import { LaunchTarget } from '../shared/launchTarget.js'; -import { EventType } from '../shared/eventType.js'; -import { ProjectConfigurationMessage } from '../shared/projectConfiguration.js'; -import { BaseEvent, EventWithMessage } from '../shared/loggingEvents.js'; +import { Request } from './requestQueue'; +import * as protocol from './protocol'; +import { LaunchTarget } from '../shared/launchTarget'; +import { EventType } from '../shared/eventType'; +import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; +import { BaseEvent, EventWithMessage } from '../shared/loggingEvents'; export class TelemetryEvent implements BaseEvent { type = EventType.TelemetryEvent; diff --git a/src/omnisharp/omnisharpManager.ts b/src/omnisharp/omnisharpManager.ts index 771f654e0c..91159a3690 100644 --- a/src/omnisharp/omnisharpManager.ts +++ b/src/omnisharp/omnisharpManager.ts @@ -5,10 +5,10 @@ import * as path from 'path'; import * as semver from 'semver'; -import * as util from '../common.js'; -import { OmnisharpDownloader } from './omnisharpDownloader.js'; -import { PlatformInformation } from '../shared/platform.js'; -import { modernNetVersion } from './omnisharpPackageCreator.js'; +import * as util from '../common'; +import { OmnisharpDownloader } from './omnisharpDownloader'; +import { PlatformInformation } from '../shared/platform'; +import { modernNetVersion } from './omnisharpPackageCreator'; export class OmnisharpManager { private readonly latestVersionFileServerPath = 'releases/versioninfo.txt'; diff --git a/src/omnisharp/omnisharpOptionChanges.ts b/src/omnisharp/omnisharpOptionChanges.ts index a6d153f944..880f9e7424 100644 --- a/src/omnisharp/omnisharpOptionChanges.ts +++ b/src/omnisharp/omnisharpOptionChanges.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver.js'; -import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options.js'; +import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver'; +import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options'; import { Observable } from 'rxjs'; -import Disposable from '../disposable.js'; -import { CommandOption, showInformationMessage } from '../shared/observers/utils/showMessage.js'; +import Disposable from '../disposable'; +import { CommandOption, showInformationMessage } from '../shared/observers/utils/showMessage'; export function registerOmnisharpOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { diff --git a/src/omnisharp/omnisharpPackageCreator.ts b/src/omnisharp/omnisharpPackageCreator.ts index 25764cca4a..ff68e4c26c 100644 --- a/src/omnisharp/omnisharpPackageCreator.ts +++ b/src/omnisharp/omnisharpPackageCreator.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Package } from '../packageManager/package.js'; +import { Package } from '../packageManager/package'; export const modernNetVersion = '6.0'; diff --git a/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts b/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts index ef0eb68c8a..7018dddd0a 100644 --- a/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts +++ b/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import * as serverUtils from './utils.js'; +import * as serverUtils from './utils'; import { IWorkspaceDebugInformationProvider, ProjectDebugInformation, -} from '../shared/IWorkspaceDebugInformationProvider.js'; -import { OmniSharpServer } from './server.js'; +} from '../shared/IWorkspaceDebugInformationProvider'; +import { OmniSharpServer } from './server'; import { Uri } from 'vscode'; -import { findNetCoreTargetFramework } from '../shared/utils.js'; -import { isSubfolderOf } from '../common.js'; +import { findNetCoreTargetFramework } from '../shared/utils'; +import { isSubfolderOf } from '../common'; export class OmnisharpWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { constructor(private server: OmniSharpServer) {} diff --git a/src/omnisharp/prioritization.ts b/src/omnisharp/prioritization.ts index fc7bc535d6..9e5641c108 100644 --- a/src/omnisharp/prioritization.ts +++ b/src/omnisharp/prioritization.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from './protocol.js'; +import * as protocol from './protocol'; const priorityCommands = [ protocol.Requests.ChangeBuffer, diff --git a/src/omnisharp/protocol.ts b/src/omnisharp/protocol.ts index 1bcfa36d47..94cf74c397 100644 --- a/src/omnisharp/protocol.ts +++ b/src/omnisharp/protocol.ts @@ -9,7 +9,7 @@ import { findNetCoreTargetFramework, findNetFrameworkTargetFramework, findNetStandardTargetFramework, -} from '../shared/utils.js'; +} from '../shared/utils'; export namespace Requests { export const AddToProject = '/addtoproject'; diff --git a/src/omnisharp/requestQueue.ts b/src/omnisharp/requestQueue.ts index e66a357ba9..d7f6439085 100644 --- a/src/omnisharp/requestQueue.ts +++ b/src/omnisharp/requestQueue.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as prioritization from './prioritization.js'; +import * as prioritization from './prioritization'; import { OmnisharpServerProcessRequestComplete, OmnisharpServerProcessRequestStart, OmnisharpServerDequeueRequest, OmnisharpServerEnqueueRequest, -} from './omnisharpLoggingEvents.js'; -import { EventStream } from '../eventStream.js'; +} from './omnisharpLoggingEvents'; +import { EventStream } from '../eventStream'; export interface Request { command: string; diff --git a/src/omnisharp/requirementCheck.ts b/src/omnisharp/requirementCheck.ts index ba863d025c..2a59f8995a 100644 --- a/src/omnisharp/requirementCheck.ts +++ b/src/omnisharp/requirementCheck.ts @@ -5,11 +5,11 @@ import * as vscode from 'vscode'; import * as semver from 'semver'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo.js'; -import { getMonoVersion } from '../utils/getMonoVersion.js'; -import { OmniSharpMonoResolver } from './omniSharpMonoResolver.js'; -import { getMSBuildVersion } from '../utils/getMsBuildInfo.js'; -import { omnisharpOptions } from '../shared/options.js'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; +import { getMonoVersion } from '../utils/getMonoVersion'; +import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; +import { getMSBuildVersion } from '../utils/getMsBuildInfo'; +import { omnisharpOptions } from '../shared/options'; export interface RequirementResult { needsDotNetSdk: boolean; diff --git a/src/omnisharp/server.ts b/src/omnisharp/server.ts index 5738521970..aa54915492 100644 --- a/src/omnisharp/server.ts +++ b/src/omnisharp/server.ts @@ -5,36 +5,36 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as protocol from './protocol.js'; -import * as serverUtils from './utils.js'; -import { vscode, CancellationToken } from '../vscodeAdapter.js'; -import { LaunchTarget, LaunchTargetKind } from '../shared/launchTarget.js'; -import { DelayTracker } from './delayTracker.js'; +import * as protocol from './protocol'; +import * as serverUtils from './utils'; +import { vscode, CancellationToken } from '../vscodeAdapter'; +import { LaunchTarget, LaunchTargetKind } from '../shared/launchTarget'; +import { DelayTracker } from './delayTracker'; import { EventEmitter } from 'events'; -import { OmnisharpManager } from './omnisharpManager.js'; -import { PlatformInformation } from '../shared/platform.js'; -import { OmnisharpDownloader } from './omnisharpDownloader.js'; -import * as ObservableEvents from './omnisharpLoggingEvents.js'; -import { EventStream } from '../eventStream.js'; -import { NetworkSettingsProvider } from '../networkSettings.js'; +import { OmnisharpManager } from './omnisharpManager'; +import { PlatformInformation } from '../shared/platform'; +import { OmnisharpDownloader } from './omnisharpDownloader'; +import * as ObservableEvents from './omnisharpLoggingEvents'; +import { EventStream } from '../eventStream'; +import { NetworkSettingsProvider } from '../networkSettings'; import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import CompositeDisposable from '../compositeDisposable.js'; -import Disposable from '../disposable.js'; +import CompositeDisposable from '../compositeDisposable'; +import Disposable from '../disposable'; import { ExtensionContext, LogOutputChannel, OutputChannel } from 'vscode'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.js'; -import { LspEngine } from './engines/lspEngine.js'; -import { IEngine } from './engines/IEngine.js'; -import { StdioEngine } from './engines/stdioEngine.js'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; -import { showProjectSelector } from './features/commands.js'; -import { validateRequirements } from './requirementCheck.js'; -import { Advisor } from './features/diagnosticsProvider.js'; -import TestManager from './features/dotnetTest.js'; -import { findLaunchTargets } from './launcher.js'; -import { ProjectConfigurationMessage } from '../shared/projectConfiguration.js'; -import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options.js'; -import { ITelemetryReporter } from '../shared/telemetryReporter.js'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; +import { LspEngine } from './engines/lspEngine'; +import { IEngine } from './engines/IEngine'; +import { StdioEngine } from './engines/stdioEngine'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { showProjectSelector } from './features/commands'; +import { validateRequirements } from './requirementCheck'; +import { Advisor } from './features/diagnosticsProvider'; +import TestManager from './features/dotnetTest'; +import { findLaunchTargets } from './launcher'; +import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; +import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options'; +import { ITelemetryReporter } from '../shared/telemetryReporter'; enum ServerState { Starting, diff --git a/src/omnisharp/typeConversion.ts b/src/omnisharp/typeConversion.ts index 800154b5ba..4fa0212385 100644 --- a/src/omnisharp/typeConversion.ts +++ b/src/omnisharp/typeConversion.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from './protocol.js'; +import * as protocol from './protocol'; import * as vscode from 'vscode'; export function toLocation(location: protocol.ResourceLocation | protocol.QuickFix): vscode.Location { diff --git a/src/omnisharp/utils.ts b/src/omnisharp/utils.ts index 9b02b15b69..56f92b3bf5 100644 --- a/src/omnisharp/utils.ts +++ b/src/omnisharp/utils.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from './server.js'; -import * as protocol from './protocol.js'; +import { OmniSharpServer } from './server'; +import * as protocol from './protocol'; import * as vscode from 'vscode'; import { CancellationToken } from 'vscode-languageclient'; import { @@ -13,7 +13,7 @@ import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyHostedServer, findNetCoreTargetFramework, -} from '../shared/utils.js'; +} from '../shared/utils'; export async function codeCheck(server: OmniSharpServer, request: protocol.Request, token: vscode.CancellationToken) { return server.makeRequest(protocol.Requests.CodeCheck, request, token); diff --git a/src/packageManager/IInstallDependencies.ts b/src/packageManager/IInstallDependencies.ts index d3442ba1ed..d4c12b3cfc 100644 --- a/src/packageManager/IInstallDependencies.ts +++ b/src/packageManager/IInstallDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AbsolutePathPackage } from './absolutePathPackage.js'; +import { AbsolutePathPackage } from './absolutePathPackage'; export type DependencyInstallationStatus = { [name: string]: boolean }; diff --git a/src/packageManager/absolutePathPackage.ts b/src/packageManager/absolutePathPackage.ts index 7568f2bca5..5505dc43eb 100644 --- a/src/packageManager/absolutePathPackage.ts +++ b/src/packageManager/absolutePathPackage.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Package } from './package.js'; -import { IPackage } from './IPackage.js'; -import { AbsolutePath } from './absolutePath.js'; +import { Package } from './package'; +import { IPackage } from './IPackage'; +import { AbsolutePath } from './absolutePath'; export class AbsolutePathPackage implements IPackage { constructor( diff --git a/src/packageManager/downloadAndInstallPackages.ts b/src/packageManager/downloadAndInstallPackages.ts index e700757508..9c8da1cbb3 100644 --- a/src/packageManager/downloadAndInstallPackages.ts +++ b/src/packageManager/downloadAndInstallPackages.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PackageError } from './packageError.js'; -import { NestedError } from '../nestedError.js'; -import { DownloadFile } from './fileDownloader.js'; -import { InstallZip } from './zipInstaller.js'; -import { EventStream } from '../eventStream.js'; -import { NetworkSettingsProvider } from '../networkSettings.js'; -import { AbsolutePathPackage } from './absolutePathPackage.js'; -import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from '../common.js'; -import { InstallationFailure, IntegrityCheckFailure } from '../shared/loggingEvents.js'; +import { PackageError } from './packageError'; +import { NestedError } from '../nestedError'; +import { DownloadFile } from './fileDownloader'; +import { InstallZip } from './zipInstaller'; +import { EventStream } from '../eventStream'; +import { NetworkSettingsProvider } from '../networkSettings'; +import { AbsolutePathPackage } from './absolutePathPackage'; +import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from '../common'; +import { InstallationFailure, IntegrityCheckFailure } from '../shared/loggingEvents'; import fsExtra from 'fs-extra'; -import { PackageInstallStart } from '../shared/loggingEvents.js'; -import { DownloadValidator } from './isValidDownload.js'; +import { PackageInstallStart } from '../shared/loggingEvents'; +import { DownloadValidator } from './isValidDownload'; import { CancellationToken } from 'vscode'; -import { ITelemetryReporter } from '../shared/telemetryReporter.js'; -import { DependencyInstallationStatus } from './IInstallDependencies.js'; +import { ITelemetryReporter } from '../shared/telemetryReporter'; +import { DependencyInstallationStatus } from './IInstallDependencies'; export async function downloadAndInstallPackages( packages: AbsolutePathPackage[], diff --git a/src/packageManager/fileDownloader.ts b/src/packageManager/fileDownloader.ts index c7bd906761..b1535a2132 100644 --- a/src/packageManager/fileDownloader.ts +++ b/src/packageManager/fileDownloader.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as https from 'https'; -import { EventStream } from '../eventStream.js'; +import { EventStream } from '../eventStream'; import { DownloadSuccess, DownloadStart, @@ -12,11 +12,11 @@ import { DownloadFailure, DownloadProgress, DownloadSizeObtained, -} from '../shared/loggingEvents.js'; -import { NestedError } from '../nestedError.js'; +} from '../shared/loggingEvents'; +import { NestedError } from '../nestedError'; import { parse as parseUrl } from 'url'; -import { getProxyAgent } from './proxy.js'; -import { NetworkSettingsProvider } from '../networkSettings.js'; +import { getProxyAgent } from './proxy'; +import { NetworkSettingsProvider } from '../networkSettings'; import { CancellationToken } from 'vscode'; export async function DownloadFile( diff --git a/src/packageManager/getAbsolutePathPackagesToInstall.ts b/src/packageManager/getAbsolutePathPackagesToInstall.ts index 18db75422c..3efc604519 100644 --- a/src/packageManager/getAbsolutePathPackagesToInstall.ts +++ b/src/packageManager/getAbsolutePathPackagesToInstall.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform.js'; -import { AbsolutePathPackage } from './absolutePathPackage.js'; -import { getNotInstalledPackagesForPlatform } from './packageFilterer.js'; -import { Package } from './package.js'; +import { PlatformInformation } from '../shared/platform'; +import { AbsolutePathPackage } from './absolutePathPackage'; +import { getNotInstalledPackagesForPlatform } from './packageFilterer'; +import { Package } from './package'; export async function getAbsolutePathPackagesToInstall( packages: Package[], diff --git a/src/packageManager/isValidDownload.ts b/src/packageManager/isValidDownload.ts index 86d14dc289..fd592395ff 100644 --- a/src/packageManager/isValidDownload.ts +++ b/src/packageManager/isValidDownload.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as crypto from 'crypto'; -import { EventStream } from '../eventStream.js'; -import { IntegrityCheckSuccess, DownloadValidation } from '../shared/loggingEvents.js'; +import { EventStream } from '../eventStream'; +import { IntegrityCheckSuccess, DownloadValidation } from '../shared/loggingEvents'; export interface DownloadValidator { (buffer: Buffer, integrity: string | undefined, eventStream: EventStream): boolean; diff --git a/src/packageManager/package.ts b/src/packageManager/package.ts index 255179902a..da54200e5d 100644 --- a/src/packageManager/package.ts +++ b/src/packageManager/package.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IPackage } from './IPackage.js'; +import { IPackage } from './IPackage'; export interface Package extends IPackage { installPath?: string; diff --git a/src/packageManager/packageError.ts b/src/packageManager/packageError.ts index 8d99741fe9..9954ee8ec8 100644 --- a/src/packageManager/packageError.ts +++ b/src/packageManager/packageError.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { NestedError } from '../nestedError.js'; -import { IPackage } from './IPackage.js'; +import { NestedError } from '../nestedError'; +import { IPackage } from './IPackage'; export class PackageError extends NestedError { // Do not put PII (personally identifiable information) in the 'message' field as it will be logged to telemetry diff --git a/src/packageManager/packageFilterer.ts b/src/packageManager/packageFilterer.ts index d8e46a3cab..80d22fe4a8 100644 --- a/src/packageManager/packageFilterer.ts +++ b/src/packageManager/packageFilterer.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform.js'; -import * as util from '../common.js'; -import { AbsolutePathPackage } from './absolutePathPackage.js'; +import { PlatformInformation } from '../shared/platform'; +import * as util from '../common'; +import { AbsolutePathPackage } from './absolutePathPackage'; const NEUTRAL = 'neutral'; diff --git a/src/packageManager/zipInstaller.ts b/src/packageManager/zipInstaller.ts index 4f1f12deec..cccbb8ce19 100644 --- a/src/packageManager/zipInstaller.ts +++ b/src/packageManager/zipInstaller.ts @@ -7,10 +7,10 @@ import * as fs from 'fs'; import fsExtra from 'fs-extra'; import * as path from 'path'; import * as yauzl from 'yauzl'; -import { EventStream } from '../eventStream.js'; -import { InstallationStart, ZipError } from '../shared/loggingEvents.js'; -import { NestedError } from '../nestedError.js'; -import { AbsolutePath } from './absolutePath.js'; +import { EventStream } from '../eventStream'; +import { InstallationStart, ZipError } from '../shared/loggingEvents'; +import { NestedError } from '../nestedError'; +import { AbsolutePath } from './absolutePath'; export async function InstallZip( buffer: Buffer, diff --git a/src/razor/razorOmnisharp.ts b/src/razor/razorOmnisharp.ts index 6af7b36ef9..21a341e865 100644 --- a/src/razor/razorOmnisharp.ts +++ b/src/razor/razorOmnisharp.ts @@ -7,8 +7,8 @@ import * as fs from 'fs'; import * as RazorOmniSharp from 'microsoft.aspnetcore.razor.vscode'; import * as path from 'path'; import * as vscode from 'vscode'; -import { EventStream } from '../eventStream.js'; -import { showWarningMessage } from '../shared/observers/utils/showMessage.js'; +import { EventStream } from '../eventStream'; +import { showWarningMessage } from '../shared/observers/utils/showMessage'; export async function activateRazorOmniSharpExtension( context: vscode.ExtensionContext, diff --git a/src/razor/razorOmnisharpDownloader.ts b/src/razor/razorOmnisharpDownloader.ts index 06d76b4310..83ffd4edc5 100644 --- a/src/razor/razorOmnisharpDownloader.ts +++ b/src/razor/razorOmnisharpDownloader.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform.js'; -import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../shared/loggingEvents.js'; -import { EventStream } from '../eventStream.js'; -import { NetworkSettingsProvider } from '../networkSettings.js'; -import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages.js'; -import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils.js'; -import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall.js'; -import { isValidDownload } from '../packageManager/isValidDownload.js'; -import { ITelemetryReporter } from '../shared/telemetryReporter.js'; +import { PlatformInformation } from '../shared/platform'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../shared/loggingEvents'; +import { EventStream } from '../eventStream'; +import { NetworkSettingsProvider } from '../networkSettings'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; +import { isValidDownload } from '../packageManager/isValidDownload'; +import { ITelemetryReporter } from '../shared/telemetryReporter'; export class RazorOmnisharpDownloader { public constructor( diff --git a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts index 80e7e5bcc2..9f88c3b5b9 100644 --- a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts +++ b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts @@ -9,19 +9,19 @@ import { join } from 'path'; import { fileURLToPath } from 'url'; import * as vscode from 'vscode'; import { ChromeBrowserFinder, EdgeBrowserFinder } from '@vscode/js-debug-browsers'; -import { ONLY_JS_DEBUG_NAME, MANAGED_DEBUG_NAME, JS_DEBUG_NAME, SERVER_APP_NAME } from './constants.js'; -import { isValidEvent, onDidTerminateDebugSession } from './terminateDebugHandler.js'; +import { ONLY_JS_DEBUG_NAME, MANAGED_DEBUG_NAME, JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; +import { isValidEvent, onDidTerminateDebugSession } from './terminateDebugHandler'; import * as path from 'path'; import * as cp from 'child_process'; -import { getExtensionPath } from '../../../common.js'; -import { getCSharpDevKit } from '../../../utils/getCSharpDevKit.js'; -import { CSharpExtensionId } from '../../../constants/csharpExtensionId.js'; -import { DotNetRuntimeVersion } from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.js'; +import { getExtensionPath } from '../../../common'; +import { getCSharpDevKit } from '../../../utils/getCSharpDevKit'; +import { CSharpExtensionId } from '../../../constants/csharpExtensionId'; +import { DotNetRuntimeVersion } from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver'; import { IDotnetAcquireContext, IDotnetAcquireResult, IDotnetFindPathContext, -} from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi.js'; +} from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi'; import { EventEmitter } from 'events'; import { Formatters, @@ -59,7 +59,7 @@ const targetFrameworkServiceDescriptor: ServiceRpcDescriptor = Object.freeze( ) ); -import { showErrorMessage, showInformationMessage } from '../../../shared/observers/utils/showMessage.js'; +import { showErrorMessage, showInformationMessage } from '../../../shared/observers/utils/showMessage'; export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurationProvider { private static readonly autoDetectUserNotice: string = vscode.l10n.t( diff --git a/src/razor/src/blazorDebug/terminateDebugHandler.ts b/src/razor/src/blazorDebug/terminateDebugHandler.ts index ea7e43bd9d..6c60d3f5a8 100644 --- a/src/razor/src/blazorDebug/terminateDebugHandler.ts +++ b/src/razor/src/blazorDebug/terminateDebugHandler.ts @@ -6,7 +6,7 @@ import psList from 'ps-list'; import { DebugSession } from 'vscode'; import { LogOutputChannel } from 'vscode'; -import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants.js'; +import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; export const isValidEvent = (name: string) => { // The name can be of the form: `Debug Blazor Web Assembly in Browser: https://localhost:7291` diff --git a/src/razor/src/colorPresentation/colorPresentationHandler.ts b/src/razor/src/colorPresentation/colorPresentationHandler.ts index 3e3bd17c83..dbe21cd5f6 100644 --- a/src/razor/src/colorPresentation/colorPresentationHandler.ts +++ b/src/razor/src/colorPresentation/colorPresentationHandler.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit.js'; -import { ColorPresentationContext } from './colorPresentationContext.js'; -import { SerializableColorPresentation } from './serializableColorPresentation.js'; -import { SerializableColorPresentationParams } from './serializableColorPresentationParams.js'; +import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit'; +import { ColorPresentationContext } from './colorPresentationContext'; +import { SerializableColorPresentation } from './serializableColorPresentation'; +import { SerializableColorPresentationParams } from './serializableColorPresentationParams'; export class ColorPresentationHandler { constructor() {} diff --git a/src/razor/src/colorPresentation/serializableColorPresentation.ts b/src/razor/src/colorPresentation/serializableColorPresentation.ts index 16ec7523c0..6d5de76161 100644 --- a/src/razor/src/colorPresentation/serializableColorPresentation.ts +++ b/src/razor/src/colorPresentation/serializableColorPresentation.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SerializableTextEdit } from '../rpc/serializableTextEdit.js'; +import { SerializableTextEdit } from '../rpc/serializableTextEdit'; export class SerializableColorPresentation { constructor( diff --git a/src/razor/src/colorPresentation/serializableColorPresentationParams.ts b/src/razor/src/colorPresentation/serializableColorPresentationParams.ts index eb163e17c3..f9c74c533c 100644 --- a/src/razor/src/colorPresentation/serializableColorPresentationParams.ts +++ b/src/razor/src/colorPresentation/serializableColorPresentationParams.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { SerializableRange } from '../rpc/serializableRange.js'; -import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier.js'; +import { SerializableRange } from '../rpc/serializableRange'; +import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier'; export interface SerializableColorPresentationParams { textDocument: SerializableTextDocumentIdentifier; diff --git a/src/razor/src/documentColor/documentColorHandler.ts b/src/razor/src/documentColor/documentColorHandler.ts index 9173e6da5c..9a451ea98f 100644 --- a/src/razor/src/documentColor/documentColorHandler.ts +++ b/src/razor/src/documentColor/documentColorHandler.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertRangeToSerializable } from '../rpc/serializableRange.js'; -import { SerializableColorInformation } from './serializableColorInformation.js'; +import { convertRangeToSerializable } from '../rpc/serializableRange'; +import { SerializableColorInformation } from './serializableColorInformation'; export class DocumentColorHandler { constructor() {} diff --git a/src/razor/src/documentColor/serializableColorInformation.ts b/src/razor/src/documentColor/serializableColorInformation.ts index fdd2f1674c..76572b986e 100644 --- a/src/razor/src/documentColor/serializableColorInformation.ts +++ b/src/razor/src/documentColor/serializableColorInformation.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { SerializableRange } from '../rpc/serializableRange.js'; +import { SerializableRange } from '../rpc/serializableRange'; export class SerializableColorInformation { constructor( diff --git a/src/razor/src/folding/foldingRangeHandler.ts b/src/razor/src/folding/foldingRangeHandler.ts index 3fd8ccf991..762ccadb1a 100644 --- a/src/razor/src/folding/foldingRangeHandler.ts +++ b/src/razor/src/folding/foldingRangeHandler.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { FoldingRange, FoldingRangeKind } from 'vscode-languageclient'; -import { ObservableLogOutputChannel } from '../../../lsptoolshost/logging/observableLogOutputChannel.js'; +import { ObservableLogOutputChannel } from '../../../lsptoolshost/logging/observableLogOutputChannel'; export class FoldingRangeHandler { constructor() {} diff --git a/src/razor/src/formatting/formattingHandler.ts b/src/razor/src/formatting/formattingHandler.ts index 542c80ce65..15fcc05be6 100644 --- a/src/razor/src/formatting/formattingHandler.ts +++ b/src/razor/src/formatting/formattingHandler.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit.js'; -import { SerializableFormattingResponse } from './serializableFormattingResponse.js'; -import { SerializablePosition } from '../rpc/serializablePosition.js'; +import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit'; +import { SerializableFormattingResponse } from './serializableFormattingResponse'; +import { SerializablePosition } from '../rpc/serializablePosition'; export class FormattingHandler { private static emptyFormattingResponse = new SerializableFormattingResponse(); diff --git a/src/razor/src/formatting/serializableFormattingResponse.ts b/src/razor/src/formatting/serializableFormattingResponse.ts index 86662658c3..615917b6f6 100644 --- a/src/razor/src/formatting/serializableFormattingResponse.ts +++ b/src/razor/src/formatting/serializableFormattingResponse.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SerializableTextEdit } from '../rpc/serializableTextEdit.js'; +import { SerializableTextEdit } from '../rpc/serializableTextEdit'; export class SerializableFormattingResponse { constructor(public readonly edits?: SerializableTextEdit[]) {} diff --git a/src/razor/src/razorLanguage.ts b/src/razor/src/razorLanguage.ts index 941bc7dd74..7e7b29bca3 100644 --- a/src/razor/src/razorLanguage.ts +++ b/src/razor/src/razorLanguage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from './vscodeAdapter.js'; +import * as vscode from './vscodeAdapter'; export class RazorLanguage { public static id = 'aspnetcorerazor'; diff --git a/src/razor/src/razorLanguageConfiguration.ts b/src/razor/src/razorLanguageConfiguration.ts index ecbc12c042..9b754bc24b 100644 --- a/src/razor/src/razorLanguageConfiguration.ts +++ b/src/razor/src/razorLanguageConfiguration.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RazorLanguage } from './razorLanguage.js'; +import { RazorLanguage } from './razorLanguage'; const VOID_ELEMENTS: string[] = [ 'area', diff --git a/src/razor/src/rpc/serializableRange.ts b/src/razor/src/rpc/serializableRange.ts index 4fe21721b7..8f0c8ed55c 100644 --- a/src/razor/src/rpc/serializableRange.ts +++ b/src/razor/src/rpc/serializableRange.ts @@ -8,7 +8,7 @@ import { convertPositionFromSerializable, convertPositionToSerializable, SerializablePosition, -} from './serializablePosition.js'; +} from './serializablePosition'; // We'd typically just use vscode.Range here; however, that type doesn't serialize properly over the wire. export interface SerializableRange { diff --git a/src/razor/src/rpc/serializableTextEdit.ts b/src/razor/src/rpc/serializableTextEdit.ts index 5a6c5f9ed8..6a5ae5565d 100644 --- a/src/razor/src/rpc/serializableTextEdit.ts +++ b/src/razor/src/rpc/serializableTextEdit.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertRangeFromSerializable, convertRangeToSerializable, SerializableRange } from './serializableRange.js'; +import { convertRangeFromSerializable, convertRangeToSerializable, SerializableRange } from './serializableRange'; // We'd typically just use vscode.TextEdit here; however, that type doesn't serialize properly over the wire. export interface SerializableTextEdit { diff --git a/src/shared/assets.ts b/src/shared/assets.ts index b20323bd3c..e9a3fa89c3 100644 --- a/src/shared/assets.ts +++ b/src/shared/assets.ts @@ -9,12 +9,12 @@ import { FormattingOptions, ModificationOptions } from 'jsonc-parser'; import * as os from 'os'; import * as path from 'path'; import * as tasks from 'vscode-tasks'; -import * as util from '../common.js'; +import * as util from '../common'; import * as vscode from 'vscode'; -import { tolerantParse } from '../json.js'; -import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider.js'; -import { showErrorMessage } from './observers/utils/showMessage.js'; +import { tolerantParse } from '../json'; +import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider'; +import { showErrorMessage } from './observers/utils/showMessage'; type DebugConsoleOptions = { console: string }; diff --git a/src/shared/configurationProvider.ts b/src/shared/configurationProvider.ts index 3798854d8b..a073e24168 100644 --- a/src/shared/configurationProvider.ts +++ b/src/shared/configurationProvider.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ParsedEnvironmentFile } from '../coreclrDebug/parsedEnvironmentFile.js'; -import { debugSessionTracker } from '../coreclrDebug/provisionalDebugSessionTracker.js'; +import { ParsedEnvironmentFile } from '../coreclrDebug/parsedEnvironmentFile'; +import { debugSessionTracker } from '../coreclrDebug/provisionalDebugSessionTracker'; -import { CertToolStatusCodes, createSelfSignedCert, hasDotnetDevCertsHttps } from '../utils/dotnetDevCertsHttps.js'; +import { CertToolStatusCodes, createSelfSignedCert, hasDotnetDevCertsHttps } from '../utils/dotnetDevCertsHttps'; import { AttachItem, RemoteAttachPicker, DotNetAttachItemsProviderFactory, AttachPicker, -} from '../shared/processPicker.js'; -import { PlatformInformation } from './platform.js'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit.js'; +} from '../shared/processPicker'; +import { PlatformInformation } from './platform'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit'; import { ActionOption, showErrorMessageWithOptions, showInformationMessage, showWarningMessage, -} from './observers/utils/showMessage.js'; +} from './observers/utils/showMessage'; /** * Class used for debug configurations that will be sent to the debugger registered by {@link DebugAdapterExecutableFactory} diff --git a/src/shared/constants/IHostExecutableResolver.ts b/src/shared/constants/IHostExecutableResolver.ts index b13c8f5954..f1c783ef63 100644 --- a/src/shared/constants/IHostExecutableResolver.ts +++ b/src/shared/constants/IHostExecutableResolver.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { HostExecutableInformation } from './hostExecutableInformation.js'; +import { HostExecutableInformation } from './hostExecutableInformation'; export interface IHostExecutableResolver { getHostExecutableInfo(): Promise; diff --git a/src/shared/dotnetConfigurationProvider.ts b/src/shared/dotnetConfigurationProvider.ts index 05050bc0b1..f18134e238 100644 --- a/src/shared/dotnetConfigurationProvider.ts +++ b/src/shared/dotnetConfigurationProvider.ts @@ -5,16 +5,16 @@ import fs from 'fs-extra'; import * as vscode from 'vscode'; -import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider.js'; -import { AssetGenerator, AssetOperations, addTasksJsonIfNecessary, getBuildOperations } from './assets.js'; -import { getServiceBroker } from '../lsptoolshost/serviceBroker/brokeredServicesHosting.js'; -import Descriptors from '../lsptoolshost/solutionSnapshot/descriptors.js'; +import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider'; +import { AssetGenerator, AssetOperations, addTasksJsonIfNecessary, getBuildOperations } from './assets'; +import { getServiceBroker } from '../lsptoolshost/serviceBroker/brokeredServicesHosting'; +import Descriptors from '../lsptoolshost/solutionSnapshot/descriptors'; import { DotnetDebugConfigurationServiceErrorKind, IDotnetDebugConfigurationService, IDotnetDebugConfigurationServiceResult, -} from '../lsptoolshost/debugger/IDotnetDebugConfigurationService.js'; -import { DotnetWorkspaceConfigurationProvider } from './workspaceConfigurationProvider.js'; +} from '../lsptoolshost/debugger/IDotnetDebugConfigurationService'; +import { DotnetWorkspaceConfigurationProvider } from './workspaceConfigurationProvider'; // User errors that can be shown to the user. class LaunchServiceError extends Error {} diff --git a/src/shared/limitedActivationStatus.ts b/src/shared/limitedActivationStatus.ts index 86e047bce6..d365c25d30 100644 --- a/src/shared/limitedActivationStatus.ts +++ b/src/shared/limitedActivationStatus.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { languageServerOptions } from './options.js'; -import { RazorLanguage } from '../razor/src/razorLanguage.js'; -import { combineDocumentSelectors } from './utils/combineDocumentSelectors.js'; +import { languageServerOptions } from './options'; +import { RazorLanguage } from '../razor/src/razorLanguage'; +import { combineDocumentSelectors } from './utils/combineDocumentSelectors'; export class LimitedActivationStatus { static createStatusItem(context: vscode.ExtensionContext) { diff --git a/src/shared/loggingEvents.ts b/src/shared/loggingEvents.ts index 0fc9ed442b..77addb4da8 100644 --- a/src/shared/loggingEvents.ts +++ b/src/shared/loggingEvents.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventType } from './eventType.js'; -import { PlatformInformation } from './platform.js'; +import { EventType } from './eventType'; +import { PlatformInformation } from './platform'; export interface BaseEvent { type: EventType; diff --git a/src/shared/migrateOptions.ts b/src/shared/migrateOptions.ts index 35f9e475c9..7ddc0cb9a4 100644 --- a/src/shared/migrateOptions.ts +++ b/src/shared/migrateOptions.ts @@ -6,9 +6,9 @@ import * as fs from 'fs'; import * as path from 'path'; import { types } from 'util'; -import { ConfigurationTarget, vscode, WorkspaceConfiguration } from '../vscodeAdapter.js'; -import { CSharpExtensionId } from '../constants/csharpExtensionId.js'; -import { commonOptions } from './options.js'; +import { ConfigurationTarget, vscode, WorkspaceConfiguration } from '../vscodeAdapter'; +import { CSharpExtensionId } from '../constants/csharpExtensionId'; +import { commonOptions } from './options'; export interface IDotnetAcquisitionExistingPaths { extensionId: string; diff --git a/src/shared/observables/createOptionStream.ts b/src/shared/observables/createOptionStream.ts index 676b58974b..9d977a5653 100644 --- a/src/shared/observables/createOptionStream.ts +++ b/src/shared/observables/createOptionStream.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from '../../vscodeAdapter.js'; +import { vscode } from '../../vscodeAdapter'; import { Observable, Observer } from 'rxjs'; import { publishBehavior } from 'rxjs/operators'; diff --git a/src/shared/observers/baseChannelObserver.ts b/src/shared/observers/baseChannelObserver.ts index 779e547565..1942129df4 100644 --- a/src/shared/observers/baseChannelObserver.ts +++ b/src/shared/observers/baseChannelObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../../vscodeAdapter.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import * as vscode from '../../vscodeAdapter'; +import { BaseEvent } from '../../shared/loggingEvents'; export abstract class BaseChannelObserver { constructor(private channel: vscode.OutputChannel) {} diff --git a/src/shared/observers/baseLoggerObserver.ts b/src/shared/observers/baseLoggerObserver.ts index 847e41573f..b6478572cb 100644 --- a/src/shared/observers/baseLoggerObserver.ts +++ b/src/shared/observers/baseLoggerObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../../vscodeAdapter.js'; -import { Logger } from '../../logger.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import * as vscode from '../../vscodeAdapter'; +import { Logger } from '../../logger'; +import { BaseEvent } from '../../shared/loggingEvents'; export abstract class BaseLoggerObserver { public logger: Logger; diff --git a/src/shared/observers/csharpChannelObserver.ts b/src/shared/observers/csharpChannelObserver.ts index 6732eeab3c..ccc96b39f4 100644 --- a/src/shared/observers/csharpChannelObserver.ts +++ b/src/shared/observers/csharpChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from './baseChannelObserver.js'; -import { EventType } from '../eventType.js'; -import { BaseEvent } from '../../shared/loggingEvents.js'; +import { BaseChannelObserver } from './baseChannelObserver'; +import { EventType } from '../eventType'; +import { BaseEvent } from '../../shared/loggingEvents'; export class CsharpChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/shared/observers/csharpLoggerObserver.ts b/src/shared/observers/csharpLoggerObserver.ts index 727c772f90..e702586214 100644 --- a/src/shared/observers/csharpLoggerObserver.ts +++ b/src/shared/observers/csharpLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from './baseLoggerObserver.js'; -import * as Event from '../../shared/loggingEvents.js'; -import { PackageError } from '../../packageManager/packageError.js'; -import { EventType } from '../eventType.js'; +import { BaseLoggerObserver } from './baseLoggerObserver'; +import * as Event from '../../shared/loggingEvents'; +import { PackageError } from '../../packageManager/packageError'; +import { EventType } from '../eventType'; export class CsharpLoggerObserver extends BaseLoggerObserver { private dots = 0; diff --git a/src/shared/observers/optionChangeObserver.ts b/src/shared/observers/optionChangeObserver.ts index c122fbbcdd..b35fb396ec 100644 --- a/src/shared/observers/optionChangeObserver.ts +++ b/src/shared/observers/optionChangeObserver.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Observable } from 'rxjs'; -import Disposable from '../../disposable.js'; +import Disposable from '../../disposable'; import { isDeepStrictEqual } from 'util'; import { CommonOptions, @@ -13,7 +13,7 @@ import { commonOptions, languageServerOptions, omnisharpOptions, -} from '../options.js'; +} from '../options'; type RelevantOptionValues = { commonOptions: Map; diff --git a/src/shared/observers/utils/showMessage.ts b/src/shared/observers/utils/showMessage.ts index 11c2a6e8f3..6771a5dc98 100644 --- a/src/shared/observers/utils/showMessage.ts +++ b/src/shared/observers/utils/showMessage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { MessageOptions, vscode } from '../../../vscodeAdapter.js'; +import { MessageOptions, vscode } from '../../../vscodeAdapter'; /** * Show an error message toast. diff --git a/src/shared/platform.ts b/src/shared/platform.ts index 69bb3960e2..de1e48845d 100644 --- a/src/shared/platform.ts +++ b/src/shared/platform.ts @@ -7,7 +7,7 @@ import * as crypto from 'crypto'; import * as fs from 'fs'; import * as os from 'os'; import { fileURLToPath } from 'url'; -import * as util from '../common.js'; +import * as util from '../common'; const unknown = 'unknown'; const currentDirectory = fileURLToPath(new URL('.', import.meta.url)); diff --git a/src/shared/processPicker.ts b/src/shared/processPicker.ts index 9b8131617b..ffdd9b97ee 100644 --- a/src/shared/processPicker.ts +++ b/src/shared/processPicker.ts @@ -9,8 +9,8 @@ import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { PlatformInformation } from './platform.js'; -import { findPowerShell, getExtensionPath } from '../common.js'; +import { PlatformInformation } from './platform'; +import { findPowerShell, getExtensionPath } from '../common'; export interface AttachItem extends vscode.QuickPickItem { id: string; diff --git a/src/shared/projectConfiguration.ts b/src/shared/projectConfiguration.ts index 2d0e4920db..cd8162a2e5 100644 --- a/src/shared/projectConfiguration.ts +++ b/src/shared/projectConfiguration.ts @@ -5,9 +5,9 @@ import * as crypto from 'crypto'; import nodeMachineId from 'node-machine-id'; -import { PlatformInformation } from './platform.js'; -import { ITelemetryReporter, getTelemetryProps } from './telemetryReporter.js'; -import { DotnetInfo } from './utils/dotnetInfo.js'; +import { PlatformInformation } from './platform'; +import { ITelemetryReporter, getTelemetryProps } from './telemetryReporter'; +import { DotnetInfo } from './utils/dotnetInfo'; export interface ProjectConfigurationMessage { ProjectId: string; diff --git a/src/shared/reportIssue.ts b/src/shared/reportIssue.ts index db8ac8133a..2645adfa08 100644 --- a/src/shared/reportIssue.ts +++ b/src/shared/reportIssue.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.js'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; import { basename, dirname } from 'path'; -import { DotnetInfo } from './utils/dotnetInfo.js'; -import { CSharpExtensionId } from '../constants/csharpExtensionId.js'; -import { commonOptions, LanguageServerOptions, languageServerOptions } from './options.js'; +import { DotnetInfo } from './utils/dotnetInfo'; +import { CSharpExtensionId } from '../constants/csharpExtensionId'; +import { commonOptions, LanguageServerOptions, languageServerOptions } from './options'; export default async function reportIssue( context: vscode.ExtensionContext, diff --git a/src/shared/telemetryReporter.ts b/src/shared/telemetryReporter.ts index 6564bc5ac7..f1533ebced 100644 --- a/src/shared/telemetryReporter.ts +++ b/src/shared/telemetryReporter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from './platform.js'; +import { PlatformInformation } from './platform'; export interface ITelemetryReporter { sendTelemetryEvent( diff --git a/src/shared/utils/getDotnetInfo.ts b/src/shared/utils/getDotnetInfo.ts index 1bb55fb66d..69e3c896e6 100644 --- a/src/shared/utils/getDotnetInfo.ts +++ b/src/shared/utils/getDotnetInfo.ts @@ -5,9 +5,9 @@ import * as semver from 'semver'; import { join } from 'path'; -import { execChildProcess } from '../../common.js'; -import { CoreClrDebugUtil } from '../../coreclrDebug/util.js'; -import { DotnetInfo, RuntimeInfo } from './dotnetInfo.js'; +import { execChildProcess } from '../../common'; +import { CoreClrDebugUtil } from '../../coreclrDebug/util'; +import { DotnetInfo, RuntimeInfo } from './dotnetInfo'; import { EOL } from 'os'; // This function calls `dotnet --info` and returns the result as a DotnetInfo object. diff --git a/src/shared/workspaceConfigurationProvider.ts b/src/shared/workspaceConfigurationProvider.ts index 75d3ee757c..7c8c55c7ba 100644 --- a/src/shared/workspaceConfigurationProvider.ts +++ b/src/shared/workspaceConfigurationProvider.ts @@ -13,12 +13,12 @@ import { createAttachConfiguration, createFallbackLaunchConfiguration, getBuildOperations, -} from './assets.js'; +} from './assets'; import { parse } from 'jsonc-parser'; -import { IWorkspaceDebugInformationProvider } from './IWorkspaceDebugInformationProvider.js'; -import { PlatformInformation } from './platform.js'; -import { BaseVsDbgConfigurationProvider } from './configurationProvider.js'; -import { showErrorMessage } from './observers/utils/showMessage.js'; +import { IWorkspaceDebugInformationProvider } from './IWorkspaceDebugInformationProvider'; +import { PlatformInformation } from './platform'; +import { BaseVsDbgConfigurationProvider } from './configurationProvider'; +import { showErrorMessage } from './observers/utils/showMessage'; /** * This class will be used for providing debug configurations given workspace information. diff --git a/src/statusBarItemAdapter.ts b/src/statusBarItemAdapter.ts index 5e01fdfca1..5c62196679 100644 --- a/src/statusBarItemAdapter.ts +++ b/src/statusBarItemAdapter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from './vscodeAdapter.js'; +import * as vscodeAdapter from './vscodeAdapter'; import * as vscode from 'vscode'; export class StatusBarItemAdapter implements vscodeAdapter.StatusBarItem { diff --git a/src/textEditorAdapter.ts b/src/textEditorAdapter.ts index 98af074abe..de9e73b13b 100644 --- a/src/textEditorAdapter.ts +++ b/src/textEditorAdapter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from './vscodeAdapter.js'; +import * as vscodeAdapter from './vscodeAdapter'; import * as vscode from 'vscode'; export class TextEditorAdapter implements vscodeAdapter.TextEditor { diff --git a/src/tools/runtimeDependencyPackageUtils.ts b/src/tools/runtimeDependencyPackageUtils.ts index 9918d19a20..d5342b4e27 100644 --- a/src/tools/runtimeDependencyPackageUtils.ts +++ b/src/tools/runtimeDependencyPackageUtils.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform.js'; -import { AbsolutePathPackage } from '../packageManager/absolutePathPackage.js'; -import { filterPlatformPackages } from '../packageManager/packageFilterer.js'; -import { Package } from '../packageManager/package.js'; +import { PlatformInformation } from '../shared/platform'; +import { AbsolutePathPackage } from '../packageManager/absolutePathPackage'; +import { filterPlatformPackages } from '../packageManager/packageFilterer'; +import { Package } from '../packageManager/package'; export function getRuntimeDependencyPackageWithId( packageId: string, diff --git a/src/tools/updatePackageDependencies.ts b/src/tools/updatePackageDependencies.ts index bb2996e20d..dd94414dfb 100644 --- a/src/tools/updatePackageDependencies.ts +++ b/src/tools/updatePackageDependencies.ts @@ -5,13 +5,13 @@ import * as fs from 'fs'; import * as os from 'os'; -import { Package } from '../packageManager/package.js'; -import { DownloadFile } from '../packageManager/fileDownloader.js'; -import { EventStream } from '../eventStream.js'; -import * as Event from '../shared/loggingEvents.js'; -import NetworkSettings, { NetworkSettingsProvider } from '../networkSettings.js'; -import { getBufferIntegrityHash } from '../packageManager/isValidDownload.js'; -import { EventType } from '../shared/eventType.js'; +import { Package } from '../packageManager/package'; +import { DownloadFile } from '../packageManager/fileDownloader'; +import { EventStream } from '../eventStream'; +import * as Event from '../shared/loggingEvents'; +import NetworkSettings, { NetworkSettingsProvider } from '../networkSettings'; +import { getBufferIntegrityHash } from '../packageManager/isValidDownload'; +import { EventType } from '../shared/eventType'; interface PackageJSONFile { runtimeDependencies: Package[]; diff --git a/src/utils/dotnetDevCertsHttps.ts b/src/utils/dotnetDevCertsHttps.ts index a1dc478bed..9f7a20604f 100644 --- a/src/utils/dotnetDevCertsHttps.ts +++ b/src/utils/dotnetDevCertsHttps.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as cp from 'child_process'; -import { getExtensionPath } from '../common.js'; -import { commonOptions, omnisharpOptions } from '../shared/options.js'; +import { getExtensionPath } from '../common'; +import { commonOptions, omnisharpOptions } from '../shared/options'; // Will return true if `dotnet dev-certs https --check` succesfully finds a trusted development certificate. export async function hasDotnetDevCertsHttps(): Promise { diff --git a/src/utils/getCSharpDevKit.ts b/src/utils/getCSharpDevKit.ts index 4d54dc85d0..fcbcbd9e9c 100644 --- a/src/utils/getCSharpDevKit.ts +++ b/src/utils/getCSharpDevKit.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { CSharpDevKitExports } from '../csharpDevKitExports.js'; -import { languageServerOptions } from '../shared/options.js'; +import { CSharpDevKitExports } from '../csharpDevKitExports'; +import { languageServerOptions } from '../shared/options'; export const csharpDevkitExtensionId = 'ms-dotnettools.csdevkit'; export const csharpDevkitIntelliCodeExtensionId = 'ms-dotnettools.vscodeintellicode-csharp'; diff --git a/src/utils/getMonoVersion.ts b/src/utils/getMonoVersion.ts index 491b66fbf5..55814461e1 100644 --- a/src/utils/getMonoVersion.ts +++ b/src/utils/getMonoVersion.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { spawn } from 'child_process'; -import { IGetMonoVersion } from '../constants/IGetMonoVersion.js'; +import { IGetMonoVersion } from '../constants/IGetMonoVersion'; export const getMonoVersion: IGetMonoVersion = async (environment: NodeJS.ProcessEnv) => { const versionRegexp = /(\d+\.\d+\.\d+)/; diff --git a/src/utils/getMsBuildInfo.ts b/src/utils/getMsBuildInfo.ts index c0aa8ef093..fe608c73f1 100644 --- a/src/utils/getMsBuildInfo.ts +++ b/src/utils/getMsBuildInfo.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { join } from 'path'; -import { execChildProcess } from '../common.js'; -import { CoreClrDebugUtil } from '../coreclrDebug/util.js'; +import { execChildProcess } from '../common'; +import { CoreClrDebugUtil } from '../coreclrDebug/util'; let _msbuildVersion: string | undefined; diff --git a/tasks/compilation/copyEsmSupportFiles.ts b/tasks/compilation/copyEsmSupportFiles.ts index 3b211086c8..921b2fd102 100644 --- a/tasks/compilation/copyEsmSupportFiles.ts +++ b/tasks/compilation/copyEsmSupportFiles.ts @@ -5,7 +5,7 @@ import { copyFile, mkdir } from 'fs/promises'; import path from 'path'; -import { outPath, rootPath } from '../projectPaths.js'; +import { outPath, rootPath } from '../projectPaths'; const outputTestPath = path.join(outPath, 'test'); await mkdir(outputTestPath, { recursive: true }); diff --git a/tasks/components/publishRoslynCopilot.ts b/tasks/components/publishRoslynCopilot.ts index 9b2f79461c..37f9169698 100644 --- a/tasks/components/publishRoslynCopilot.ts +++ b/tasks/components/publishRoslynCopilot.ts @@ -14,9 +14,9 @@ import { createPullRequest, doesBranchExist, findPRByTitle, -} from '../gitTasks.js'; -import { updatePackageDependencies } from '../../src/tools/updatePackageDependencies.js'; -import { runTask } from '../runTask.js'; +} from '../gitTasks'; +import { updatePackageDependencies } from '../../src/tools/updatePackageDependencies'; +import { runTask } from '../runTask'; type Options = { userName?: string; diff --git a/tasks/debugger/fixLocUrls.ts b/tasks/debugger/fixLocUrls.ts index ed6de78fbc..05b93dc23a 100644 --- a/tasks/debugger/fixLocUrls.ts +++ b/tasks/debugger/fixLocUrls.ts @@ -5,7 +5,7 @@ import * as fs from 'fs'; import * as os from 'os'; -import { runTask } from '../runTask.js'; +import { runTask } from '../runTask'; runTask(fixLocUrls); diff --git a/tasks/debugger/generateOptionsSchema.ts b/tasks/debugger/generateOptionsSchema.ts index ebd8e193d6..82452807c5 100644 --- a/tasks/debugger/generateOptionsSchema.ts +++ b/tasks/debugger/generateOptionsSchema.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as optionsSchemaGenerator from '../../src/tools/generateOptionsSchema.js'; -import { runTask } from '../runTask.js'; +import * as optionsSchemaGenerator from '../../src/tools/generateOptionsSchema'; +import { runTask } from '../runTask'; runTask(optionsSchemaGenerator.GenerateOptionsSchema); diff --git a/tasks/debugger/updatePackageDependencies.ts b/tasks/debugger/updatePackageDependencies.ts index ddd59149c6..4b68bf66cb 100644 --- a/tasks/debugger/updatePackageDependencies.ts +++ b/tasks/debugger/updatePackageDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as packageDependencyUpdater from '../../src/tools/updatePackageDependencies.js'; -import { runTask } from '../runTask.js'; +import * as packageDependencyUpdater from '../../src/tools/updatePackageDependencies'; +import { runTask } from '../runTask'; runTask(packageDependencyUpdater.updatePackageDependencies); diff --git a/tasks/localization/publishLocalizationContent.ts b/tasks/localization/publishLocalizationContent.ts index 451e0f2afc..7939328368 100644 --- a/tasks/localization/publishLocalizationContent.ts +++ b/tasks/localization/publishLocalizationContent.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as util from 'node:util'; import { EOL } from 'node:os'; import { Octokit } from '@octokit/rest'; -import { runTask } from '../runTask.js'; +import { runTask } from '../runTask'; type Options = { userName?: string; diff --git a/tasks/packaging/installDependencies.ts b/tasks/packaging/installDependencies.ts index d8dbcd7764..0f1cf530bb 100644 --- a/tasks/packaging/installDependencies.ts +++ b/tasks/packaging/installDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { installDependencies } from './offlinePackagingTasks.js'; -import { runTask } from '../runTask.js'; +import { installDependencies } from './offlinePackagingTasks'; +import { runTask } from '../runTask'; runTask(installDependencies); diff --git a/tasks/packaging/installDependenciesClean.ts b/tasks/packaging/installDependenciesClean.ts index c527149955..cbb8b10d0f 100644 --- a/tasks/packaging/installDependenciesClean.ts +++ b/tasks/packaging/installDependenciesClean.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { installDependencies } from './offlinePackagingTasks.js'; -import { runTask } from '../runTask.js'; +import { installDependencies } from './offlinePackagingTasks'; +import { runTask } from '../runTask'; runTask(async () => installDependencies(/* clean */ true)); diff --git a/tasks/packaging/offlinePackagingTasks.ts b/tasks/packaging/offlinePackagingTasks.ts index e8e656f41f..a297b4ddae 100644 --- a/tasks/packaging/offlinePackagingTasks.ts +++ b/tasks/packaging/offlinePackagingTasks.ts @@ -7,14 +7,14 @@ import * as cp from 'child_process'; import * as fs from 'fs'; import fsextra from 'fs-extra'; import * as nbgv from 'nerdbank-gitversioning'; -import { Logger } from '../../src/logger.js'; -import { PlatformInformation } from '../../src/shared/platform.js'; -import { CsharpLoggerObserver } from '../../src/shared/observers/csharpLoggerObserver.js'; -import { EventStream } from '../../src/eventStream.js'; -import NetworkSettings from '../../src/networkSettings.js'; -import { downloadAndInstallPackages } from '../../src/packageManager/downloadAndInstallPackages.js'; -import { getRuntimeDependenciesPackages } from '../../src/tools/runtimeDependencyPackageUtils.js'; -import { getAbsolutePathPackagesToInstall } from '../../src/packageManager/getAbsolutePathPackagesToInstall.js'; +import { Logger } from '../../src/logger'; +import { PlatformInformation } from '../../src/shared/platform'; +import { CsharpLoggerObserver } from '../../src/shared/observers/csharpLoggerObserver'; +import { EventStream } from '../../src/eventStream'; +import NetworkSettings from '../../src/networkSettings'; +import { downloadAndInstallPackages } from '../../src/packageManager/downloadAndInstallPackages'; +import { getRuntimeDependenciesPackages } from '../../src/tools/runtimeDependencyPackageUtils'; +import { getAbsolutePathPackagesToInstall } from '../../src/packageManager/getAbsolutePathPackagesToInstall'; import { codeExtensionPath, packedVsixOutputRoot, @@ -24,10 +24,10 @@ import { devKitDependenciesDirectory, xamlToolsDirectory, testDiscoveryDirectory, -} from '../projectPaths.js'; -import { getPackageJSON } from '../packageJson.js'; -import { createPackageAsync, generateVsixManifest } from './vsceTasks.js'; -import { isValidDownload } from '../../src/packageManager/isValidDownload.js'; +} from '../projectPaths'; +import { getPackageJSON } from '../packageJson'; +import { createPackageAsync, generateVsixManifest } from './vsceTasks'; +import { isValidDownload } from '../../src/packageManager/isValidDownload'; import path from 'path'; import { CancellationToken } from 'vscode'; diff --git a/tasks/packaging/updateRoslynVersion.ts b/tasks/packaging/updateRoslynVersion.ts index c257cc5efa..78177d2fc2 100644 --- a/tasks/packaging/updateRoslynVersion.ts +++ b/tasks/packaging/updateRoslynVersion.ts @@ -8,9 +8,9 @@ import { allNugetPackages, installDependencies, updateNugetPackageVersion, -} from './offlinePackagingTasks.js'; -import { runTask } from '../runTask.js'; -import { getPackageJSON } from '../packageJson.js'; +} from './offlinePackagingTasks'; +import { runTask } from '../runTask'; +import { getPackageJSON } from '../packageJson'; runTask(updateRoslynVersion); diff --git a/tasks/packaging/vsceTasks.ts b/tasks/packaging/vsceTasks.ts index 529833da0e..787212fff5 100644 --- a/tasks/packaging/vsceTasks.ts +++ b/tasks/packaging/vsceTasks.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import * as util from '../../src/common.js'; +import * as util from '../../src/common'; import * as fs from 'fs'; -import spawnNode from '../spawnNode.js'; -import { vscePath } from '../projectPaths.js'; +import spawnNode from '../spawnNode'; +import { vscePath } from '../projectPaths'; /// Packaging (VSIX) Tasks export async function createPackageAsync( diff --git a/tasks/packaging/vsixReleasePackage.ts b/tasks/packaging/vsixReleasePackage.ts index 206558f124..17e238f6de 100644 --- a/tasks/packaging/vsixReleasePackage.ts +++ b/tasks/packaging/vsixReleasePackage.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import minimist from 'minimist'; -import { vsixReleasePackageTask } from './offlinePackagingTasks.js'; -import { runTask } from '../runTask.js'; +import { vsixReleasePackageTask } from './offlinePackagingTasks'; +import { runTask } from '../runTask'; const argv = minimist(process.argv.slice(2)); runTask(async () => await vsixReleasePackageTask(!!argv.prerelease)); diff --git a/tasks/profiling/profiling.ts b/tasks/profiling/profiling.ts index 2ee995438d..f6ccaea6d1 100644 --- a/tasks/profiling/profiling.ts +++ b/tasks/profiling/profiling.ts @@ -5,10 +5,10 @@ import fs from 'fs'; import * as path from 'path'; -import { basicSlnTestProject, runIntegrationTest } from '../tests/testHelpers.js'; -import { outPath } from '../projectPaths.js'; +import { basicSlnTestProject, runIntegrationTest } from '../tests/testHelpers'; +import { outPath } from '../projectPaths'; import { execSync } from 'child_process'; -import { runTask } from '../runTask.js'; +import { runTask } from '../runTask'; const profilingOutputFolder = path.join(outPath, 'profiling'); diff --git a/tasks/projectPaths.ts b/tasks/projectPaths.ts index 599f632270..28398a78de 100644 --- a/tasks/projectPaths.ts +++ b/tasks/projectPaths.ts @@ -5,8 +5,8 @@ import * as path from 'path'; import { fileURLToPath } from 'url'; -import { commandLineOptions } from './commandLineArguments.js'; -import { componentInfo } from '../src/lsptoolshost/extensions/builtInComponents.js'; +import { commandLineOptions } from './commandLineArguments'; +import { componentInfo } from '../src/lsptoolshost/extensions/builtInComponents'; export const rootPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); diff --git a/tasks/signing/installSignPlugin.ts b/tasks/signing/installSignPlugin.ts index ee9b5d2da1..3a3ad49344 100644 --- a/tasks/signing/installSignPlugin.ts +++ b/tasks/signing/installSignPlugin.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths.js'; -import { execDotnet } from './signingTasks.js'; -import { runTask } from '../runTask.js'; +import { rootPath } from '../projectPaths'; +import { execDotnet } from './signingTasks'; +import { runTask } from '../runTask'; runTask(installSignPlugin); diff --git a/tasks/signing/signJs.ts b/tasks/signing/signJs.ts index 9e2cdcabe2..91bc89969a 100644 --- a/tasks/signing/signJs.ts +++ b/tasks/signing/signJs.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths.js'; -import { execDotnet, getLogPath } from './signingTasks.js'; -import { runTask } from '../runTask.js'; +import { rootPath } from '../projectPaths'; +import { execDotnet, getLogPath } from './signingTasks'; +import { runTask } from '../runTask'; runTask(signJs); diff --git a/tasks/signing/signVsix.ts b/tasks/signing/signVsix.ts index c47e5abf1a..e38c05dd10 100644 --- a/tasks/signing/signVsix.ts +++ b/tasks/signing/signVsix.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths.js'; -import { execDotnet, getLogPath } from './signingTasks.js'; -import { runTask } from '../runTask.js'; +import { rootPath } from '../projectPaths'; +import { execDotnet, getLogPath } from './signingTasks'; +import { runTask } from '../runTask'; runTask(signVsix); diff --git a/tasks/signing/signingTasks.ts b/tasks/signing/signingTasks.ts index b528203875..19db4aaff3 100644 --- a/tasks/signing/signingTasks.ts +++ b/tasks/signing/signingTasks.ts @@ -5,7 +5,7 @@ import * as cp from 'child_process'; import * as fs from 'fs'; -import { rootPath } from '../projectPaths.js'; +import { rootPath } from '../projectPaths'; import path from 'path'; export function getLogPath(): string { diff --git a/tasks/signing/verifyVsix.ts b/tasks/signing/verifyVsix.ts index 969e298bad..d5eab1f3cf 100644 --- a/tasks/signing/verifyVsix.ts +++ b/tasks/signing/verifyVsix.ts @@ -5,8 +5,8 @@ import * as fs from 'fs'; import path from 'path'; -import { verifySignature } from '../packaging/vsceTasks.js'; -import { runTask } from '../runTask.js'; +import { verifySignature } from '../packaging/vsceTasks'; +import { runTask } from '../runTask'; runTask(verifyVsix); diff --git a/tasks/snap/incrementVersion.ts b/tasks/snap/incrementVersion.ts index 33ec17399b..0489adf690 100644 --- a/tasks/snap/incrementVersion.ts +++ b/tasks/snap/incrementVersion.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import minimist from 'minimist'; -import { addChangelogSection, getNextReleaseVersion, readVersionJson, writeVersionJson } from './snapTasks.js'; -import { runTask } from '../runTask.js'; +import { addChangelogSection, getNextReleaseVersion, readVersionJson, writeVersionJson } from './snapTasks'; +import { runTask } from '../runTask'; runTask(incrementVersion); diff --git a/tasks/snap/snapTasks.ts b/tasks/snap/snapTasks.ts index 9109627b69..d7c3e3a7f0 100644 --- a/tasks/snap/snapTasks.ts +++ b/tasks/snap/snapTasks.ts @@ -6,7 +6,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; -import { rootPath } from '../projectPaths.js'; +import { rootPath } from '../projectPaths'; /** * Calculate the next release (stable) version from the current version. diff --git a/tasks/snap/updateChangelog.ts b/tasks/snap/updateChangelog.ts index f073a329e4..dd8f23f25c 100644 --- a/tasks/snap/updateChangelog.ts +++ b/tasks/snap/updateChangelog.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import * as os from 'os'; import { exec } from 'child_process'; import { promisify } from 'util'; -import { rootPath } from '../projectPaths.js'; -import { findTagsByVersion } from '../gitTasks.js'; -import { runTask } from '../runTask.js'; +import { rootPath } from '../projectPaths'; +import { findTagsByVersion } from '../gitTasks'; +import { runTask } from '../runTask'; const execAsync = promisify(exec); const prRegex = /^\*.+\(PR: \[#(\d+)\]\(/; diff --git a/tasks/snap/updateVersionForStableRelease.ts b/tasks/snap/updateVersionForStableRelease.ts index 77a06af766..461d9df58f 100644 --- a/tasks/snap/updateVersionForStableRelease.ts +++ b/tasks/snap/updateVersionForStableRelease.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { readVersionJson, getNextReleaseVersion, writeVersionJson, addChangelogSection } from './snapTasks.js'; -import { runTask } from '../runTask.js'; +import { readVersionJson, getNextReleaseVersion, writeVersionJson, addChangelogSection } from './snapTasks'; +import { runTask } from '../runTask'; runTask(updateVersionForStableRelease); diff --git a/tasks/spawnNode.ts b/tasks/spawnNode.ts index 7602cb2639..5ea1987308 100644 --- a/tasks/spawnNode.ts +++ b/tasks/spawnNode.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { spawnSync, SpawnSyncOptions } from 'child_process'; -import { nodePath, rootPath } from './projectPaths.js'; +import { nodePath, rootPath } from './projectPaths'; export default async function spawnNode(args?: string[], options?: SpawnSyncOptions) { if (!options) { diff --git a/tasks/tags/createTags.ts b/tasks/tags/createTags.ts index 4d2d065ce2..8b010cd5d8 100644 --- a/tasks/tags/createTags.ts +++ b/tasks/tags/createTags.ts @@ -7,11 +7,11 @@ import * as fs from 'fs'; import { spawnSync } from 'child_process'; import minimist from 'minimist'; import { Octokit } from '@octokit/rest'; -import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from '../packaging/offlinePackagingTasks.js'; -import { PlatformInformation } from '../../src/shared/platform.js'; +import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from '../packaging/offlinePackagingTasks'; +import { PlatformInformation } from '../../src/shared/platform'; import path from 'path'; -import { runTask } from '../runTask.js'; -import { rootPath } from '../projectPaths.js'; +import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths'; runTask(createTags); diff --git a/tasks/tests/omnisharptest.ts b/tasks/tests/omnisharptest.ts index cf15c52256..f7cfcf0422 100644 --- a/tasks/tests/omnisharptest.ts +++ b/tasks/tests/omnisharptest.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestIntegration, omnisharpTestUnit } from './omnisharptestTasks.js'; -import { runTask } from '../runTask.js'; +import { omnisharpTestIntegration, omnisharpTestUnit } from './omnisharptestTasks'; +import { runTask } from '../runTask'; runTask(omnisharpTest); diff --git a/tasks/tests/omnisharptestIntegration.ts b/tasks/tests/omnisharptestIntegration.ts index 49d6691af1..5a537d7528 100644 --- a/tasks/tests/omnisharptestIntegration.ts +++ b/tasks/tests/omnisharptestIntegration.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestIntegration } from './omnisharptestTasks.js'; -import { runTask } from '../runTask.js'; +import { omnisharpTestIntegration } from './omnisharptestTasks'; +import { runTask } from '../runTask'; runTask(omnisharpTestIntegration); diff --git a/tasks/tests/omnisharptestTasks.ts b/tasks/tests/omnisharptestTasks.ts index eb7f3c63da..c47670eef0 100644 --- a/tasks/tests/omnisharptestTasks.ts +++ b/tasks/tests/omnisharptestTasks.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { codeExtensionPath, rootPath } from '../projectPaths.js'; -import { runJestIntegrationTest, runJestTest } from './testHelpers.js'; +import { codeExtensionPath, rootPath } from '../projectPaths'; +import { runJestIntegrationTest, runJestTest } from './testHelpers'; import { jestProjectNames } from '../../test/jestProjectNames.mjs'; const omnisharpIntegrationTestProjects = ['singleCsproj', 'slnWithCsproj', 'slnFilterWithCsproj', 'BasicRazorApp2_1']; diff --git a/tasks/tests/omnisharptestUnit.ts b/tasks/tests/omnisharptestUnit.ts index b7ff3f27bf..49dc4d9f37 100644 --- a/tasks/tests/omnisharptestUnit.ts +++ b/tasks/tests/omnisharptestUnit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestUnit } from './omnisharptestTasks.js'; -import { runTask } from '../runTask.js'; +import { omnisharpTestUnit } from './omnisharptestTasks'; +import { runTask } from '../runTask'; runTask(omnisharpTestUnit); diff --git a/tasks/tests/test.ts b/tasks/tests/test.ts index 4dec2231a2..3491d03160 100644 --- a/tasks/tests/test.ts +++ b/tasks/tests/test.ts @@ -10,8 +10,8 @@ import { testIntegrationRazorCohost, testIntegrationUntrusted, testUnit, -} from './testTasks.js'; -import { runTask } from '../runTask.js'; +} from './testTasks'; +import { runTask } from '../runTask'; runTask(test); diff --git a/tasks/tests/testArtifacts.ts b/tasks/tests/testArtifacts.ts index 78121bd66b..0612f2625d 100644 --- a/tasks/tests/testArtifacts.ts +++ b/tasks/tests/testArtifacts.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testArtifacts } from './testTasks.js'; -import { runTask } from '../runTask.js'; +import { testArtifacts } from './testTasks'; +import { runTask } from '../runTask'; runTask(testArtifacts); diff --git a/tasks/tests/testHelpers.ts b/tasks/tests/testHelpers.ts index d5d29eae98..07bcc700dd 100644 --- a/tasks/tests/testHelpers.ts +++ b/tasks/tests/testHelpers.ts @@ -7,8 +7,8 @@ import fs from 'fs'; import * as path from 'path'; import jest from 'jest'; import { Config } from '@jest/types'; -import { rootPath, outPath } from '../projectPaths.js'; -import { prepareVSCodeAndExecuteTests } from '../../test/vscodeLauncher.js'; +import { rootPath, outPath } from '../projectPaths'; +import { prepareVSCodeAndExecuteTests } from '../../test/vscodeLauncher'; export const basicSlnTestProject = 'slnWithCsproj'; export const integrationTestProjects = [basicSlnTestProject]; diff --git a/tasks/tests/testIntegrationCsharp.ts b/tasks/tests/testIntegrationCsharp.ts index 75009e32e7..249988b14e 100644 --- a/tasks/tests/testIntegrationCsharp.ts +++ b/tasks/tests/testIntegrationCsharp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationCSharp } from './testTasks.js'; -import { runTask } from '../runTask.js'; +import { testIntegrationCSharp } from './testTasks'; +import { runTask } from '../runTask'; runTask(testIntegrationCSharp); diff --git a/tasks/tests/testIntegrationDevkit.ts b/tasks/tests/testIntegrationDevkit.ts index b4a52f3c35..c47c15560f 100644 --- a/tasks/tests/testIntegrationDevkit.ts +++ b/tasks/tests/testIntegrationDevkit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationDevkit } from './testTasks.js'; -import { runTask } from '../runTask.js'; +import { testIntegrationDevkit } from './testTasks'; +import { runTask } from '../runTask'; runTask(testIntegrationDevkit); diff --git a/tasks/tests/testIntegrationRazorCohost.ts b/tasks/tests/testIntegrationRazorCohost.ts index 35d984ecdc..fa3585734b 100644 --- a/tasks/tests/testIntegrationRazorCohost.ts +++ b/tasks/tests/testIntegrationRazorCohost.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationRazorCohost } from './testTasks.js'; -import { runTask } from '../runTask.js'; +import { testIntegrationRazorCohost } from './testTasks'; +import { runTask } from '../runTask'; runTask(testIntegrationRazorCohost); diff --git a/tasks/tests/testIntegrationUntrusted.ts b/tasks/tests/testIntegrationUntrusted.ts index 8c76ac147a..d17e7baaa4 100644 --- a/tasks/tests/testIntegrationUntrusted.ts +++ b/tasks/tests/testIntegrationUntrusted.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationUntrusted } from './testTasks.js'; -import { runTask } from '../runTask.js'; +import { testIntegrationUntrusted } from './testTasks'; +import { runTask } from '../runTask'; runTask(testIntegrationUntrusted); diff --git a/tasks/tests/testTasks.ts b/tasks/tests/testTasks.ts index e8ae2851fc..2525958b18 100644 --- a/tasks/tests/testTasks.ts +++ b/tasks/tests/testTasks.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { integrationTestProjects, runDevKitIntegrationTests, runIntegrationTest, runJestTest } from './testHelpers.js'; +import { integrationTestProjects, runDevKitIntegrationTests, runIntegrationTest, runJestTest } from './testHelpers'; import { jestProjectNames } from '../../test/jestProjectNames.mjs'; const razorIntegrationTestProjects = ['RazorApp']; diff --git a/tasks/tests/testUnit.ts b/tasks/tests/testUnit.ts index f110925178..a1a25d13e2 100644 --- a/tasks/tests/testUnit.ts +++ b/tasks/tests/testUnit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testUnit } from './testTasks.js'; -import { runTask } from '../runTask.js'; +import { testUnit } from './testTasks'; +import { runTask } from '../runTask'; runTask(testUnit); diff --git a/test/createTmpAsset.ts b/test/createTmpAsset.ts index 0e0777161a..49cf447ca2 100644 --- a/test/createTmpAsset.ts +++ b/test/createTmpAsset.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as tmp from 'tmp'; import fsExtra from 'fs-extra'; -import { NestedError } from '../src/nestedError.js'; +import { NestedError } from '../src/nestedError'; export async function CreateTmpFile(): Promise { const tmpFile = await new Promise((resolve, reject) => { diff --git a/test/fakes.ts b/test/fakes.ts index e993d6d95a..da06b10f41 100644 --- a/test/fakes.ts +++ b/test/fakes.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../src/vscodeAdapter.js'; -import * as protocol from '../src/omnisharp/protocol.js'; -import { ITelemetryReporter } from '../src/shared/telemetryReporter.js'; +import * as vscode from '../src/vscodeAdapter'; +import * as protocol from '../src/omnisharp/protocol'; +import { ITelemetryReporter } from '../src/shared/telemetryReporter'; import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnError, OmnisharpServerUnresolvedDependencies, WorkspaceInformationUpdated, -} from '../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../src/omnisharp/omnisharpLoggingEvents'; export const getNullChannel = (): vscode.OutputChannel => { const returnChannel: vscode.OutputChannel = { diff --git a/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts index 6fbd033bf4..7d49a91670 100644 --- a/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts @@ -5,12 +5,12 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeAll, afterAll, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { AnalysisSetting, BuildDiagnosticsService, -} from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.js'; -import * as integrationHelpers from './integrationHelpers.js'; +} from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; +import * as integrationHelpers from './integrationHelpers'; import path from 'path'; describe(`Build and live diagnostics dedupe`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/classification.integration.test.ts b/test/lsptoolshost/integrationTests/classification.integration.test.ts index c679d6b73b..eeb454debd 100644 --- a/test/lsptoolshost/integrationTests/classification.integration.test.ts +++ b/test/lsptoolshost/integrationTests/classification.integration.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Classification Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/codeactions.integration.test.ts b/test/lsptoolshost/integrationTests/codeactions.integration.test.ts index 2c617dc3fe..e4b0c90bb5 100644 --- a/test/lsptoolshost/integrationTests/codeactions.integration.test.ts +++ b/test/lsptoolshost/integrationTests/codeactions.integration.test.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; +} from './integrationHelpers'; describe(`Code Actions Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/codelens.integration.test.ts b/test/lsptoolshost/integrationTests/codelens.integration.test.ts index fac8d9eb04..7af16faa2c 100644 --- a/test/lsptoolshost/integrationTests/codelens.integration.test.ts +++ b/test/lsptoolshost/integrationTests/codelens.integration.test.ts @@ -7,13 +7,13 @@ import * as lsp from 'vscode-languageclient'; import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, getCodeLensesAsync, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; +} from './integrationHelpers'; describe(`CodeLens Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts b/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts index 57116234e9..c84d995fb1 100644 --- a/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts +++ b/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts @@ -5,14 +5,14 @@ import { expect, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, testIfCSharp, testIfDevKit } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { activateCSharpExtension, testIfCSharp, testIfDevKit } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { RoslynDevKitCommands, RoslynStandaloneCommands, UnexpectedRoslynDevKitCommands, UnexpectedRoslynStandaloneCommands, -} from './expectedCommands.js'; +} from './expectedCommands'; describe(`Command Enablement Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/completion.integration.test.ts b/test/lsptoolshost/integrationTests/completion.integration.test.ts index eb5a2d2d6b..4924a9a99a 100644 --- a/test/lsptoolshost/integrationTests/completion.integration.test.ts +++ b/test/lsptoolshost/integrationTests/completion.integration.test.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, getCompletionsAsync, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; +} from './integrationHelpers'; describe(`Completion Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts b/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts index 59d9fbbdf7..fbf6f2fae7 100644 --- a/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts +++ b/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { expect } from '@jest/globals'; -import { restartLanguageServer, waitForExpectedResult } from './integrationHelpers.js'; +import { restartLanguageServer, waitForExpectedResult } from './integrationHelpers'; function sortDiagnostics(diagnostics: vscode.Diagnostic[]): vscode.Diagnostic[] { return diagnostics.sort((a, b) => { diff --git a/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts index a5514e38a1..149d6e6b5b 100644 --- a/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts @@ -5,16 +5,16 @@ import * as vscode from 'vscode'; import { describe, test, beforeAll, afterAll, expect, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; import path from 'path'; -import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers.js'; +import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers'; import { activateCSharpExtension, closeAllEditorsAsync, describeIfCSharp, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; +} from './integrationHelpers'; // Restarting the server is required for these tests, but not supported with C# Dev Kit. describeIfCSharp(`Document Diagnostics Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts b/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts index abf3444329..bfe1022cd5 100644 --- a/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts +++ b/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll, describe, afterEach, beforeEach } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; describe(`Document Symbol Tests`, () => { let fileUri: vscode.Uri; diff --git a/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts b/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts index 648df303c3..362118b3c6 100644 --- a/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts +++ b/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -15,9 +15,9 @@ import { waitForAllAsyncOperationsAsync, waitForExpectedResult, describeIfFileBasedPrograms, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import { CSharpExtensionExports } from '../../../src/csharpExtensionExports.js'; +import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; describeIfFileBasedPrograms(`File-based Programs Tests`, () => { let exports: CSharpExtensionExports; diff --git a/test/lsptoolshost/integrationTests/formatting.integration.test.ts b/test/lsptoolshost/integrationTests/formatting.integration.test.ts index f6ab3c33a0..8549717ec6 100644 --- a/test/lsptoolshost/integrationTests/formatting.integration.test.ts +++ b/test/lsptoolshost/integrationTests/formatting.integration.test.ts @@ -5,15 +5,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { describe, beforeEach, afterAll, test, afterEach } from '@jest/globals'; -import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers.js'; +import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers'; describe(`Formatting Tests`, () => { beforeEach(async () => { diff --git a/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts b/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts index bb010bcdee..67452574e1 100644 --- a/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts +++ b/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts @@ -5,15 +5,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, afterEach } from '@jest/globals'; -import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers.js'; +import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers'; describe(`Formatting With EditorConfig Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts b/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts index 4fd27e58a3..6de7304141 100644 --- a/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts +++ b/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -14,7 +14,7 @@ import { openFileInWorkspaceAsync, testIfCSharp, testIfDevKit, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; /** diff --git a/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts b/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts index 5239f5f40c..f62d694932 100644 --- a/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts +++ b/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, sortLocations, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Go To Implementation Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/hover.integration.test.ts b/test/lsptoolshost/integrationTests/hover.integration.test.ts index 1cf29f5488..ff9a3a3182 100644 --- a/test/lsptoolshost/integrationTests/hover.integration.test.ts +++ b/test/lsptoolshost/integrationTests/hover.integration.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { EOL } from 'os'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Hover Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/integrationHelpers.ts b/test/lsptoolshost/integrationTests/integrationHelpers.ts index a3ac5a1b6e..4f87296490 100644 --- a/test/lsptoolshost/integrationTests/integrationHelpers.ts +++ b/test/lsptoolshost/integrationTests/integrationHelpers.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import * as semver from 'semver'; -import { CSharpExtensionExports } from '../../../src/csharpExtensionExports.js'; +import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; import { existsSync } from 'fs'; -import { ServerState } from '../../../src/lsptoolshost/server/languageServerEvents.js'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import { ServerState } from '../../../src/lsptoolshost/server/languageServerEvents'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { EOL, platform } from 'os'; import { describe, expect, test } from '@jest/globals'; -import { WaitForAsyncOperationsRequest } from './testHooks.js'; +import { WaitForAsyncOperationsRequest } from './testHooks'; export async function activateCSharpExtension(): Promise { const csharpExtension = vscode.extensions.getExtension('ms-dotnettools.csharp'); diff --git a/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts b/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts index 872c299c6a..678023f11f 100644 --- a/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts +++ b/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { describe, beforeAll, afterAll, test, expect, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import * as integrationHelpers from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import * as integrationHelpers from './integrationHelpers'; import { InlayHint, InlayHintKind, Position } from 'vscode-languageclient'; describe(`Inlay Hints Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts b/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts index 0bc0d55acc..59717573af 100644 --- a/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts +++ b/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts @@ -5,14 +5,14 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, revertActiveFile, waitForExpectedResult, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; import { EOL } from 'os'; diff --git a/test/lsptoolshost/integrationTests/references.integration.test.ts b/test/lsptoolshost/integrationTests/references.integration.test.ts index 2bd9e64c44..f17706c7eb 100644 --- a/test/lsptoolshost/integrationTests/references.integration.test.ts +++ b/test/lsptoolshost/integrationTests/references.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, sortLocations, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Find References Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts b/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts index 82463204a1..92d0f41117 100644 --- a/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts +++ b/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Signature Help Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts b/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts index 28709a1c8a..3acd32e37e 100644 --- a/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts +++ b/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -13,7 +13,7 @@ import { openFileInWorkspaceAsync, sleep, sortLocations, -} from './integrationHelpers.js'; +} from './integrationHelpers'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach, describe } from '@jest/globals'; describe(`Source Generator Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/testAssets/razorApp.ts b/test/lsptoolshost/integrationTests/testAssets/razorApp.ts index 03ca6bbcba..7692d29fe8 100644 --- a/test/lsptoolshost/integrationTests/testAssets/razorApp.ts +++ b/test/lsptoolshost/integrationTests/testAssets/razorApp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets.js'; +import { ITestAssetWorkspace } from './testAssets'; const workspace: ITestAssetWorkspace = { description: 'Razor App', diff --git a/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts index 986aa4d9ee..f53fabdbaf 100644 --- a/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets.js'; +import { ITestAssetWorkspace } from './testAssets'; const workspace: ITestAssetWorkspace = { description: 'single csproj at root of workspace', diff --git a/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts index f4f162b5ef..6e9d9ba449 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets.js'; +import { ITestAssetWorkspace } from './testAssets'; const workspace: ITestAssetWorkspace = { description: "sln filter with a csproj's", diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts index 499dab6864..4973fface7 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets.js'; +import { ITestAssetWorkspace } from './testAssets'; const workspace: ITestAssetWorkspace = { description: "sln with several csproj's", diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts b/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts index 4f8134bb21..79a221f780 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets.js'; +import { ITestAssetWorkspace } from './testAssets'; const workspace: ITestAssetWorkspace = { description: 'sln with a source generator', diff --git a/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts b/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts index 450590f01f..842ab375ce 100644 --- a/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts +++ b/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts @@ -6,13 +6,13 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { ITestAssetWorkspace, TestAssetWorkspace } from './testAssets.js'; +import { ITestAssetWorkspace, TestAssetWorkspace } from './testAssets'; -import singleCsproj from './singleCsproj.js'; -import slnWithCsproj from './slnWithCsproj.js'; -import slnFilterWithCsproj from './slnFilterWithCsproj.js'; -import RazorApp from './razorApp.js'; -import slnWithGenerator from './slnWithGenerator.js'; +import singleCsproj from './singleCsproj'; +import slnWithCsproj from './slnWithCsproj'; +import slnFilterWithCsproj from './slnFilterWithCsproj'; +import RazorApp from './razorApp'; +import slnWithGenerator from './slnWithGenerator'; const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { singleCsproj, diff --git a/test/lsptoolshost/integrationTests/testAssets/testAssets.ts b/test/lsptoolshost/integrationTests/testAssets/testAssets.ts index 80a36a405a..0cf326067c 100644 --- a/test/lsptoolshost/integrationTests/testAssets/testAssets.ts +++ b/test/lsptoolshost/integrationTests/testAssets/testAssets.ts @@ -6,8 +6,8 @@ import fs from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; -import spawnGit from './spawnGit.js'; -import { execChildProcess } from '../../../../src/common.js'; +import spawnGit from './spawnGit'; +import { execChildProcess } from '../../../../src/common'; export class TestAssetProject { constructor(project: ITestAssetProject) { diff --git a/test/lsptoolshost/integrationTests/unitTests.integration.test.ts b/test/lsptoolshost/integrationTests/unitTests.integration.test.ts index 7cea14c89d..8753a65607 100644 --- a/test/lsptoolshost/integrationTests/unitTests.integration.test.ts +++ b/test/lsptoolshost/integrationTests/unitTests.integration.test.ts @@ -6,15 +6,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; import { activateCSharpExtension, closeAllEditorsAsync, describeIfCSharp, getCodeLensesAsync, openFileInWorkspaceAsync, -} from './integrationHelpers.js'; -import { TestProgress } from '../../../src/lsptoolshost/server/roslynProtocol.js'; +} from './integrationHelpers'; +import { TestProgress } from '../../../src/lsptoolshost/server/roslynProtocol'; describeIfCSharp(`Unit Testing Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts index f42287c2c4..50388aa0b7 100644 --- a/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeAll, afterAll } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.js'; -import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers.js'; -import { activateCSharpExtension, describeIfCSharp } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; +import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers'; +import { activateCSharpExtension, describeIfCSharp } from './integrationHelpers'; // Restarting the server is required for these tests, but not supported with C# Dev Kit. describeIfCSharp(`Workspace Diagnostic Tests`, () => { diff --git a/test/lsptoolshost/unitTests/captureActivityLogs.test.ts b/test/lsptoolshost/unitTests/captureActivityLogs.test.ts index 752d6ca63e..1cf040f954 100644 --- a/test/lsptoolshost/unitTests/captureActivityLogs.test.ts +++ b/test/lsptoolshost/unitTests/captureActivityLogs.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { LogObserver } from '../../../src/lsptoolshost/logging/observableLogOutputChannel.js'; +import { LogObserver } from '../../../src/lsptoolshost/logging/observableLogOutputChannel'; describe('captureActivityLogs', () => { describe('LogObserver', () => { diff --git a/test/lsptoolshost/unitTests/configurationMiddleware.test.ts b/test/lsptoolshost/unitTests/configurationMiddleware.test.ts index 6d50e310aa..759d8bc46f 100644 --- a/test/lsptoolshost/unitTests/configurationMiddleware.test.ts +++ b/test/lsptoolshost/unitTests/configurationMiddleware.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { readFileSync } from 'fs'; -import { convertServerOptionNameToClientConfigurationName } from '../../../src/lsptoolshost/options/optionNameConverter.js'; +import { convertServerOptionNameToClientConfigurationName } from '../../../src/lsptoolshost/options/optionNameConverter'; import { describe, test, expect } from '@jest/globals'; const editorBehaviorSection = 1; diff --git a/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts b/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts index 5c6bf47a8c..722765e2c3 100644 --- a/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts +++ b/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getNullChannel } from '../../fakes.js'; -import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver.js'; +import { getNullChannel } from '../../fakes'; +import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver'; import { InstallationFailure, BaseEvent, @@ -13,7 +13,7 @@ import { IntegrityCheckFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, -} from '../../../src/shared/loggingEvents.js'; +} from '../../../src/shared/loggingEvents'; describe('CsharpChannelObserver', () => { [ diff --git a/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts b/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts index b4fe0c7cf0..f757ab824f 100644 --- a/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts +++ b/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../fakes.js'; -import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver.js'; -import { PlatformInformation } from '../../../src/shared/platform.js'; -import { PackageError } from '../../../src/packageManager/packageError.js'; -import { Package } from '../../../src/packageManager/package.js'; -import * as Event from '../../../src/shared/loggingEvents.js'; +import { getNullChannel } from '../../fakes'; +import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver'; +import { PlatformInformation } from '../../../src/shared/platform'; +import { PackageError } from '../../../src/packageManager/packageError'; +import { Package } from '../../../src/packageManager/package'; +import * as Event from '../../../src/shared/loggingEvents'; describe('CsharpLoggerObserver', () => { let logOutput = ''; diff --git a/test/lsptoolshost/unitTests/json.test.ts b/test/lsptoolshost/unitTests/json.test.ts index 96b5541525..d0a4acf4f4 100644 --- a/test/lsptoolshost/unitTests/json.test.ts +++ b/test/lsptoolshost/unitTests/json.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { tolerantParse } from '../../../src/json.js'; +import { tolerantParse } from '../../../src/json'; import { describe, test, expect } from '@jest/globals'; describe('JSON', () => { diff --git a/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts b/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts index 09d144b80f..0e439e4ddb 100644 --- a/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts +++ b/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts @@ -5,11 +5,11 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { registerLanguageServerOptionChanges } from '../../../src/lsptoolshost/options/optionChanges.js'; +import { registerLanguageServerOptionChanges } from '../../../src/lsptoolshost/options/optionChanges'; import { describe, beforeEach, test, expect } from '@jest/globals'; import * as vscode from 'vscode'; -import { getVSCodeWithConfig, updateConfig } from '../../fakes.js'; +import { getVSCodeWithConfig, updateConfig } from '../../fakes'; describe('Option changes observer', () => { let doClickOk: () => void; diff --git a/test/lsptoolshost/unitTests/migrateOptions.test.ts b/test/lsptoolshost/unitTests/migrateOptions.test.ts index 6ee821e8db..ea2619eb15 100644 --- a/test/lsptoolshost/unitTests/migrateOptions.test.ts +++ b/test/lsptoolshost/unitTests/migrateOptions.test.ts @@ -5,11 +5,11 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { IDotnetAcquisitionExistingPaths } from '../../../src/shared/migrateOptions.js'; +import { IDotnetAcquisitionExistingPaths } from '../../../src/shared/migrateOptions'; import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { getVSCodeWithConfig } from '../../fakes.js'; -import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId.js'; -import { ConfigurationTarget } from '../../../src/vscodeAdapter.js'; +import { getVSCodeWithConfig } from '../../fakes'; +import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId'; +import { ConfigurationTarget } from '../../../src/vscodeAdapter'; const mockExistsSync = jest.fn(); jest.unstable_mockModule('fs', async () => ({ @@ -18,7 +18,7 @@ jest.unstable_mockModule('fs', async () => ({ })); const fs = await import('fs'); const { dotnetAcquisitionExtensionOption, dotnetPathOption, MigrateOptions, migrateOptions } = - await import('../../../src/shared/migrateOptions.js'); + await import('../../../src/shared/migrateOptions'); describe('Migrate configurations', () => { const packageJson = JSON.parse(fs.readFileSync('package.json').toString()); diff --git a/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts b/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts index 1203e691a6..46a8bd162b 100644 --- a/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts +++ b/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts @@ -21,8 +21,8 @@ jest.unstable_mockModule('vscode-languageclient', () => ({ State: { Running: 2 }, })); -const { RoslynLanguageClient } = await import('../../../src/lsptoolshost/server/roslynLanguageClient.js'); -const { TelemetryEventNames } = await import('../../../src/shared/telemetryEventNames.js'); +const { RoslynLanguageClient } = await import('../../../src/lsptoolshost/server/roslynLanguageClient'); +const { TelemetryEventNames } = await import('../../../src/shared/telemetryEventNames'); describe('RoslynLanguageClient', () => { test('shows one crash notification and emits one telemetry event per crash', () => { diff --git a/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts index 7c65e168ec..86bebe0516 100644 --- a/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts @@ -6,10 +6,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as path from 'path'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider.js'; +import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider'; function setLimit(to: number | null) { const csharpConfig = vscode.workspace.getConfiguration('csharp'); diff --git a/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts index c58d8eee29..5c305b12d3 100644 --- a/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts @@ -5,11 +5,11 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; -import { assertWithPoll } from './poll.js'; -import { isNotNull } from '../testUtil.js'; +import { assertWithPoll } from './poll'; +import { isNotNull } from '../testUtil'; describe.skip(`Code Action Rename ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts index 031a00e49d..548f0d99d0 100644 --- a/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts @@ -6,9 +6,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfSlnWithCsProj, describeIfNotGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { isNotNull } from '../testUtil.js'; +import { activateCSharpExtension, describeIfSlnWithCsProj, describeIfNotGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { isNotNull } from '../testUtil'; describeIfNotGenerator(`CodeLensProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts index 1a6c8eb6b2..a00e85774b 100644 --- a/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { expect, test, beforeAll, afterAll } from '@jest/globals'; -import OmniSharpCompletionProvider from '../../../src/omnisharp/features/completionProvider.js'; +import OmniSharpCompletionProvider from '../../../src/omnisharp/features/completionProvider'; import * as vscode from 'vscode'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; describeIfNotRazorOrGenerator(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts index 70161eedb8..62bf7013fb 100644 --- a/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts @@ -5,14 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.js'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { - activateCSharpExtension, - describeIfNotRazorOrGenerator, - restartOmniSharpServer, -} from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; describeIfNotRazorOrGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts index 313c492cfb..b3808099e0 100644 --- a/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts @@ -14,10 +14,10 @@ import { isRazorWorkspace, isSlnWithGenerator, restartOmniSharpServer, -} from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { poll, assertWithPoll, pollDoesNotHappen } from './poll.js'; -import { isNotNull } from '../testUtil.js'; +} from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { poll, assertWithPoll, pollDoesNotHappen } from './poll'; +import { isNotNull } from '../testUtil'; async function setDiagnosticWorkspaceLimit(to: number | null) { const csharpConfig = vscode.workspace.getConfiguration('csharp'); diff --git a/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts index 5cd386b30e..eb8ebf9ac4 100644 --- a/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; describeIfNotRazorOrGenerator(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts index 8e95cdbd7f..df49d08ee0 100644 --- a/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts @@ -6,7 +6,7 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; const onTypeFormatProviderCommand = 'vscode.executeFormatOnTypeProvider'; diff --git a/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts index c01384b053..73a5b17246 100644 --- a/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts @@ -6,13 +6,13 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfSlnWithCsProj } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { EventStream } from '../../../src/eventStream.js'; -import { EventType } from '../../../src/shared/eventType.js'; -import { OmnisharpRequestMessage } from '../../../src/omnisharp/omnisharpLoggingEvents.js'; -import { V2 } from '../../../src/omnisharp/protocol.js'; -import { isNotNull } from '../testUtil.js'; +import { activateCSharpExtension, describeIfSlnWithCsProj } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { EventStream } from '../../../src/eventStream'; +import { EventType } from '../../../src/shared/eventType'; +import { OmnisharpRequestMessage } from '../../../src/omnisharp/omnisharpLoggingEvents'; +import { V2 } from '../../../src/omnisharp/protocol'; +import { isNotNull } from '../testUtil'; // These tests only run on the slnWithCsproj solution describeIfSlnWithCsProj(`DotnetTest: ${testAssetWorkspace.description}`, function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts index 27f31b0f75..798038385d 100644 --- a/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; export type Test = 'a' | 'b' | ['c', any]; diff --git a/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts index 35a930281b..bcb39a937d 100644 --- a/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts @@ -5,10 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpImplementationProvider from '../../../src/omnisharp/features/implementationProvider.js'; +import OmniSharpImplementationProvider from '../../../src/omnisharp/features/implementationProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; describeIfNotRazorOrGenerator(`${OmniSharpImplementationProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts index cc5e433138..b8bce4c45e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts @@ -5,15 +5,11 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { - activateCSharpExtension, - describeIfNotRazorOrGenerator, - restartOmniSharpServer, -} from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; import * as path from 'path'; -import { InlayHint, LinePositionSpanTextChange } from '../../../src/omnisharp/protocol.js'; -import { isNotNull } from '../testUtil.js'; +import { InlayHint, LinePositionSpanTextChange } from '../../../src/omnisharp/protocol'; +import { isNotNull } from '../testUtil'; describeIfNotRazorOrGenerator(`Inlay Hints ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts b/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts index 09765a3450..60ab788210 100644 --- a/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts +++ b/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts @@ -5,10 +5,10 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider.js'; -import { EventStream } from '../../../src/eventStream.js'; -import { EventType } from '../../../src/shared/eventType.js'; -import { OmnisharpExtensionExports } from '../../../src/csharpExtensionExports.js'; +import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider'; +import { EventStream } from '../../../src/eventStream'; +import { EventType } from '../../../src/shared/eventType'; +import { OmnisharpExtensionExports } from '../../../src/csharpExtensionExports'; import { describe } from '@jest/globals'; export interface ActivationResult { diff --git a/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts index d1611a7aa6..b802e7b4f5 100644 --- a/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts @@ -6,9 +6,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../../src/omnisharp/languageMiddlewareFeature.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../../src/omnisharp/languageMiddlewareFeature'; describeIfNotRazorOrGenerator(`${LanguageMiddlewareFeature.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts index f669d9b466..80e9393694 100644 --- a/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts @@ -6,10 +6,10 @@ import { describe, expect, test, beforeAll, afterAll } from '@jest/globals'; import fs from 'fs-extra'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { poll } from './poll.js'; -import { isNotNull } from '../testUtil.js'; +import { activateCSharpExtension } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { poll } from './poll'; +import { isNotNull } from '../testUtil'; // Consistently failing in CI: https://github.com/OmniSharp/omnisharp-vscode/issues/4646 describe.skip(`Tasks generation: ${testAssetWorkspace.description}`, function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts b/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts index cf5507dd9e..72ee28e512 100644 --- a/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts @@ -10,8 +10,8 @@ import { resourcesToLaunchTargets, vsls, vslsTarget, -} from '../../../src/omnisharp/launcher.js'; -import { LaunchTargetKind } from '../../../src/shared/launchTarget.js'; +} from '../../../src/omnisharp/launcher'; +import { LaunchTargetKind } from '../../../src/shared/launchTarget'; describe(`launcher:`, () => { const workspaceFolders: vscode.WorkspaceFolder[] = [{ uri: vscode.Uri.parse('/'), name: 'root', index: 0 }]; diff --git a/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts index 5c864af431..f3d567ee51 100644 --- a/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts @@ -5,12 +5,9 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { - OmniSharpCommands, - UnexpectedOmniSharpCommands, -} from '../../lsptoolshost/integrationTests/expectedCommands.js'; +import { activateCSharpExtension } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { OmniSharpCommands, UnexpectedOmniSharpCommands } from '../../lsptoolshost/integrationTests/expectedCommands'; describe(`Command Enablement: ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts b/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts index 1f33ae5842..22c7e749e3 100644 --- a/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { ParsedEnvironmentFile } from '../../../src/coreclrDebug/parsedEnvironmentFile.js'; +import { ParsedEnvironmentFile } from '../../../src/coreclrDebug/parsedEnvironmentFile'; describe('ParsedEnvironmentFile', () => { test('Add single variable', () => { diff --git a/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts index 5d8df2fc4b..5cb9752252 100644 --- a/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts @@ -6,14 +6,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { poll, assertWithPoll } from './poll.js'; -import { EventStream } from '../../../src/eventStream.js'; -import { EventType } from '../../../src/shared/eventType.js'; -import { BaseEvent } from '../../../src/shared/loggingEvents.js'; -import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/omnisharpLoggingEvents.js'; -import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { poll, assertWithPoll } from './poll'; +import { EventStream } from '../../../src/eventStream'; +import { EventType } from '../../../src/shared/eventType'; +import { BaseEvent } from '../../../src/shared/loggingEvents'; +import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/omnisharpLoggingEvents'; +import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol'; function listenEvents(stream: EventStream, type: EventType): T[] { const results: T[] = []; diff --git a/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts index 3f315bbc05..4d76051903 100644 --- a/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts @@ -5,10 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpReferenceProvider from '../../../src/omnisharp/features/referenceProvider.js'; +import OmniSharpReferenceProvider from '../../../src/omnisharp/features/referenceProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; describeIfNotRazorOrGenerator(`${OmniSharpReferenceProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts index 3c4f1a75cf..d629b6e614 100644 --- a/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; interface ExpectedToken { startLine: number; diff --git a/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts index 5421ebc213..a1b56ab7a6 100644 --- a/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; describeIfNotRazorOrGenerator(`SignatureHelp: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts index 01f2d7fa30..3edbc9f4f1 100644 --- a/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts @@ -6,10 +6,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.js'; -import { activateCSharpExtension, describeIfGenerator, restartOmniSharpServer } from './integrationHelpers.js'; -import { assertWithPoll, sleep } from './poll.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; +import { activateCSharpExtension, describeIfGenerator, restartOmniSharpServer } from './integrationHelpers'; +import { assertWithPoll, sleep } from './poll'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; describeIfGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts b/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts index cf6f828639..458734000d 100644 --- a/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts +++ b/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts @@ -6,14 +6,14 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { ITestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets.js'; +import { ITestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; -import singleCsproj from '../../../lsptoolshost/integrationTests/testAssets/singleCsproj.js'; -import slnWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnWithCsproj.js'; -import slnFilterWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.js'; -import BasicRazorApp2_1 from '../../../lsptoolshost/integrationTests/testAssets/razorApp.js'; -import slnWithGenerator from '../../../lsptoolshost/integrationTests/testAssets/slnWithGenerator.js'; -import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace.js'; +import singleCsproj from '../../../lsptoolshost/integrationTests/testAssets/singleCsproj'; +import slnWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnWithCsproj'; +import slnFilterWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj'; +import BasicRazorApp2_1 from '../../../lsptoolshost/integrationTests/testAssets/razorApp'; +import slnWithGenerator from '../../../lsptoolshost/integrationTests/testAssets/slnWithGenerator'; +import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace'; const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { singleCsproj, diff --git a/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts b/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts index 395756ba93..e98b279d7f 100644 --- a/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts +++ b/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts @@ -4,15 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { EventStream } from '../../../../src/eventStream.js'; -import { EventType } from '../../../../src/shared/eventType.js'; -import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; -import { poll } from '../poll.js'; -import { - ITestAssetWorkspace, - TestAssetWorkspace, -} from '../../../lsptoolshost/integrationTests/testAssets/testAssets.js'; -import { ActivationResult } from '../integrationHelpers.js'; +import { EventStream } from '../../../../src/eventStream'; +import { EventType } from '../../../../src/shared/eventType'; +import { BaseEvent } from '../../../../src/shared/loggingEvents'; +import { poll } from '../poll'; +import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; +import { ActivationResult } from '../integrationHelpers'; export class OmnisharpTestAssetWorkspace extends TestAssetWorkspace { constructor(workspace: ITestAssetWorkspace) { diff --git a/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts index aaa9f888ab..724d66df2e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts @@ -5,14 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.js'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { - activateCSharpExtension, - describeIfNotRazorOrGenerator, - restartOmniSharpServer, -} from './integrationHelpers.js'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; describeIfNotRazorOrGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts index 50c079fc69..cceb330ad8 100644 --- a/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts @@ -5,9 +5,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotGenerator, isSlnWithGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; -import { IDisposable } from '../../../src/disposable.js'; +import { activateCSharpExtension, describeIfNotGenerator, isSlnWithGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { IDisposable } from '../../../src/disposable'; describeIfNotGenerator(`Virtual Document Tracking ${testAssetWorkspace.description}`, function () { const virtualScheme = 'virtual'; diff --git a/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts index fe3e4c4a9e..7f6dff7cf5 100644 --- a/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts @@ -5,8 +5,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.js'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.js'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; describeIfNotRazorOrGenerator(`WorkspaceSymbolProvider: ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts b/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts index f2d5091882..b1c5baf8f2 100644 --- a/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts +++ b/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { AbsolutePath } from '../../../src/packageManager/absolutePath.js'; -import { TmpAsset, CreateTmpFile } from '../../createTmpAsset.js'; +import { AbsolutePath } from '../../../src/packageManager/absolutePath'; +import { TmpAsset, CreateTmpFile } from '../../createTmpAsset'; import { join } from 'path'; describe(AbsolutePath.name, () => { diff --git a/test/omnisharp/omnisharpUnitTests/assets.test.ts b/test/omnisharp/omnisharpUnitTests/assets.test.ts index f4db76de93..3f4781c98d 100644 --- a/test/omnisharp/omnisharpUnitTests/assets.test.ts +++ b/test/omnisharp/omnisharpUnitTests/assets.test.ts @@ -14,11 +14,11 @@ import { ProgramLaunchType, replaceCommentPropertiesWithComments, updateJsonWithComments, -} from '../../../src/shared/assets.js'; +} from '../../../src/shared/assets'; import { parse } from 'jsonc-parser'; -import { ProjectDebugInformation } from '../../../src/shared/IWorkspaceDebugInformationProvider.js'; -import { findNetCoreTargetFramework } from '../../../src/shared/utils.js'; -import { isNotNull } from '../testUtil.js'; +import { ProjectDebugInformation } from '../../../src/shared/IWorkspaceDebugInformationProvider'; +import { findNetCoreTargetFramework } from '../../../src/shared/utils'; +import { isNotNull } from '../testUtil'; describe('Asset generation: csproj', () => { test('Create tasks.json for project opened in workspace', () => { diff --git a/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts b/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts index 6bed8b0074..e459e66e10 100644 --- a/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts +++ b/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts @@ -6,12 +6,8 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import fs from 'fs-extra'; import * as path from 'path'; -import { CreateTmpDir, TmpAsset } from '../../createTmpAsset.js'; -import { - isBlazorWebAssemblyHostedServer, - isBlazorWebAssemblyProject, - isWebProject, -} from '../../../src/shared/utils.js'; +import { CreateTmpDir, TmpAsset } from '../../createTmpAsset'; +import { isBlazorWebAssemblyHostedServer, isBlazorWebAssemblyProject, isWebProject } from '../../../src/shared/utils'; const webSdkCsproj = ` diff --git a/test/omnisharp/omnisharpUnitTests/common.test.ts b/test/omnisharp/omnisharpUnitTests/common.test.ts index ee79d5f123..9d454e1e35 100644 --- a/test/omnisharp/omnisharpUnitTests/common.test.ts +++ b/test/omnisharp/omnisharpUnitTests/common.test.ts @@ -6,7 +6,7 @@ import { describe, test, expect } from '@jest/globals'; import * as path from 'path'; -import { isSubfolderOf, safeLength, sum } from '../../../src/common.js'; +import { isSubfolderOf, safeLength, sum } from '../../../src/common'; describe('Common', () => { describe('safeLength', () => { diff --git a/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts b/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts index 25bc174c56..ad12001afb 100644 --- a/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts +++ b/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getTargetArchitecture } from '../../../../src/coreclrDebug/util.js'; -import { PlatformInformation } from '../../../../src/shared/platform.js'; -import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo.js'; +import { getTargetArchitecture } from '../../../../src/coreclrDebug/util'; +import { PlatformInformation } from '../../../../src/shared/platform'; +import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo'; describe('getTargetArchitecture Tests', () => { describe('Windows', () => { diff --git a/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts b/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts index 67e3d14781..d74aeb7599 100644 --- a/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts +++ b/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver.js'; -import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation.js'; +import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver'; +import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation'; export const fakeMonoInfo: HostExecutableInformation = { version: 'someDotNetVersion', diff --git a/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts b/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts index 743fc51658..97c45f410b 100644 --- a/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts +++ b/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver.js'; -import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation.js'; +import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver'; +import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation'; export const fakeMonoInfo: HostExecutableInformation = { version: 'someMonoVersion', diff --git a/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts b/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts index 3bf6e35e86..c052d189ab 100644 --- a/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts +++ b/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import reportIssue from '../../../../src/shared/reportIssue.js'; -import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver.js'; -import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver.js'; -import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo.js'; +import reportIssue from '../../../../src/shared/reportIssue'; +import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver'; +import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver'; +import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; describe(`${reportIssue.name}`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts index 1ece9ca9fc..d04aef9607 100644 --- a/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { InformationMessageObserver } from '../../../src/omnisharp/observers/informationMessageObserver.js'; -import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../fakes.js'; +import { InformationMessageObserver } from '../../../src/omnisharp/observers/informationMessageObserver'; +import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../fakes'; import { Subject, from as observableFrom } from 'rxjs'; import { timeout } from 'rxjs/operators'; diff --git a/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts b/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts index ab3aabd1bc..0ce27b8f82 100644 --- a/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts +++ b/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { installRuntimeDependencies } from '../../../src/installRuntimeDependencies.js'; -import { IInstallDependencies } from '../../../src/packageManager/IInstallDependencies.js'; -import { EventStream } from '../../../src/eventStream.js'; -import { PlatformInformation } from '../../../src/shared/platform.js'; -import TestEventBus from './testAssets/testEventBus.js'; -import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage.js'; -import { Package } from '../../../src/packageManager/package.js'; -import { isNotNull } from '../testUtil.js'; +import { installRuntimeDependencies } from '../../../src/installRuntimeDependencies'; +import { IInstallDependencies } from '../../../src/packageManager/IInstallDependencies'; +import { EventStream } from '../../../src/eventStream'; +import { PlatformInformation } from '../../../src/shared/platform'; +import TestEventBus from './testAssets/testEventBus'; +import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage'; +import { Package } from '../../../src/packageManager/package'; +import { isNotNull } from '../testUtil'; describe(`${installRuntimeDependencies.name}`, () => { let packageJSON = { diff --git a/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts index c878fcc085..8d44d5f992 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { StatusBarItem } from '../../../../src/vscodeAdapter.js'; -import { OmnisharpBackgroundDiagnosticStatus } from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; -import { BackgroundWorkStatusBarObserver } from '../../../../src/omnisharp/observers/backgroundWorkStatusBarObserver.js'; -import { BackgroundDiagnosticStatus } from '../../../../src/omnisharp/protocol.js'; +import { StatusBarItem } from '../../../../src/vscodeAdapter'; +import { OmnisharpBackgroundDiagnosticStatus } from '../../../../src/omnisharp/omnisharpLoggingEvents'; +import { BackgroundWorkStatusBarObserver } from '../../../../src/omnisharp/observers/backgroundWorkStatusBarObserver'; +import { BackgroundDiagnosticStatus } from '../../../../src/omnisharp/protocol'; describe('BackgroundWorkStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts index a6cb02f00c..016bbb4f47 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { DotNetChannelObserver } from '../../../../src/omnisharp/observers/dotnetChannelObserver.js'; -import { getNullChannel } from '../../../fakes.js'; -import { CommandDotNetRestoreStart } from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +import { DotNetChannelObserver } from '../../../../src/omnisharp/observers/dotnetChannelObserver'; +import { getNullChannel } from '../../../fakes'; +import { CommandDotNetRestoreStart } from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('DotnetChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts index 993bea334f..0e5eee3649 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getNullChannel } from '../../../fakes.js'; -import { DotnetLoggerObserver } from '../../../../src/omnisharp/observers/dotnetLoggerObserver.js'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents.js'; +import { getNullChannel } from '../../../fakes'; +import { DotnetLoggerObserver } from '../../../../src/omnisharp/observers/dotnetLoggerObserver'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents'; import { CommandDotNetRestoreFailed, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('DotnetLoggerObserver', () => { [ diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts index f30ebfd65f..cb2c57dce1 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts @@ -4,16 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes.js'; -import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; -import DotnetTestChannelObserver from '../../../../src/omnisharp/observers/dotnetTestChannelObserver.js'; +import { getNullChannel } from '../../../fakes'; +import { BaseEvent } from '../../../../src/shared/loggingEvents'; +import DotnetTestChannelObserver from '../../../../src/omnisharp/observers/dotnetTestChannelObserver'; import { DotNetTestDebugStart, DotNetTestRunFailure, DotNetTestRunStart, DotNetTestsInClassDebugStart, DotNetTestsInClassRunStart, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('DotnetTestChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts index 8c3300e4ad..4de7ae08c3 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes.js'; -import { EventWithMessage, BaseEvent } from '../../../../src/shared/loggingEvents.js'; -import DotNetTestLoggerObserver from '../../../../src/omnisharp/observers/dotnetTestLoggerObserver.js'; -import * as protocol from '../../../../src/omnisharp/protocol.js'; +import { getNullChannel } from '../../../fakes'; +import { EventWithMessage, BaseEvent } from '../../../../src/shared/loggingEvents'; +import DotNetTestLoggerObserver from '../../../../src/omnisharp/observers/dotnetTestLoggerObserver'; +import * as protocol from '../../../../src/omnisharp/protocol'; import { DotNetTestDebugComplete, DotNetTestDebugInContextStart, @@ -20,7 +20,7 @@ import { DotNetTestsInClassDebugStart, DotNetTestsInClassRunStart, ReportDotNetTestResults, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe(`${DotNetTestLoggerObserver.name}`, () => { let appendedMessage: string; diff --git a/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts index 132824a4f4..a9348339e0 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { MessageItem, vscode } from '../../../../src/vscodeAdapter.js'; -import { ErrorMessageObserver } from '../../../../src/omnisharp/observers/errorMessageObserver.js'; -import { ZipError, EventWithMessage, IntegrityCheckFailure } from '../../../../src/shared/loggingEvents.js'; -import { getFakeVsCode } from '../../../fakes.js'; -import { DotNetTestDebugStartFailure, DotNetTestRunFailure } from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +import { MessageItem, vscode } from '../../../../src/vscodeAdapter'; +import { ErrorMessageObserver } from '../../../../src/omnisharp/observers/errorMessageObserver'; +import { ZipError, EventWithMessage, IntegrityCheckFailure } from '../../../../src/shared/loggingEvents'; +import { getFakeVsCode } from '../../../fakes'; +import { DotNetTestDebugStartFailure, DotNetTestRunFailure } from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('ErrorMessageObserver', () => { const vscode: vscode = getFakeVsCode(); diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts index 3b20de5127..4a838a1e30 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts @@ -5,16 +5,16 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel, getWorkspaceConfiguration } from '../../../fakes.js'; -import { OmnisharpChannelObserver } from '../../../../src/omnisharp/observers/omnisharpChannelObserver.js'; -import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; +import { getNullChannel, getWorkspaceConfiguration } from '../../../fakes'; +import { OmnisharpChannelObserver } from '../../../../src/omnisharp/observers/omnisharpChannelObserver'; +import { BaseEvent } from '../../../../src/shared/loggingEvents'; import { Subject } from 'rxjs'; import { OmnisharpFailure, OmnisharpRestart, OmnisharpServerOnStdErr, ShowOmniSharpChannel, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('OmnisharpChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts index 4723241487..09ffa8a098 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes.js'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents.js'; -import { OmnisharpDebugModeLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpDebugModeLoggerObserver.js'; +import { getNullChannel } from '../../../fakes'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents'; +import { OmnisharpDebugModeLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpDebugModeLoggerObserver'; import { OmnisharpEventPacketReceived, OmnisharpRequestMessage, @@ -15,7 +15,7 @@ import { OmnisharpServerProcessRequestStart, OmnisharpServerRequestCancelled, OmnisharpServerVerboseMessage, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('OmnisharpDebugModeLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts index 6605bea08d..48c3c4725f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts @@ -2,9 +2,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getNullChannel } from '../../../fakes.js'; +import { getNullChannel } from '../../../fakes'; import { describe, test, expect, beforeEach } from '@jest/globals'; -import { OmnisharpLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpLoggerObserver.js'; +import { OmnisharpLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpLoggerObserver'; import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnStdErr, @@ -15,10 +15,10 @@ import { OmnisharpServerOnError, OmnisharpFailure, OmnisharpEventPacketReceived, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; import { OutputChannel } from 'vscode'; -import { PlatformInformation } from '../../../../src/shared/platform.js'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents.js'; +import { PlatformInformation } from '../../../../src/shared/platform'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents'; describe('OmnisharpLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts index 52457b777f..8bf0a4731b 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { StatusBarItem } from '../../../../src/vscodeAdapter.js'; +import { StatusBarItem } from '../../../../src/vscodeAdapter'; import { DownloadStart, InstallationStart, DownloadProgress, BaseEvent, InstallationSuccess, -} from '../../../../src/shared/loggingEvents.js'; +} from '../../../../src/shared/loggingEvents'; import { OmnisharpOnBeforeServerInstall, OmnisharpOnBeforeServerStart, @@ -19,11 +19,11 @@ import { OmnisharpServerOnStart, OmnisharpServerOnStop, OmnisharpServerOnStdErr, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; import { OmnisharpStatusBarObserver, StatusBarColors, -} from '../../../../src/omnisharp/observers/omnisharpStatusBarObserver.js'; +} from '../../../../src/omnisharp/observers/omnisharpStatusBarObserver'; describe('OmnisharpStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts index d46c30105f..dd5da182b6 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../fakes.js'; -import { StatusBarItem } from '../../../../src/vscodeAdapter.js'; -import { ProjectStatusBarObserver } from '../../../../src/omnisharp/observers/projectStatusBarObserver.js'; +import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../fakes'; +import { StatusBarItem } from '../../../../src/vscodeAdapter'; +import { ProjectStatusBarObserver } from '../../../../src/omnisharp/observers/projectStatusBarObserver'; import { OmnisharpOnMultipleLaunchTargets, OmnisharpServerOnStop, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('ProjectStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts index f939f5adad..9336ca79ac 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes.js'; -import { RazorLoggerObserver } from '../../../../src/omnisharp/observers/razorLoggerObserver.js'; +import { getNullChannel } from '../../../fakes'; +import { RazorLoggerObserver } from '../../../../src/omnisharp/observers/razorLoggerObserver'; import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist, RazorDevModeActive, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; describe('RazorLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts index b34fce7baa..26b4bf3728 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { beforeEach, test, describe, expect } from '@jest/globals'; -import { TelemetryObserver } from '../../../../src/omnisharp/observers/telemetryObserver.js'; -import { PlatformInformation } from '../../../../src/shared/platform.js'; -import { PackageInstallation, InstallationFailure, InstallationSuccess } from '../../../../src/shared/loggingEvents.js'; +import { TelemetryObserver } from '../../../../src/omnisharp/observers/telemetryObserver'; +import { PlatformInformation } from '../../../../src/shared/platform'; +import { PackageInstallation, InstallationFailure, InstallationSuccess } from '../../../../src/shared/loggingEvents'; import { TestExecutionCountReport, TelemetryEventWithMeasures, @@ -15,11 +15,11 @@ import { TelemetryEvent, ProjectConfiguration, TelemetryErrorEvent, -} from '../../../../src/omnisharp/omnisharpLoggingEvents.js'; -import { getNullTelemetryReporter } from '../../../fakes.js'; -import { Package } from '../../../../src/packageManager/package.js'; -import { PackageError } from '../../../../src/packageManager/packageError.js'; -import { isNotNull } from '../../testUtil.js'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +import { getNullTelemetryReporter } from '../../../fakes'; +import { Package } from '../../../../src/packageManager/package'; +import { PackageError } from '../../../../src/packageManager/packageError'; +import { isNotNull } from '../../testUtil'; describe('TelemetryReporterObserver', () => { const platformInfo = new PlatformInformation('linux', 'architecture'); diff --git a/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts index 045b46e0ff..053c03a780 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { WarningMessageObserver } from '../../../../src/omnisharp/observers/warningMessageObserver.js'; +import { WarningMessageObserver } from '../../../../src/omnisharp/observers/warningMessageObserver'; import { getFakeVsCode, getMSBuildDiagnosticsMessage, getOmnisharpMSBuildProjectDiagnosticsEvent, getOmnisharpServerOnErrorEvent, -} from '../../../fakes.js'; -import { vscode } from '../../../../src/vscodeAdapter.js'; +} from '../../../fakes'; +import { vscode } from '../../../../src/vscodeAdapter'; import { TestScheduler } from 'rxjs/testing'; import { from as observableFrom, Subject } from 'rxjs'; import { timeout, map } from 'rxjs/operators'; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts index aa062820f5..3f6b21c324 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { OmniSharpMonoResolver } from '../../../../src/omnisharp/omniSharpMonoResolver.js'; +import { OmniSharpMonoResolver } from '../../../../src/omnisharp/omniSharpMonoResolver'; import { join } from 'path'; -import { getWorkspaceConfiguration } from '../../../fakes.js'; +import { getWorkspaceConfiguration } from '../../../fakes'; describe(`${OmniSharpMonoResolver.name}`, () => { let getMonoCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts index d501c86d28..74d2b999f7 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts @@ -4,16 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader.js'; -import NetworkSettings from '../../../src/networkSettings.js'; -import { EventStream } from '../../../src/eventStream.js'; -import { PlatformInformation } from '../../../src/shared/platform.js'; -import { CreateTmpDir, TmpAsset } from '../../createTmpAsset.js'; -import * as util from '../../../src/common.js'; +import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader'; +import NetworkSettings from '../../../src/networkSettings'; +import { EventStream } from '../../../src/eventStream'; +import { PlatformInformation } from '../../../src/shared/platform'; +import { CreateTmpDir, TmpAsset } from '../../createTmpAsset'; +import * as util from '../../../src/common'; import * as path from 'path'; -import MockHttpsServer from './testAssets/mockHttpsServer.js'; -import TestZip from './testAssets/testZip.js'; -import { createTestFile } from './testAssets/testFile.js'; +import MockHttpsServer from './testAssets/mockHttpsServer'; +import TestZip from './testAssets/testZip'; +import { createTestFile } from './testAssets/testFile'; import { PackageInstallation, LogPlatformInfo, @@ -24,10 +24,10 @@ import { InstallationStart, InstallationSuccess, PackageInstallStart, -} from '../../../src/shared/loggingEvents.js'; -import TestEventBus from './testAssets/testEventBus.js'; -import { testPackageJSON } from './testAssets/testAssets.js'; -import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator.js'; +} from '../../../src/shared/loggingEvents'; +import TestEventBus from './testAssets/testEventBus'; +import { testPackageJSON } from './testAssets/testAssets'; +import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator'; [true, false].forEach((useFramework) => { describe(`OmnisharpDownloader (useFramework: ${useFramework})`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts index 3555e2497d..78f882771e 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts @@ -4,19 +4,19 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { OmnisharpManager } from '../../../src/omnisharp/omnisharpManager.js'; -import MockHttpsServer from './testAssets/mockHttpsServer.js'; -import TestZip from './testAssets/testZip.js'; -import { createTestFile } from './testAssets/testFile.js'; -import { PlatformInformation } from '../../../src/shared/platform.js'; -import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader.js'; -import NetworkSettings from '../../../src/networkSettings.js'; -import { EventStream } from '../../../src/eventStream.js'; -import { testPackageJSON } from './testAssets/testAssets.js'; -import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../createTmpAsset.js'; +import { OmnisharpManager } from '../../../src/omnisharp/omnisharpManager'; +import MockHttpsServer from './testAssets/mockHttpsServer'; +import TestZip from './testAssets/testZip'; +import { createTestFile } from './testAssets/testFile'; +import { PlatformInformation } from '../../../src/shared/platform'; +import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader'; +import NetworkSettings from '../../../src/networkSettings'; +import { EventStream } from '../../../src/eventStream'; +import { testPackageJSON } from './testAssets/testAssets'; +import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../createTmpAsset'; import * as path from 'path'; -import * as util from '../../../src/common.js'; -import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator.js'; +import * as util from '../../../src/common'; +import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator'; describe(OmnisharpManager.name, () => { let server: MockHttpsServer; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts index f902d89136..68425752c9 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts @@ -8,10 +8,10 @@ import { SetBinaryAndGetPackage, GetPackagesFromVersion, modernNetVersion, -} from '../../../src/omnisharp/omnisharpPackageCreator.js'; -import { Package } from '../../../src/packageManager/package.js'; -import { testPackageJSON } from './testAssets/testAssets.js'; -import { isNotNull } from '../testUtil.js'; +} from '../../../src/omnisharp/omnisharpPackageCreator'; +import { Package } from '../../../src/packageManager/package'; +import { testPackageJSON } from './testAssets/testAssets'; +import { isNotNull } from '../testUtil'; describe('GetOmnisharpPackage : Output package depends on the input package and other input parameters like serverUrl', () => { let serverUrl: string; diff --git a/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts b/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts index f03db12e4d..29af13fbf2 100644 --- a/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts @@ -5,11 +5,11 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { registerOmnisharpOptionChanges } from '../../../src/omnisharp/omnisharpOptionChanges.js'; +import { registerOmnisharpOptionChanges } from '../../../src/omnisharp/omnisharpOptionChanges'; import { describe, beforeEach, test, expect } from '@jest/globals'; import * as vscode from 'vscode'; -import { getVSCodeWithConfig, updateConfig } from '../../fakes.js'; +import { getVSCodeWithConfig, updateConfig } from '../../fakes'; describe('OmniSharpConfigChangeObserver', () => { let doClickOk: () => void; diff --git a/test/omnisharp/omnisharpUnitTests/optionStream.test.ts b/test/omnisharp/omnisharpUnitTests/optionStream.test.ts index 65d5f94ea4..6817977ef3 100644 --- a/test/omnisharp/omnisharpUnitTests/optionStream.test.ts +++ b/test/omnisharp/omnisharpUnitTests/optionStream.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import { Observable } from 'rxjs'; -import createOptionStream from '../../../src/shared/observables/createOptionStream.js'; -import Disposable from '../../../src/disposable.js'; +import createOptionStream from '../../../src/shared/observables/createOptionStream'; +import Disposable from '../../../src/disposable'; describe('OptionStream', () => { let listenerFunction: Array<(e: vscode.ConfigurationChangeEvent) => any>; diff --git a/test/omnisharp/omnisharpUnitTests/options.test.ts b/test/omnisharp/omnisharpUnitTests/options.test.ts index 47a95fe879..e69d912fc4 100644 --- a/test/omnisharp/omnisharpUnitTests/options.test.ts +++ b/test/omnisharp/omnisharpUnitTests/options.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import * as path from 'path'; -import { commonOptions, omnisharpOptions } from '../../../src/shared/options.js'; -import { getWorkspaceConfiguration } from '../../fakes.js'; +import { commonOptions, omnisharpOptions } from '../../../src/shared/options'; +import { getWorkspaceConfiguration } from '../../fakes'; describe('Options tests', () => { beforeEach(() => { diff --git a/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts b/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts index d9bea42f9f..9d8854a2bf 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts @@ -5,12 +5,12 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import * as path from 'path'; -import * as util from '../../../../src/common.js'; -import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset.js'; -import TestZip from '../testAssets/testZip.js'; -import { downloadAndInstallPackages } from '../../../../src/packageManager/downloadAndInstallPackages.js'; -import NetworkSettings from '../../../../src/networkSettings.js'; -import { EventStream } from '../../../../src/eventStream.js'; +import * as util from '../../../../src/common'; +import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset'; +import TestZip from '../testAssets/testZip'; +import { downloadAndInstallPackages } from '../../../../src/packageManager/downloadAndInstallPackages'; +import NetworkSettings from '../../../../src/networkSettings'; +import { EventStream } from '../../../../src/eventStream'; import { DownloadStart, DownloadSizeObtained, @@ -21,13 +21,13 @@ import { IntegrityCheckFailure, DownloadFailure, InstallationFailure, -} from '../../../../src/shared/loggingEvents.js'; -import MockHttpsServer from '../testAssets/mockHttpsServer.js'; -import { createTestFile } from '../testAssets/testFile.js'; -import TestEventBus from '../testAssets/testEventBus.js'; -import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage.js'; -import { AbsolutePath } from '../../../../src/packageManager/absolutePath.js'; -import { DownloadValidator } from '../../../../src/packageManager/isValidDownload.js'; +} from '../../../../src/shared/loggingEvents'; +import MockHttpsServer from '../testAssets/mockHttpsServer'; +import { createTestFile } from '../testAssets/testFile'; +import TestEventBus from '../testAssets/testEventBus'; +import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage'; +import { AbsolutePath } from '../../../../src/packageManager/absolutePath'; +import { DownloadValidator } from '../../../../src/packageManager/isValidDownload'; describe(`${downloadAndInstallPackages.name}`, () => { let tmpInstallDir: TmpAsset; diff --git a/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts b/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts index b128f24cdf..5775793899 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { EventStream } from '../../../../src/eventStream.js'; -import { DownloadFile } from '../../../../src/packageManager/fileDownloader.js'; -import NetworkSettings from '../../../../src/networkSettings.js'; +import { EventStream } from '../../../../src/eventStream'; +import { DownloadFile } from '../../../../src/packageManager/fileDownloader'; +import NetworkSettings from '../../../../src/networkSettings'; import { DownloadStart, DownloadSizeObtained, @@ -14,9 +14,9 @@ import { DownloadSuccess, DownloadFallBack, DownloadFailure, -} from '../../../../src/shared/loggingEvents.js'; -import MockHttpsServer from '../testAssets/mockHttpsServer.js'; -import TestEventBus from '../testAssets/testEventBus.js'; +} from '../../../../src/shared/loggingEvents'; +import MockHttpsServer from '../testAssets/mockHttpsServer'; +import TestEventBus from '../testAssets/testEventBus'; describe('FileDownloader', () => { const fileDescription = 'Test file'; diff --git a/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts b/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts index e6f2553c08..c53f7f1923 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { isValidDownload } from '../../../../src/packageManager/isValidDownload.js'; -import { EventStream } from '../../../../src/eventStream.js'; +import { isValidDownload } from '../../../../src/packageManager/isValidDownload'; +import { EventStream } from '../../../../src/eventStream'; describe(`${isValidDownload.name}`, () => { const sampleBuffer = Buffer.from('sampleBuffer'); diff --git a/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts b/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts index 35a6ae86b7..e2d9b2aac2 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { Package } from '../../../../src/packageManager/package.js'; -import type { AbsolutePathPackage as AbsolutePathPackageType } from '../../../../src/packageManager/absolutePathPackage.js'; +import { Package } from '../../../../src/packageManager/package'; +import type { AbsolutePathPackage as AbsolutePathPackageType } from '../../../../src/packageManager/absolutePathPackage'; import { MockedFunction } from 'jest-mock'; import type * as fs from 'fs'; import { join } from 'path'; @@ -16,9 +16,9 @@ jest.unstable_mockModule('fs', async () => ({ ...(await import('node:fs')), stat: mockStat, })); -const { PlatformInformation } = await import('../../../../src/shared/platform.js'); -const { getNotInstalledPackagesForPlatform } = await import('../../../../src/packageManager/packageFilterer.js'); -const { AbsolutePathPackage } = await import('../../../../src/packageManager/absolutePathPackage.js'); +const { PlatformInformation } = await import('../../../../src/shared/platform'); +const { getNotInstalledPackagesForPlatform } = await import('../../../../src/packageManager/packageFilterer'); +const { AbsolutePathPackage } = await import('../../../../src/packageManager/absolutePathPackage'); describe(`${getNotInstalledPackagesForPlatform.name}`, () => { let absolutePathPackages: AbsolutePathPackageType[]; diff --git a/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts b/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts index 746b4e3d40..4badabccc1 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeAll, afterAll, beforeEach } from '@jest/globals'; -import { getProxyAgent } from '../../../../src/packageManager/proxy.js'; +import { getProxyAgent } from '../../../../src/packageManager/proxy'; import url from 'url'; describe(`${getProxyAgent.name}`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts b/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts index 3ff993f400..7130110a4a 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts @@ -6,16 +6,16 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import fs from 'fs-extra'; import * as path from 'path'; -import * as util from '../../../../src/common.js'; -import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset.js'; -import { InstallZip } from '../../../../src/packageManager/zipInstaller.js'; -import { EventStream } from '../../../../src/eventStream.js'; -import { PlatformInformation } from '../../../../src/shared/platform.js'; -import { BaseEvent, InstallationStart, ZipError } from '../../../../src/shared/loggingEvents.js'; -import { createTestFile } from '../testAssets/testFile.js'; -import TestZip from '../testAssets/testZip.js'; -import TestEventBus from '../testAssets/testEventBus.js'; -import { AbsolutePath } from '../../../../src/packageManager/absolutePath.js'; +import * as util from '../../../../src/common'; +import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset'; +import { InstallZip } from '../../../../src/packageManager/zipInstaller'; +import { EventStream } from '../../../../src/eventStream'; +import { PlatformInformation } from '../../../../src/shared/platform'; +import { BaseEvent, InstallationStart, ZipError } from '../../../../src/shared/loggingEvents'; +import { createTestFile } from '../testAssets/testFile'; +import TestZip from '../testAssets/testZip'; +import TestEventBus from '../testAssets/testEventBus'; +import { AbsolutePath } from '../../../../src/packageManager/absolutePath'; describe('ZipInstaller', () => { const binaries = [createTestFile('binary1', 'binary1.txt'), createTestFile('binary2', 'binary2.txt')]; diff --git a/test/omnisharp/omnisharpUnitTests/platform.test.ts b/test/omnisharp/omnisharpUnitTests/platform.test.ts index f60fa77386..4d332c22dd 100644 --- a/test/omnisharp/omnisharpUnitTests/platform.test.ts +++ b/test/omnisharp/omnisharpUnitTests/platform.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { LinuxDistribution } from '../../../src/shared/platform.js'; +import { LinuxDistribution } from '../../../src/shared/platform'; describe('Platform', () => { test('Retrieve correct information for Ubuntu 14.04', () => { diff --git a/test/omnisharp/omnisharpUnitTests/processPicker.test.ts b/test/omnisharp/omnisharpUnitTests/processPicker.test.ts index 8d89e665e5..1f9f7f2381 100644 --- a/test/omnisharp/omnisharpUnitTests/processPicker.test.ts +++ b/test/omnisharp/omnisharpUnitTests/processPicker.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { RemoteAttachPicker, Process, CimProcessParser } from '../../../src/shared/processPicker.js'; +import { RemoteAttachPicker, Process, CimProcessParser } from '../../../src/shared/processPicker'; describe('Remote Process Picker: Validate quoting arguments.', () => { test('Argument with no spaces', () => { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts b/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts index e863eb57ff..47a8db2c84 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ConfigurationChangeEvent } from '../../../../src/vscodeAdapter.js'; +import { ConfigurationChangeEvent } from '../../../../src/vscodeAdapter'; export function GetConfigChangeEvent(changingConfig: string): ConfigurationChangeEvent { return { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts b/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts index 84a07a0f8b..5370d02e07 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventStream } from '../../../../src/eventStream.js'; -import { BaseEvent } from '../../../../src/shared/loggingEvents.js'; -import Disposable, { IDisposable } from '../../../../src/disposable.js'; +import { EventStream } from '../../../../src/eventStream'; +import { BaseEvent } from '../../../../src/shared/loggingEvents'; +import Disposable, { IDisposable } from '../../../../src/disposable'; export default class TestEventBus { private eventBus: Array; diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts b/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts index 7336d2d811..45d109b9a0 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import archiver from 'archiver'; -import { TestFile } from './testFile.js'; +import { TestFile } from './testFile'; export default class TestZip { constructor( diff --git a/test/razor/razorIntegrationTests/completion.integration.test.ts b/test/razor/razorIntegrationTests/completion.integration.test.ts index a84b9bc0a0..76444b5011 100644 --- a/test/razor/razorIntegrationTests/completion.integration.test.ts +++ b/test/razor/razorIntegrationTests/completion.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; describe(`Razor Hover ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/formatting.integration.test.ts b/test/razor/razorIntegrationTests/formatting.integration.test.ts index 20ef8c1ced..8f31b37e02 100644 --- a/test/razor/razorIntegrationTests/formatting.integration.test.ts +++ b/test/razor/razorIntegrationTests/formatting.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; describe(`Razor Formatting ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/hover.integration.test.ts b/test/razor/razorIntegrationTests/hover.integration.test.ts index dc91591e24..1ef66f6fb6 100644 --- a/test/razor/razorIntegrationTests/hover.integration.test.ts +++ b/test/razor/razorIntegrationTests/hover.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; describe(`Razor Hover ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/reference.integration.test.ts b/test/razor/razorIntegrationTests/reference.integration.test.ts index 0d0662129f..db16443eb2 100644 --- a/test/razor/razorIntegrationTests/reference.integration.test.ts +++ b/test/razor/razorIntegrationTests/reference.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; describe(`Razor References ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/rename.integration.test.ts b/test/razor/razorIntegrationTests/rename.integration.test.ts index 849defa0c4..cfcf51c37f 100644 --- a/test/razor/razorIntegrationTests/rename.integration.test.ts +++ b/test/razor/razorIntegrationTests/rename.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace.js'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.js'; +import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; describe(`Razor Rename ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts b/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts index 8a58807665..8fdef79f25 100644 --- a/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts +++ b/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts @@ -3,10 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { - ITestAssetWorkspace, - TestAssetWorkspace, -} from '../../../lsptoolshost/integrationTests/testAssets/testAssets.js'; +import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; const workspace: ITestAssetWorkspace = { description: 'Basic Razor app', diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts index 3500b7b9d8..6ddf2220ac 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts index 4975a3e71e..cff873f625 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts index 1cd31ea110..5acec8d531 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts index 86e7c12080..26671f7d54 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts index a3d4e1fa50..f04db7eb76 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts index c8152a0ccc..0bda9a4f81 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts index a1bb71ceeb..cc714c4dca 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts index 9670c57c4b..2b8722132f 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts index a1aed89ce0..d800857605 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts index d3be90e515..68e6c8342a 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts index b2e2f8534f..37cb1d37dc 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts index be5893e8d8..dff265a4ab 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts @@ -4,45 +4,45 @@ *--------------------------------------------------------------------------------------------*/ import { describe } from '@jest/globals'; -import { RunAddTagHelperDirectiveSuite } from './addTagHelperDirective.js'; -import { RunAttributeDirectiveSuite } from './attributeDirective.js'; -import { RunCodeBlockSuite } from './codeBlock.js'; -import { RunCodeDirectiveSuite } from './codeDirective.js'; -import { RunDoStatementSuite } from './doStatement.js'; -import { RunElsePartSuite } from './elsePart.js'; -import { RunExplicitExpressionInAttributeSuite } from './explicitExpressionInAttribute.js'; -import { RunExplicitExpressionSuite } from './explicitExpressions.js'; -import { RunForeachStatementSuite } from './foreachStatement.js'; -import { RunForStatementSuite } from './forStatement.js'; -import { RunFunctionsDirectiveSuite } from './functionsDirective.js'; -import { RunIfStatementSuite } from './ifStatement.js'; -import { RunImplementsDirectiveSuite } from './implementsDirective.js'; -import { RunImplicitExpressionInAttributeSuite } from './implicitExpressionInAttribute.js'; -import { RunImplicitExpressionSuite } from './implicitExpressions.js'; -import { RunInheritsDirectiveSuite } from './inheritsDirective.js'; -import { RunInjectDirectiveSuite } from './injectDirective.js'; -import { RunLayoutDirectiveSuite } from './layoutDirective.js'; -import { RunLockStatementSuite } from './lockStatement.js'; -import { RunModelDirectiveSuite } from './modelDirective.js'; -import { RunNamespaceDirectiveSuite } from './namespaceDirective.js'; -import { RunPageDirectiveSuite } from './pageDirective.js'; -import { RunRazorCommentSuite } from './razorComment.js'; -import { RunRazorTemplateSuite } from './razorTemplate.js'; -import { RunRemoveTagHelperDirectiveSuite } from './removeTagHelperDirective.js'; -import { RunScriptBlockSuite } from './scriptBlock.js'; -import { RunSectionDirectiveSuite } from './sectionDirective.js'; -import { RunStyleBlockSuite } from './styleBlock.js'; -import { RunSwitchStatementSuite } from './switchStatement.js'; -import { RunTagHelperPrefixDirectiveSuite } from './tagHelperPrefixDirective.js'; -import { RunTransitionsSuite } from './transitions.js'; -import { RunTryStatementSuite } from './tryStatement.js'; -import { RunUsingDirectiveSuite } from './usingDirective.js'; -import { RunUsingStatementSuite } from './usingStatement.js'; -import { RunWhileStatementSuite } from './whileStatement.js'; -import { RunRendermodeDirectiveSuite } from './rendermodeDirective.js'; -import { RunPreservewhitespaceDirectiveSuite } from './preservewhitespaceDirective.js'; -import { RunTypeparamDirectiveSuite } from './typeparamDirective.js'; -import { RunHTMLDynamicAttributeSuite } from './htmlDynamicAttribute.js'; +import { RunAddTagHelperDirectiveSuite } from './addTagHelperDirective'; +import { RunAttributeDirectiveSuite } from './attributeDirective'; +import { RunCodeBlockSuite } from './codeBlock'; +import { RunCodeDirectiveSuite } from './codeDirective'; +import { RunDoStatementSuite } from './doStatement'; +import { RunElsePartSuite } from './elsePart'; +import { RunExplicitExpressionInAttributeSuite } from './explicitExpressionInAttribute'; +import { RunExplicitExpressionSuite } from './explicitExpressions'; +import { RunForeachStatementSuite } from './foreachStatement'; +import { RunForStatementSuite } from './forStatement'; +import { RunFunctionsDirectiveSuite } from './functionsDirective'; +import { RunIfStatementSuite } from './ifStatement'; +import { RunImplementsDirectiveSuite } from './implementsDirective'; +import { RunImplicitExpressionInAttributeSuite } from './implicitExpressionInAttribute'; +import { RunImplicitExpressionSuite } from './implicitExpressions'; +import { RunInheritsDirectiveSuite } from './inheritsDirective'; +import { RunInjectDirectiveSuite } from './injectDirective'; +import { RunLayoutDirectiveSuite } from './layoutDirective'; +import { RunLockStatementSuite } from './lockStatement'; +import { RunModelDirectiveSuite } from './modelDirective'; +import { RunNamespaceDirectiveSuite } from './namespaceDirective'; +import { RunPageDirectiveSuite } from './pageDirective'; +import { RunRazorCommentSuite } from './razorComment'; +import { RunRazorTemplateSuite } from './razorTemplate'; +import { RunRemoveTagHelperDirectiveSuite } from './removeTagHelperDirective'; +import { RunScriptBlockSuite } from './scriptBlock'; +import { RunSectionDirectiveSuite } from './sectionDirective'; +import { RunStyleBlockSuite } from './styleBlock'; +import { RunSwitchStatementSuite } from './switchStatement'; +import { RunTagHelperPrefixDirectiveSuite } from './tagHelperPrefixDirective'; +import { RunTransitionsSuite } from './transitions'; +import { RunTryStatementSuite } from './tryStatement'; +import { RunUsingDirectiveSuite } from './usingDirective'; +import { RunUsingStatementSuite } from './usingStatement'; +import { RunWhileStatementSuite } from './whileStatement'; +import { RunRendermodeDirectiveSuite } from './rendermodeDirective'; +import { RunPreservewhitespaceDirectiveSuite } from './preservewhitespaceDirective'; +import { RunTypeparamDirectiveSuite } from './typeparamDirective'; +import { RunHTMLDynamicAttributeSuite } from './htmlDynamicAttribute'; // We bring together all test suites and wrap them in one here. The reason behind this is that // modules get reloaded per test suite and the vscode-textmate library doesn't support the way diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts index f44c90567e..3a86ebec48 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts index b25d4288f8..0c46756f4c 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts index 3af2e46240..7a14291168 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts index 7a2c7967d3..60a32935d4 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts index c9322a764c..788a66cd49 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts index 3e6b1206e1..7e09070506 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITokenizedContent } from './ITokenizedContent.js'; +import { ITokenizedContent } from './ITokenizedContent'; export function createSnapshot(tokenizedContent: ITokenizedContent): string { const snapshotLines: string[] = []; diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts index 48562bd167..36acf8d37b 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { expect } from '@jest/globals'; -import { createSnapshot } from './snapshotFactory.js'; -import { tokenize } from './tokenizedContentProvider.js'; +import { createSnapshot } from './snapshotFactory'; +import { tokenize } from './tokenizedContentProvider'; export async function assertMatchesSnapshot(content: string) { const tokenizedContent = await tokenize(content); diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts index 9128f02448..9f92f7f9fd 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts @@ -9,7 +9,7 @@ import { fileURLToPath } from 'url'; import oniguruma from 'vscode-oniguruma'; import vscodeTextmate from 'vscode-textmate'; import type { IGrammar, IRawGrammar, ITokenizeLineResult } from 'vscode-textmate'; -import { ITokenizedContent } from './ITokenizedContent.js'; +import { ITokenizedContent } from './ITokenizedContent'; const { INITIAL, parseRawGrammar, Registry } = vscodeTextmate; let razorGrammarCache: IGrammar | undefined; diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts index 89e1ab94db..b3a29d0204 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts index 63dc24606e..7dfbdcada2 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts index 2a0e6f0ee4..0b1ae02425 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts index 15eb4b95a4..c2c0542270 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts index e39367d7e2..6764132696 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts index 820b809532..39f5c5cc4e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts index 550bcac0a0..03294fecd7 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts index 3f5d513285..c81b59d014 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts index 575b1bbca6..45db85a3eb 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts index 4f4d17a928..00f384c295 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts index 700dafc412..bf7aaf493e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts index cf51111a77..9da60b4e5b 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts index d7a948d68a..49a55f3a41 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts index 487a365beb..7c3ad559a5 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts index 24b1ad249f..741e7a392b 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts index 8f60b60a29..736624bd27 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts index ce20f10c3b..befb4f29a0 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts index a610a70a04..7a4f6831ef 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts index 3a3d38c426..bc85c2719b 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts index 88a3c6c4a7..8930205497 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts index c3107c28cb..cd77473a5e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts index ace424f6a8..6d65b804d6 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts index 68af5b5dd8..2a57cfd265 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities.js'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/tasks/versionHelper.test.ts b/test/tasks/versionHelper.test.ts index 1995b791a0..2ba42ef180 100644 --- a/test/tasks/versionHelper.test.ts +++ b/test/tasks/versionHelper.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getNextReleaseVersion } from '../../tasks/snap/snapTasks.js'; +import { getNextReleaseVersion } from '../../tasks/snap/snapTasks'; import { describe, test, expect } from '@jest/globals'; describe('getNextReleaseVersion', () => { diff --git a/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts b/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts index f08b24e786..2068e1dfd4 100644 --- a/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts +++ b/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts @@ -5,7 +5,7 @@ import { describe, expect, jest, test } from '@jest/globals'; import * as vscode from 'vscode'; -import { CSharpExtensionExports, LimitedExtensionExports } from '../../../src/csharpExtensionExports.js'; +import { CSharpExtensionExports, LimitedExtensionExports } from '../../../src/csharpExtensionExports'; describe(`Untrusted Workspace`, () => { test(`Limited activation in untrusted workspace`, async () => { diff --git a/test/vsCodeUnitFramework.ts b/test/vsCodeUnitFramework.ts index d7e90436e0..f8ffdf9e71 100644 --- a/test/vsCodeUnitFramework.ts +++ b/test/vsCodeUnitFramework.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { jest } from '@jest/globals'; -import * as mockVsCode from '../__mocks__/vscode.js'; +import * as mockVsCode from '../__mocks__/vscode'; jest.mock('vscode', () => mockVsCode, { virtual: true }); jest.unstable_mockModule('vscode', () => mockVsCode, { virtual: true }); diff --git a/test/vscodeLauncher.ts b/test/vscodeLauncher.ts index 298e7b3fd8..639925b8d3 100644 --- a/test/vscodeLauncher.ts +++ b/test/vscodeLauncher.ts @@ -6,7 +6,7 @@ import * as cp from 'child_process'; import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; -import { execChildProcess } from '../src/common.js'; +import { execChildProcess } from '../src/common'; export async function prepareVSCodeAndExecuteTests( extensionDevelopmentPath: string, diff --git a/tsconfig.integration.json b/tsconfig.integration.json new file mode 100644 index 0000000000..be5c5fdc76 --- /dev/null +++ b/tsconfig.integration.json @@ -0,0 +1,17 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "NodeNext", + "moduleResolution": "NodeNext", + "noEmit": false, + "rootDir": ".", + "outDir": "out" + }, + "include": [ + "test/runIntegrationTests.ts", + "test/lsptoolshost/integrationTests/index.ts", + "test/omnisharp/omnisharpIntegrationTests/index.ts", + "test/razor/razorIntegrationTests/index.ts", + "test/untrustedWorkspace/integrationTests/index.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json index c184bd5d8c..f3c1de24e9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "esModuleInterop": true, "target": "ES2022", - "module": "NodeNext", + "module": "Preserve", "outDir": "out", "lib": [ "ES2021" @@ -27,8 +27,9 @@ "vscode-jsonrpc/node": ["./node_modules/vscode-jsonrpc/lib/node/main"], }, "sourceMap": true, - "moduleResolution": "NodeNext", + "moduleResolution": "Bundler", "moduleDetection": "force", + "noEmit": true, "isolatedModules": true, "strict": true, "forceConsistentCasingInFileNames": true, From 47f859559c151e4b0a6a3acf052a73979f673c2e Mon Sep 17 00:00:00 2001 From: David Barbet Date: Mon, 3 Aug 2026 18:40:58 -0700 Subject: [PATCH 3/3] Use TypeScript relative import rewriting Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2af8a1f5-c78a-435b-805d-0328d6cd4106 --- __mocks__/vscode.ts | 4 +- baseJestConfig.mjs | 2 + package-lock.json | 14 ++-- package.json | 7 +- src/activateOmniSharp.ts | 16 ++-- src/activateRoslyn.ts | 38 ++++----- src/checkSupportedPlatform.ts | 4 +- src/common.ts | 2 +- src/compositeDisposable.ts | 2 +- src/coreclrDebug/activate.ts | 26 +++--- src/coreclrDebug/util.ts | 6 +- src/csharpExtensionExports.ts | 8 +- src/eventStream.ts | 2 +- src/installRuntimeDependencies.ts | 14 ++-- src/lsptoolshost/activate.ts | 50 +++++------ src/lsptoolshost/autoInsert/onAutoInsert.ts | 4 +- .../autoInsert/onAutoInsertFeature.ts | 2 +- src/lsptoolshost/commands.ts | 22 ++--- src/lsptoolshost/copilot/contextProviders.ts | 6 +- src/lsptoolshost/copilot/copilotChatSurvey.ts | 8 +- src/lsptoolshost/debugger/debugger.ts | 18 ++-- ...slynWorkspaceDebugConfigurationProvider.ts | 12 +-- .../diagnostics/buildDiagnosticsService.ts | 2 +- .../diagnostics/buildResultReporterService.ts | 2 +- .../diagnostics/diagnosticMiddleware.ts | 2 +- .../diagnostics/fixAllCodeAction.ts | 4 +- .../diagnostics/nestedCodeAction.ts | 4 +- .../dotnetRuntimeExtensionResolver.ts | 16 ++-- .../extensions/builtInComponents.ts | 2 +- .../roslynLanguageServerExportChannel.ts | 2 +- .../generators/sourceGeneratorsRefresh.ts | 6 +- .../handlers/showToastNotification.ts | 10 ++- src/lsptoolshost/logging/collectLogs.ts | 10 +-- src/lsptoolshost/logging/loggingUtils.ts | 8 +- src/lsptoolshost/logging/profiling.ts | 2 +- .../options/configurationMiddleware.ts | 4 +- src/lsptoolshost/options/optionChanges.ts | 12 ++- .../projectContext/projectContextCommands.ts | 6 +- .../projectContext/projectContextFeature.ts | 2 +- .../projectContext/projectContextService.ts | 16 ++-- .../projectContext/projectContextStatus.ts | 10 +-- src/lsptoolshost/projectRestore/restore.ts | 8 +- .../razor/documentContentsRequest.ts | 2 +- src/lsptoolshost/razor/htmlDocument.ts | 2 +- .../razor/htmlDocumentContentProvider.ts | 6 +- src/lsptoolshost/razor/htmlDocumentManager.ts | 14 ++-- src/lsptoolshost/razor/razorEndpoints.ts | 34 ++++---- .../razor/showGeneratedDocumentCommand.ts | 12 +-- .../server/languageServerEvents.ts | 2 +- .../server/roslynLanguageClient.ts | 14 ++-- .../server/roslynLanguageServer.ts | 58 ++++++------- src/lsptoolshost/server/roslynProtocol.ts | 2 +- src/lsptoolshost/server/serverCommands.ts | 4 +- .../serviceBroker/brokeredServicesHosting.ts | 2 +- .../solutionSnapshotProvider.ts | 4 +- src/lsptoolshost/testing/unitTesting.ts | 12 +-- .../workspace/miscellaneousFileNotifier.ts | 8 +- .../workspace/workspaceCommands.ts | 6 +- src/lsptoolshost/workspace/workspaceStatus.ts | 6 +- src/main.ts | 58 +++++++------ src/networkSettings.ts | 2 +- src/omnisharp/dotnetResolver.ts | 8 +- src/omnisharp/engines/IEngine.ts | 16 ++-- src/omnisharp/engines/lspEngine.ts | 30 +++---- src/omnisharp/engines/stdioEngine.ts | 82 +++++++++---------- src/omnisharp/features/abstractProvider.ts | 6 +- src/omnisharp/features/changeForwarding.ts | 10 +-- src/omnisharp/features/codeActionProvider.ts | 16 ++-- src/omnisharp/features/codeLensProvider.ts | 16 ++-- src/omnisharp/features/commands.ts | 28 +++---- src/omnisharp/features/completionProvider.ts | 14 ++-- .../definitionMetadataDocumentProvider.ts | 4 +- src/omnisharp/features/definitionProvider.ts | 16 ++-- src/omnisharp/features/diagnosticsProvider.ts | 24 +++--- .../features/documentHighlightProvider.ts | 8 +- .../features/documentSymbolProvider.ts | 8 +- src/omnisharp/features/documentation.ts | 2 +- src/omnisharp/features/dotnetTest.ts | 26 +++--- .../features/fileOpenCloseProvider.ts | 10 +-- src/omnisharp/features/fixAll.ts | 2 +- src/omnisharp/features/fixAllProvider.ts | 18 ++-- .../features/formattingEditProvider.ts | 6 +- src/omnisharp/features/hoverProvider.ts | 8 +- .../features/implementationProvider.ts | 8 +- src/omnisharp/features/inlayHintProvider.ts | 16 ++-- src/omnisharp/features/referenceProvider.ts | 14 ++-- src/omnisharp/features/renameProvider.ts | 8 +- .../features/semanticTokensProvider.ts | 14 ++-- .../features/signatureHelpProvider.ts | 8 +- .../sourceGeneratedDocumentProvider.ts | 8 +- src/omnisharp/features/structureProvider.ts | 6 +- .../features/virtualDocumentTracker.ts | 14 ++-- .../features/workspaceSymbolProvider.ts | 16 ++-- .../fileOperationsResponseEditBuilder.ts | 6 +- src/omnisharp/languageMiddlewareFeature.ts | 2 +- src/omnisharp/launcher.ts | 8 +- .../backgroundWorkStatusBarObserver.ts | 10 +-- .../observers/baseStatusBarItemObserver.ts | 4 +- .../observers/csharpLoggerObserver.ts | 8 +- .../observers/dotnetChannelObserver.ts | 6 +- .../observers/dotnetLoggerObserver.ts | 8 +- .../observers/dotnetTestChannelObserver.ts | 6 +- .../observers/dotnetTestLoggerObserver.ts | 10 +-- .../observers/errorMessageObserver.ts | 10 +-- .../observers/informationMessageObserver.ts | 10 +-- .../observers/omnisharpChannelObserver.ts | 10 +-- .../omnisharpDebugModeLoggerObserver.ts | 8 +- .../observers/omnisharpLoggerObserver.ts | 12 +-- .../observers/omnisharpStatusBarObserver.ts | 8 +- .../observers/projectStatusBarObserver.ts | 8 +- .../observers/razorLoggerObserver.ts | 8 +- src/omnisharp/observers/telemetryObserver.ts | 18 ++-- .../observers/warningMessageObserver.ts | 10 +-- src/omnisharp/omniSharpMonoResolver.ts | 8 +- src/omnisharp/omnisharpDownloader.ts | 24 +++--- src/omnisharp/omnisharpLanguageServer.ts | 82 +++++++++---------- src/omnisharp/omnisharpLoggingEvents.ts | 12 +-- src/omnisharp/omnisharpManager.ts | 8 +- src/omnisharp/omnisharpOptionChanges.ts | 8 +- src/omnisharp/omnisharpPackageCreator.ts | 2 +- ...isharpWorkspaceDebugInformationProvider.ts | 10 +-- src/omnisharp/prioritization.ts | 2 +- src/omnisharp/protocol.ts | 2 +- src/omnisharp/requestQueue.ts | 6 +- src/omnisharp/requirementCheck.ts | 10 +-- src/omnisharp/server.ts | 52 ++++++------ src/omnisharp/typeConversion.ts | 2 +- src/omnisharp/utils.ts | 6 +- src/packageManager/IInstallDependencies.ts | 2 +- src/packageManager/absolutePathPackage.ts | 6 +- .../downloadAndInstallPackages.ts | 26 +++--- src/packageManager/fileDownloader.ts | 10 +-- .../getAbsolutePathPackagesToInstall.ts | 8 +- src/packageManager/isValidDownload.ts | 4 +- src/packageManager/package.ts | 2 +- src/packageManager/packageError.ts | 4 +- src/packageManager/packageFilterer.ts | 6 +- src/packageManager/zipInstaller.ts | 8 +- src/razor/razorOmnisharp.ts | 4 +- src/razor/razorOmnisharpDownloader.ts | 18 ++-- .../blazorDebugConfigurationProvider.ts | 16 ++-- .../src/blazorDebug/terminateDebugHandler.ts | 2 +- .../colorPresentationHandler.ts | 8 +- .../serializableColorPresentation.ts | 2 +- .../serializableColorPresentationParams.ts | 4 +- .../src/documentColor/documentColorHandler.ts | 4 +- .../serializableColorInformation.ts | 2 +- src/razor/src/folding/foldingRangeHandler.ts | 2 +- src/razor/src/formatting/formattingHandler.ts | 6 +- .../serializableFormattingResponse.ts | 2 +- src/razor/src/razorLanguage.ts | 2 +- src/razor/src/razorLanguageConfiguration.ts | 2 +- src/razor/src/rpc/serializableRange.ts | 2 +- src/razor/src/rpc/serializableTextEdit.ts | 2 +- src/shared/assets.ts | 8 +- src/shared/configurationProvider.ts | 14 ++-- .../constants/IHostExecutableResolver.ts | 2 +- src/shared/dotnetConfigurationProvider.ts | 12 +-- src/shared/limitedActivationStatus.ts | 6 +- src/shared/loggingEvents.ts | 4 +- src/shared/migrateOptions.ts | 6 +- src/shared/observables/createOptionStream.ts | 2 +- src/shared/observers/baseChannelObserver.ts | 4 +- src/shared/observers/baseLoggerObserver.ts | 6 +- src/shared/observers/csharpChannelObserver.ts | 6 +- src/shared/observers/csharpLoggerObserver.ts | 8 +- src/shared/observers/optionChangeObserver.ts | 4 +- src/shared/observers/utils/showMessage.ts | 2 +- src/shared/platform.ts | 2 +- src/shared/processPicker.ts | 4 +- src/shared/projectConfiguration.ts | 6 +- src/shared/reportIssue.ts | 8 +- src/shared/telemetryReporter.ts | 2 +- src/shared/utils/getDotnetInfo.ts | 6 +- src/shared/workspaceConfigurationProvider.ts | 10 +-- src/statusBarItemAdapter.ts | 2 +- src/textEditorAdapter.ts | 2 +- src/tools/runtimeDependencyPackageUtils.ts | 8 +- src/tools/updatePackageDependencies.ts | 14 ++-- src/utils/dotnetDevCertsHttps.ts | 4 +- src/utils/getCSharpDevKit.ts | 4 +- src/utils/getMonoVersion.ts | 2 +- src/utils/getMsBuildInfo.ts | 4 +- tasks/compilation/copyEsmSupportFiles.ts | 2 +- tasks/components/publishRoslynCopilot.ts | 6 +- tasks/debugger/fixLocUrls.ts | 2 +- tasks/debugger/generateOptionsSchema.ts | 4 +- tasks/debugger/updatePackageDependencies.ts | 4 +- .../publishLocalizationContent.ts | 2 +- tasks/packaging/installDependencies.ts | 4 +- tasks/packaging/installDependenciesClean.ts | 4 +- tasks/packaging/offlinePackagingTasks.ts | 24 +++--- tasks/packaging/updateRoslynVersion.ts | 6 +- tasks/packaging/vsceTasks.ts | 6 +- tasks/packaging/vsixReleasePackage.ts | 4 +- tasks/profiling/profiling.ts | 6 +- tasks/projectPaths.ts | 4 +- tasks/signing/installSignPlugin.ts | 6 +- tasks/signing/signJs.ts | 6 +- tasks/signing/signVsix.ts | 6 +- tasks/signing/signingTasks.ts | 2 +- tasks/signing/verifyVsix.ts | 4 +- tasks/snap/incrementVersion.ts | 4 +- tasks/snap/snapTasks.ts | 2 +- tasks/snap/updateChangelog.ts | 6 +- tasks/snap/updateVersionForStableRelease.ts | 4 +- tasks/spawnNode.ts | 2 +- tasks/tags/createTags.ts | 8 +- tasks/tests/omnisharptest.ts | 4 +- tasks/tests/omnisharptestIntegration.ts | 4 +- tasks/tests/omnisharptestTasks.ts | 4 +- tasks/tests/omnisharptestUnit.ts | 4 +- tasks/tests/test.ts | 4 +- tasks/tests/testArtifacts.ts | 4 +- tasks/tests/testHelpers.ts | 4 +- tasks/tests/testIntegrationCsharp.ts | 4 +- tasks/tests/testIntegrationDevkit.ts | 4 +- tasks/tests/testIntegrationRazorCohost.ts | 4 +- tasks/tests/testIntegrationUntrusted.ts | 4 +- tasks/tests/testTasks.ts | 2 +- tasks/tests/testUnit.ts | 4 +- test/createTmpAsset.ts | 2 +- test/fakes.ts | 8 +- .../buildDiagnostics.integration.test.ts | 6 +- .../classification.integration.test.ts | 4 +- .../codeactions.integration.test.ts | 4 +- .../codelens.integration.test.ts | 4 +- .../commandEnablement.integration.test.ts | 6 +- .../completion.integration.test.ts | 4 +- .../integrationTests/diagnosticsHelpers.ts | 2 +- .../documentDiagnostics.integration.test.ts | 8 +- ...documentSymbolProvider.integration.test.ts | 4 +- .../fileBasedPrograms.integration.test.ts | 6 +- .../formatting.integration.test.ts | 6 +- ...formattingEditorConfig.integration.test.ts | 6 +- .../gotoDefinition.integration.test.ts | 4 +- .../gotoImplementation.integration.test.ts | 4 +- .../hover.integration.test.ts | 4 +- test/lsptoolshost/integrationTests/index.ts | 2 +- .../integrationTests/integrationHelpers.ts | 8 +- .../lspInlayHints.integration.test.ts | 4 +- .../onAutoInsert.integration.test.ts | 4 +- .../references.integration.test.ts | 4 +- .../signatureHelp.integration.test.ts | 4 +- .../sourceGenerator.integration.test.ts | 4 +- .../integrationTests/testAssets/razorApp.ts | 2 +- .../testAssets/singleCsproj.ts | 2 +- .../testAssets/slnFilterWithCsproj.ts | 2 +- .../testAssets/slnWithCsproj.ts | 2 +- .../testAssets/slnWithGenerator.ts | 2 +- .../testAssets/testAssetWorkspace.ts | 12 +-- .../integrationTests/testAssets/testAssets.ts | 4 +- .../unitTests.integration.test.ts | 6 +- .../workspaceDiagnostics.integration.test.ts | 8 +- .../unitTests/captureActivityLogs.test.ts | 2 +- .../unitTests/configurationMiddleware.test.ts | 2 +- .../unitTests/csharpChannelObserver.test.ts | 6 +- .../unitTests/csharpLoggerObserver.test.ts | 12 +-- test/lsptoolshost/unitTests/json.test.ts | 2 +- ...languageServerConfigChangeObserver.test.ts | 4 +- .../unitTests/migrateOptions.test.ts | 10 +-- .../unitTests/roslynLanguageClient.test.ts | 4 +- .../advisor.integration.test.ts | 6 +- .../codeActionRename.integration.test.ts | 8 +- .../codeLensProvider.integration.test.ts | 6 +- .../completionProvider.integration.test.ts | 6 +- .../definitionProvider.test.ts | 10 ++- .../diagnostics.integration.test.ts | 8 +- ...documentSymbolProvider.integration.test.ts | 4 +- ...nCommentAutoFormatting.integration.test.ts | 2 +- .../dotnetTest.integration.test.ts | 14 ++-- .../hoverProvider.integration.test.ts | 4 +- .../implementationProvider.test.ts | 6 +- .../omnisharpIntegrationTests/index.ts | 2 +- .../inlayHints.integration.test.ts | 12 ++- .../integrationHelpers.ts | 8 +- .../languageMiddleware.integration.test.ts | 6 +- .../launchConfiguration.integration.test.ts | 8 +- .../launcher.test.ts | 4 +- .../omnisharpCommands.integration.test.ts | 9 +- .../parsedEnvironmentFile.test.ts | 2 +- .../reAnalyze.integration.test.ts | 16 ++-- .../referenceProvider.test.ts | 6 +- .../semanticTokensProvider.test.ts | 4 +- .../signatureHelp.integration.test.ts | 4 +- .../sourceGeneratorDefinitionProvider.test.ts | 8 +- .../testAssets/activeTestAssetWorkspace.ts | 14 ++-- .../testAssets/omnisharpTestAssetWorkspace.ts | 15 ++-- .../typeDefinitionProvider.test.ts | 10 ++- ...virtualDocumentTracker.integration.test.ts | 6 +- ...orkspaceSymbolProvider.integration.test.ts | 4 +- .../omnisharpUnitTests/absolutePath.test.ts | 4 +- .../omnisharpUnitTests/assets.test.ts | 8 +- .../blazorWebAssemblyDetection.test.ts | 8 +- .../omnisharpUnitTests/common.test.ts | 2 +- .../coreclrDebug/targetArchitecture.test.ts | 6 +- .../fakes/fakeDotnetResolver.ts | 4 +- .../fakes/fakeMonoResolver.ts | 4 +- .../features/reportIssue.test.ts | 8 +- .../informationMessageObserver.test.ts | 4 +- .../installRuntimeDependencies.test.ts | 16 ++-- .../backgroundWorkStatusBarObserver.test.ts | 8 +- .../logging/dotnetChannelObserver.test.ts | 6 +- .../logging/dotnetLoggerObserver.test.ts | 8 +- .../logging/dotnetTestChannelObserver.test.ts | 8 +- .../logging/dotnetTestLoggerObserver.test.ts | 10 +-- .../logging/errorMessageObserver.test.ts | 10 +-- .../logging/omnisharpChannelObserver.test.ts | 8 +- .../omnisharpDebugModeLoggerObserver.test.ts | 8 +- .../logging/omnisharpLoggerObserver.test.ts | 10 +-- .../omnisharpStatusBarObserver.test.ts | 8 +- .../logging/projectStatusBarObserver.test.ts | 8 +- .../logging/razorLoggerObserver.test.ts | 6 +- .../logging/telemetryObserver.test.ts | 16 ++-- .../logging/warningMessageObserver.test.ts | 6 +- .../omnisharp/omniSharpMonoResolver.test.ts | 4 +- .../omnisharpDownloader.test.ts | 26 +++--- .../omnisharpManager.test.ts | 24 +++--- .../omnisharpPackageCreator.test.ts | 8 +- .../optionChangeObserver.test.ts | 4 +- .../omnisharpUnitTests/optionStream.test.ts | 4 +- .../omnisharpUnitTests/options.test.ts | 4 +- .../downloadAndInstallPackages.test.ts | 26 +++--- .../packages/fileDownloader.test.ts | 12 +-- .../packages/isValidDownload.test.ts | 4 +- .../packages/packageFilterer.test.ts | 10 +-- .../omnisharpUnitTests/packages/proxy.test.ts | 2 +- .../packages/zipInstaller.test.ts | 20 ++--- .../omnisharpUnitTests/platform.test.ts | 2 +- .../omnisharpUnitTests/processPicker.test.ts | 2 +- .../testAssets/getConfigChangeEvent.ts | 2 +- .../testAssets/testEventBus.ts | 6 +- .../omnisharpUnitTests/testAssets/testZip.ts | 2 +- .../completion.integration.test.ts | 4 +- .../formatting.integration.test.ts | 4 +- .../hover.integration.test.ts | 4 +- test/razor/razorIntegrationTests/index.ts | 2 +- .../reference.integration.test.ts | 4 +- .../rename.integration.test.ts | 4 +- .../testAssets/testAssetWorkspace.ts | 5 +- .../tests/addTagHelperDirective.ts | 2 +- .../tests/attributeDirective.ts | 2 +- .../tests/codeBlock.ts | 2 +- .../tests/codeDirective.ts | 2 +- .../tests/doStatement.ts | 2 +- .../tests/elsePart.ts | 2 +- .../tests/explicitExpressionInAttribute.ts | 2 +- .../tests/explicitExpressions.ts | 2 +- .../tests/forStatement.ts | 2 +- .../tests/foreachStatement.ts | 2 +- .../tests/functionsDirective.ts | 2 +- .../tests/grammarTests.test.ts | 78 +++++++++--------- .../tests/htmlDynamicAttribute.ts | 2 +- .../tests/ifStatement.ts | 2 +- .../tests/implementsDirective.ts | 2 +- .../tests/implicitExpressionInAttribute.ts | 2 +- .../tests/implicitExpressions.ts | 2 +- .../tests/infrastructure/snapshotFactory.ts | 2 +- .../tests/infrastructure/testUtilities.ts | 4 +- .../tokenizedContentProvider.ts | 2 +- .../tests/inheritsDirective.ts | 2 +- .../tests/injectDirective.ts | 2 +- .../tests/layoutDirective.ts | 2 +- .../tests/lockStatement.ts | 2 +- .../tests/modelDirective.ts | 2 +- .../tests/namespaceDirective.ts | 2 +- .../tests/pageDirective.ts | 2 +- .../tests/preservewhitespaceDirective.ts | 2 +- .../tests/razorComment.ts | 2 +- .../tests/razorTemplate.ts | 2 +- .../tests/removeTagHelperDirective.ts | 2 +- .../tests/rendermodeDirective.ts | 2 +- .../tests/scriptBlock.ts | 2 +- .../tests/sectionDirective.ts | 2 +- .../tests/styleBlock.ts | 2 +- .../tests/switchStatement.ts | 2 +- .../tests/tagHelperPrefixDirective.ts | 2 +- .../tests/transitions.ts | 2 +- .../tests/tryStatement.ts | 2 +- .../tests/typeparamDirective.ts | 2 +- .../tests/usingDirective.ts | 2 +- .../tests/usingStatement.ts | 2 +- .../tests/whileStatement.ts | 2 +- test/tasks/versionHelper.test.ts | 2 +- .../integrationTests/index.ts | 2 +- .../untrustedWorkspace.integration.test.ts | 2 +- test/vsCodeUnitFramework.ts | 2 +- test/vscodeLauncher.ts | 2 +- tsconfig.integration.json | 17 ---- tsconfig.json | 6 +- 390 files changed, 1504 insertions(+), 1483 deletions(-) delete mode 100644 tsconfig.integration.json diff --git a/__mocks__/vscode.ts b/__mocks__/vscode.ts index 70e123e5b5..04689a515d 100644 --- a/__mocks__/vscode.ts +++ b/__mocks__/vscode.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from '../src/vscodeAdapter'; -import { getFakeVsCode } from '../test/fakes'; +import * as vscodeAdapter from '../src/vscodeAdapter.ts'; +import { getFakeVsCode } from '../test/fakes.ts'; // This module creates a manual mock for the vscode module for running in unit tests. // Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules. diff --git a/baseJestConfig.mjs b/baseJestConfig.mjs index ce082ca89e..81372ee6f6 100644 --- a/baseJestConfig.mjs +++ b/baseJestConfig.mjs @@ -30,6 +30,7 @@ export const baseProjectConfig = { ...(useESM ? { moduleNameMapper: { + // TypeScript rewrites source .ts specifiers to .js before Jest resolves the source module. '^(\\.{1,2}/.*)\\.js$': '$1', }, } @@ -41,6 +42,7 @@ export const baseIntegrationProjectConfig = { ...createDefaultPreset({ tsconfig: jestTsconfigPath }), ...commonProjectConfig, moduleNameMapper: { + // TypeScript rewrites source .ts specifiers to .js before Jest resolves the source module. '^(\\.{1,2}/.*)\\.js$': '$1', }, }; diff --git a/package-lock.json b/package-lock.json index a29c0f40d0..0458465aa7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -60,7 +60,7 @@ "tmp": "0.2.7", "ts-jest": "^29.4.1", "tsx": "^4.20.6", - "typescript": "5.6.2", + "typescript": "5.7.3", "typescript-eslint": "^8.65.0", "vscode-oniguruma": "^1.6.1", "vscode-textmate": "^6.0.0" @@ -11316,9 +11316,9 @@ } }, "node_modules/typescript": { - "version": "5.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha1-0d5ntr73fEGCP4It+PCzvP9gpaA=", + "version": "5.7.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha1-kZtEp9u4WDqbhW0WK+JKVL+ABz4=", "dev": true, "license": "Apache-2.0", "bin": { @@ -19831,9 +19831,9 @@ } }, "typescript": { - "version": "5.6.2", - "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.6.2.tgz", - "integrity": "sha1-0d5ntr73fEGCP4It+PCzvP9gpaA=", + "version": "5.7.3", + "resolved": "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha1-kZtEp9u4WDqbhW0WK+JKVL+ABz4=", "dev": true }, "typescript-eslint": { diff --git a/package.json b/package.json index 9892b10918..5265849cdb 100644 --- a/package.json +++ b/package.json @@ -65,10 +65,9 @@ } ], "scripts": { - "compile": "tsc -p tsconfig.json && npm run compile:integrationTests && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", - "compileDev": "tsc -p tsconfig.json && npm run compile:integrationTests && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compile": "tsc -p tsconfig.json && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", + "compileDev": "tsc -p tsconfig.json && npm run compile:copyEsmSupportFiles && npm run lint && npm run l10nDevGenerateLocalizationBundle && npm run compile:razorTextMate", "compile:copyEsmSupportFiles": "node --import tsx tasks/compilation/copyEsmSupportFiles.ts", - "compile:integrationTests": "tsc -p tsconfig.integration.json", "compile:razorTextMate": "npx js-yaml src/razor/syntaxes/aspnetcorerazor.tmLanguage.yml > src/razor/syntaxes/aspnetcorerazor.tmLanguage.json", "createTags": "npx tsx tasks/tags/createTags.ts", "fixLocUrls": "npx tsx tasks/debugger/fixLocUrls.ts", @@ -163,7 +162,7 @@ "tmp": "0.2.7", "ts-jest": "^29.4.1", "tsx": "^4.20.6", - "typescript": "5.6.2", + "typescript": "5.7.3", "typescript-eslint": "^8.65.0", "vscode-oniguruma": "^1.6.1", "vscode-textmate": "^6.0.0" diff --git a/src/activateOmniSharp.ts b/src/activateOmniSharp.ts index 97358bc848..bf4ac5a6bb 100644 --- a/src/activateOmniSharp.ts +++ b/src/activateOmniSharp.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { OmnisharpExtensionExports } from './csharpExtensionExports'; -import { PlatformInformation } from './shared/platform'; +import { OmnisharpExtensionExports } from './csharpExtensionExports.ts'; +import { PlatformInformation } from './shared/platform.ts'; import { Observable } from 'rxjs'; -import { NetworkSettingsProvider } from './networkSettings'; -import { ITelemetryReporter } from './shared/telemetryReporter'; -import { activateOmniSharpLanguageServer } from './omnisharp/omnisharpLanguageServer'; -import { EventStream } from './eventStream'; -import { razorOptions } from './shared/options'; -import { activateRazorOmniSharpExtension } from './razor/razorOmnisharp'; +import { NetworkSettingsProvider } from './networkSettings.ts'; +import { ITelemetryReporter } from './shared/telemetryReporter.ts'; +import { activateOmniSharpLanguageServer } from './omnisharp/omnisharpLanguageServer.ts'; +import { EventStream } from './eventStream.ts'; +import { razorOptions } from './shared/options.ts'; +import { activateRazorOmniSharpExtension } from './razor/razorOmnisharp.ts'; export function activateOmniSharp( context: vscode.ExtensionContext, diff --git a/src/activateRoslyn.ts b/src/activateRoslyn.ts index a27672c72b..7fca7674ce 100644 --- a/src/activateRoslyn.ts +++ b/src/activateRoslyn.ts @@ -4,27 +4,27 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { CSharpExtensionExports } from './csharpExtensionExports'; -import { PlatformInformation } from './shared/platform'; +import { CSharpExtensionExports } from './csharpExtensionExports.ts'; +import { PlatformInformation } from './shared/platform.ts'; import { Observable } from 'rxjs'; -import { EventStream } from './eventStream'; -import { ITelemetryReporterWithLevel } from './shared/telemetryReporter'; -import { RoslynLanguageServer } from './lsptoolshost/server/roslynLanguageServer'; -import { CSharpDevKitExports } from './csharpDevKitExports'; -import { RoslynLanguageServerEvents, ServerState } from './lsptoolshost/server/languageServerEvents'; -import { activateRoslynLanguageServer, createCaptureActivityLogs } from './lsptoolshost/activate'; -import Descriptors from './lsptoolshost/solutionSnapshot/descriptors'; -import { getBrokeredServiceContainer } from './lsptoolshost/serviceBroker/brokeredServicesHosting'; -import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker'; -import { RoslynLanguageServerExport } from './lsptoolshost/extensions/roslynLanguageServerExportChannel'; -import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider'; -import { languageServerOptions } from './shared/options'; -import { csharpDevkitExtensionId } from './utils/getCSharpDevKit'; +import { EventStream } from './eventStream.ts'; +import { ITelemetryReporterWithLevel } from './shared/telemetryReporter.ts'; +import { RoslynLanguageServer } from './lsptoolshost/server/roslynLanguageServer.ts'; +import { CSharpDevKitExports } from './csharpDevKitExports.ts'; +import { RoslynLanguageServerEvents, ServerState } from './lsptoolshost/server/languageServerEvents.ts'; +import { activateRoslynLanguageServer, createCaptureActivityLogs } from './lsptoolshost/activate.ts'; +import Descriptors from './lsptoolshost/solutionSnapshot/descriptors.ts'; +import { getBrokeredServiceContainer } from './lsptoolshost/serviceBroker/brokeredServicesHosting.ts'; +import { debugSessionTracker } from './coreclrDebug/provisionalDebugSessionTracker.ts'; +import { RoslynLanguageServerExport } from './lsptoolshost/extensions/roslynLanguageServerExportChannel.ts'; +import { BlazorDebugConfigurationProvider } from './razor/src/blazorDebug/blazorDebugConfigurationProvider.ts'; +import { languageServerOptions } from './shared/options.ts'; +import { csharpDevkitExtensionId } from './utils/getCSharpDevKit.ts'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; -import { SolutionSnapshotProvider } from './lsptoolshost/solutionSnapshot/solutionSnapshotProvider'; -import { BuildResultDiagnostics } from './lsptoolshost/diagnostics/buildResultReporterService'; -import { getComponentFolder } from './lsptoolshost/extensions/builtInComponents'; -import { ObservableLogOutputChannel } from './lsptoolshost/logging/observableLogOutputChannel'; +import { SolutionSnapshotProvider } from './lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts'; +import { BuildResultDiagnostics } from './lsptoolshost/diagnostics/buildResultReporterService.ts'; +import { getComponentFolder } from './lsptoolshost/extensions/builtInComponents.ts'; +import { ObservableLogOutputChannel } from './lsptoolshost/logging/observableLogOutputChannel.ts'; export function activateRoslyn( context: vscode.ExtensionContext, diff --git a/src/checkSupportedPlatform.ts b/src/checkSupportedPlatform.ts index 36fb5b8bc9..127eec754a 100644 --- a/src/checkSupportedPlatform.ts +++ b/src/checkSupportedPlatform.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { PlatformInformation } from './shared/platform'; -import { ActionOption, showErrorMessage } from './shared/observers/utils/showMessage'; +import { PlatformInformation } from './shared/platform.ts'; +import { ActionOption, showErrorMessage } from './shared/observers/utils/showMessage.ts'; export function checkIsSupportedPlatform(context: vscode.ExtensionContext, platformInfo: PlatformInformation): boolean { if (!isSupportedPlatform(platformInfo)) { diff --git a/src/common.ts b/src/common.ts index d3dc6d33e9..482cbb4019 100644 --- a/src/common.ts +++ b/src/common.ts @@ -7,7 +7,7 @@ import * as cp from 'child_process'; import * as fs from 'fs'; import * as os from 'os'; import * as path from 'path'; -import { AbsolutePath } from './packageManager/absolutePath'; +import { AbsolutePath } from './packageManager/absolutePath.ts'; let extensionPath: string; diff --git a/src/compositeDisposable.ts b/src/compositeDisposable.ts index 799577d1d7..6ac79c2917 100644 --- a/src/compositeDisposable.ts +++ b/src/compositeDisposable.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Subscription } from 'rxjs'; -import Disposable, { IDisposable } from './disposable'; +import Disposable, { IDisposable } from './disposable.ts'; export default class CompositeDisposable extends Disposable { private disposables = new Subscription(); diff --git a/src/coreclrDebug/activate.ts b/src/coreclrDebug/activate.ts index de2355afb5..0b0392d33c 100644 --- a/src/coreclrDebug/activate.ts +++ b/src/coreclrDebug/activate.ts @@ -5,23 +5,23 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import * as common from '../common'; -import { CoreClrDebugUtil, getTargetArchitecture, MINIMUM_SUPPORT_MACOS_DISPLAY_NAME } from './util'; -import { PlatformInformation } from '../shared/platform'; +import * as common from '../common.ts'; +import { CoreClrDebugUtil, getTargetArchitecture, MINIMUM_SUPPORT_MACOS_DISPLAY_NAME } from './util.ts'; +import { PlatformInformation } from '../shared/platform.ts'; import { DebuggerPrerequisiteWarning, DebuggerPrerequisiteFailure, DebuggerNotInstalledFailure, -} from '../shared/loggingEvents'; -import { EventStream } from '../eventStream'; -import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { RemoteAttachPicker } from '../shared/processPicker'; -import CompositeDisposable from '../compositeDisposable'; -import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider'; -import { omnisharpOptions } from '../shared/options'; -import { ActionOption, CommandOption, showErrorMessage } from '../shared/observers/utils/showMessage'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit'; +} from '../shared/loggingEvents.ts'; +import { EventStream } from '../eventStream.ts'; +import { getRuntimeDependencyPackageWithId } from '../tools/runtimeDependencyPackageUtils.ts'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.ts'; +import { RemoteAttachPicker } from '../shared/processPicker.ts'; +import CompositeDisposable from '../compositeDisposable.ts'; +import { BaseVsDbgConfigurationProvider } from '../shared/configurationProvider.ts'; +import { omnisharpOptions } from '../shared/options.ts'; +import { ActionOption, CommandOption, showErrorMessage } from '../shared/observers/utils/showMessage.ts'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit.ts'; export async function activate( thisExtension: vscode.Extension, diff --git a/src/coreclrDebug/util.ts b/src/coreclrDebug/util.ts index 9dd9b67213..c953712e42 100644 --- a/src/coreclrDebug/util.ts +++ b/src/coreclrDebug/util.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import * as fs from 'fs'; import * as semver from 'semver'; import * as os from 'os'; -import { PlatformInformation } from '../shared/platform'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { DotnetInfo } from '../shared/utils/dotnetInfo'; +import { PlatformInformation } from '../shared/platform.ts'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.ts'; +import { DotnetInfo } from '../shared/utils/dotnetInfo.ts'; const MINIMUM_SUPPORTED_DOTNET_CLI = '1.0.0'; diff --git a/src/csharpExtensionExports.ts b/src/csharpExtensionExports.ts index 7c34d28cd9..9c72d5acc7 100644 --- a/src/csharpExtensionExports.ts +++ b/src/csharpExtensionExports.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { Advisor } from './omnisharp/features/diagnosticsProvider'; -import { EventStream } from './eventStream'; -import TestManager from './omnisharp/features/dotnetTest'; +import { Advisor } from './omnisharp/features/diagnosticsProvider.ts'; +import { EventStream } from './eventStream.ts'; +import TestManager from './omnisharp/features/dotnetTest.ts'; import { GlobalBrokeredServiceContainer } from '@microsoft/servicehub-framework'; -import { LanguageServerEvents } from './lsptoolshost/server/languageServerEvents'; +import { LanguageServerEvents } from './lsptoolshost/server/languageServerEvents.ts'; import { PartialResultParams, ProtocolRequestType, RequestParam, RequestType } from 'vscode-languageclient'; export interface LimitedExtensionExports { diff --git a/src/eventStream.ts b/src/eventStream.ts index 946370b936..dfcea43ea3 100644 --- a/src/eventStream.ts +++ b/src/eventStream.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { Subject, Subscription } from 'rxjs'; -import { BaseEvent } from './shared/loggingEvents'; +import { BaseEvent } from './shared/loggingEvents.ts'; export class EventStream { private sink: Subject; diff --git a/src/installRuntimeDependencies.ts b/src/installRuntimeDependencies.ts index 3cdab86cd2..19b532b388 100644 --- a/src/installRuntimeDependencies.ts +++ b/src/installRuntimeDependencies.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from './shared/platform'; -import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents'; -import { EventStream } from './eventStream'; -import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall'; -import { DependencyInstallationStatus, IInstallDependencies } from './packageManager/IInstallDependencies'; -import { AbsolutePathPackage } from './packageManager/absolutePathPackage'; +import { PlatformInformation } from './shared/platform.ts'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from './shared/loggingEvents.ts'; +import { EventStream } from './eventStream.ts'; +import { getRuntimeDependenciesPackages } from './tools/runtimeDependencyPackageUtils.ts'; +import { getAbsolutePathPackagesToInstall } from './packageManager/getAbsolutePathPackagesToInstall.ts'; +import { DependencyInstallationStatus, IInstallDependencies } from './packageManager/IInstallDependencies.ts'; +import { AbsolutePathPackage } from './packageManager/absolutePathPackage.ts'; export async function installRuntimeDependencies( packageJSON: any, diff --git a/src/lsptoolshost/activate.ts b/src/lsptoolshost/activate.ts index c376efaa6b..072a38ed04 100644 --- a/src/lsptoolshost/activate.ts +++ b/src/lsptoolshost/activate.ts @@ -7,32 +7,32 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; import { fileURLToPath } from 'url'; -import { registerCommands } from './commands'; -import { registerDebugger } from './debugger/debugger'; -import { PlatformInformation } from '../shared/platform'; -import { ITelemetryReporterWithLevel } from '../shared/telemetryReporter'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit'; -import { DotnetRuntimeExtensionResolver } from './dotnetRuntime/dotnetRuntimeExtensionResolver'; -import { registerUnitTestingCommands } from './testing/unitTesting'; -import { registerLanguageServerOptionChanges } from './options/optionChanges'; +import { registerCommands } from './commands.ts'; +import { registerDebugger } from './debugger/debugger.ts'; +import { PlatformInformation } from '../shared/platform.ts'; +import { ITelemetryReporterWithLevel } from '../shared/telemetryReporter.ts'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit.ts'; +import { DotnetRuntimeExtensionResolver } from './dotnetRuntime/dotnetRuntimeExtensionResolver.ts'; +import { registerUnitTestingCommands } from './testing/unitTesting.ts'; +import { registerLanguageServerOptionChanges } from './options/optionChanges.ts'; import { Observable } from 'rxjs'; -import { RoslynLanguageServerEvents } from './server/languageServerEvents'; -import { registerCodeActionFixAllCommands } from './diagnostics/fixAllCodeAction'; -import { commonOptions, languageServerOptions } from '../shared/options'; -import { registerNestedCodeActionCommands } from './diagnostics/nestedCodeAction'; -import { registerRestoreCommands } from './projectRestore/restore'; -import { registerMiscellaneousFileNotifier } from './workspace/miscellaneousFileNotifier'; -import { TelemetryEventNames } from '../shared/telemetryEventNames'; -import { WorkspaceStatus } from './workspace/workspaceStatus'; -import { ProjectContextStatus } from './projectContext/projectContextStatus'; -import { RoslynLanguageServer } from './server/roslynLanguageServer'; -import { registerCopilotContextProviders } from './copilot/contextProviders'; -import { registerCopilotChatSurvey } from './copilot/copilotChatSurvey'; -import { registerRazorEndpoints } from './razor/razorEndpoints'; -import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel'; -import { registerSourceGeneratorRefresh } from './generators/sourceGeneratorsRefresh'; -import { ActivityLogCapture } from '../csharpExtensionExports'; -import { createActivityLogCapture } from './logging/loggingUtils'; +import { RoslynLanguageServerEvents } from './server/languageServerEvents.ts'; +import { registerCodeActionFixAllCommands } from './diagnostics/fixAllCodeAction.ts'; +import { commonOptions, languageServerOptions } from '../shared/options.ts'; +import { registerNestedCodeActionCommands } from './diagnostics/nestedCodeAction.ts'; +import { registerRestoreCommands } from './projectRestore/restore.ts'; +import { registerMiscellaneousFileNotifier } from './workspace/miscellaneousFileNotifier.ts'; +import { TelemetryEventNames } from '../shared/telemetryEventNames.ts'; +import { WorkspaceStatus } from './workspace/workspaceStatus.ts'; +import { ProjectContextStatus } from './projectContext/projectContextStatus.ts'; +import { RoslynLanguageServer } from './server/roslynLanguageServer.ts'; +import { registerCopilotContextProviders } from './copilot/contextProviders.ts'; +import { registerCopilotChatSurvey } from './copilot/copilotChatSurvey.ts'; +import { registerRazorEndpoints } from './razor/razorEndpoints.ts'; +import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel.ts'; +import { registerSourceGeneratorRefresh } from './generators/sourceGeneratorsRefresh.ts'; +import { ActivityLogCapture } from '../csharpExtensionExports.ts'; +import { createActivityLogCapture } from './logging/loggingUtils.ts'; let _channel: ObservableLogOutputChannel; let _traceChannel: ObservableLogOutputChannel; diff --git a/src/lsptoolshost/autoInsert/onAutoInsert.ts b/src/lsptoolshost/autoInsert/onAutoInsert.ts index e0d9d94a7b..1501b3bf8d 100644 --- a/src/lsptoolshost/autoInsert/onAutoInsert.ts +++ b/src/lsptoolshost/autoInsert/onAutoInsert.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as RoslynProtocol from '../server/roslynProtocol'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import * as RoslynProtocol from '../server/roslynProtocol.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; import { FormattingOptions, InsertTextFormat, Range, TextDocumentIdentifier } from 'vscode-languageclient'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts b/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts index a68a9acb6b..ce1007a6dc 100644 --- a/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts +++ b/src/lsptoolshost/autoInsert/onAutoInsertFeature.ts @@ -21,7 +21,7 @@ import { ServerCapabilities, } from 'vscode-languageclient'; -import * as RoslynProtocol from '../server/roslynProtocol'; +import * as RoslynProtocol from '../server/roslynProtocol.ts'; import { randomUUID } from 'crypto'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/commands.ts b/src/lsptoolshost/commands.ts index f27069f480..ff7752b85d 100644 --- a/src/lsptoolshost/commands.ts +++ b/src/lsptoolshost/commands.ts @@ -4,23 +4,23 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from './server/roslynLanguageServer'; -import reportIssue from '../shared/reportIssue'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { registerWorkspaceCommands } from './workspace/workspaceCommands'; -import { registerServerCommands } from './server/serverCommands'; +import { RoslynLanguageServer } from './server/roslynLanguageServer.ts'; +import reportIssue from '../shared/reportIssue.ts'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.ts'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.ts'; +import { registerWorkspaceCommands } from './workspace/workspaceCommands.ts'; +import { registerServerCommands } from './server/serverCommands.ts'; import { changeProjectContext, changeProjectContextCommandName, changeProjectContextEditor, changeProjectContextFileExplorer, openAndChangeProjectContext, -} from './projectContext/projectContextCommands'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; -import { TelemetryEventNames } from '../shared/telemetryEventNames'; -import { registerCollectLogsCommand } from './logging/collectLogs'; -import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel'; +} from './projectContext/projectContextCommands.ts'; +import { ITelemetryReporter } from '../shared/telemetryReporter.ts'; +import { TelemetryEventNames } from '../shared/telemetryEventNames.ts'; +import { registerCollectLogsCommand } from './logging/collectLogs.ts'; +import { ObservableLogOutputChannel } from './logging/observableLogOutputChannel.ts'; export function registerCommands( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/copilot/contextProviders.ts b/src/lsptoolshost/copilot/contextProviders.ts index 12f1c5c806..48ccf6a3b3 100644 --- a/src/lsptoolshost/copilot/contextProviders.ts +++ b/src/lsptoolshost/copilot/contextProviders.ts @@ -10,9 +10,9 @@ import { } from '@github/copilot-language-server'; import * as vscode from 'vscode'; import * as lsp from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { CSharpExtensionId } from '../../constants/csharpExtensionId'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { CSharpExtensionId } from '../../constants/csharpExtensionId.ts'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; type ActiveExperiments = { [name: string]: string | number | boolean | string[] }; diff --git a/src/lsptoolshost/copilot/copilotChatSurvey.ts b/src/lsptoolshost/copilot/copilotChatSurvey.ts index 2365699d8d..2a7ede2d3d 100644 --- a/src/lsptoolshost/copilot/copilotChatSurvey.ts +++ b/src/lsptoolshost/copilot/copilotChatSurvey.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import type { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { LanguageServerEvents, ServerState } from '../server/languageServerEvents'; -import { ITelemetryReporter } from '../../shared/telemetryReporter'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames'; +import type { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { LanguageServerEvents, ServerState } from '../server/languageServerEvents.ts'; +import { ITelemetryReporter } from '../../shared/telemetryReporter.ts'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames.ts'; // Stored under separate keys so a snooze write can never overwrite a terminal "shown" // value set in another window (globalState.update replaces the whole value for a key). diff --git a/src/lsptoolshost/debugger/debugger.ts b/src/lsptoolshost/debugger/debugger.ts index 47ccce90e1..f5ef3a2590 100644 --- a/src/lsptoolshost/debugger/debugger.ts +++ b/src/lsptoolshost/debugger/debugger.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { addAssetsIfNecessary, generateAssets } from '../../shared/assets'; -import { DotnetWorkspaceConfigurationProvider } from '../../shared/workspaceConfigurationProvider'; -import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { RoslynWorkspaceDebugInformationProvider } from '../debugger/roslynWorkspaceDebugConfigurationProvider'; -import { PlatformInformation } from '../../shared/platform'; -import { DotnetConfigurationResolver } from '../../shared/dotnetConfigurationProvider'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; -import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents'; +import { addAssetsIfNecessary, generateAssets } from '../../shared/assets.ts'; +import { DotnetWorkspaceConfigurationProvider } from '../../shared/workspaceConfigurationProvider.ts'; +import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { RoslynWorkspaceDebugInformationProvider } from '../debugger/roslynWorkspaceDebugConfigurationProvider.ts'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { DotnetConfigurationResolver } from '../../shared/dotnetConfigurationProvider.ts'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; +import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents.ts'; export function registerDebugger( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts b/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts index b3bbb45ae1..dabe9a8945 100644 --- a/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts +++ b/src/lsptoolshost/debugger/roslynWorkspaceDebugConfigurationProvider.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { mapAsync } from '../../common'; +import { mapAsync } from '../../common.ts'; import { IWorkspaceDebugInformationProvider, ProjectDebugInformation, -} from '../../shared/IWorkspaceDebugInformationProvider'; +} from '../../shared/IWorkspaceDebugInformationProvider.ts'; import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyHostedServer, isBlazorWebAssemblyProject, isWebProject, -} from '../../shared/utils'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +} from '../../shared/utils.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; import { ProjectDebugConfiguration, WorkspaceDebugConfigurationParams, WorkspaceDebugConfigurationRequest, -} from '../server/roslynProtocol'; -import { UriConverter } from '../utils/uriConverter'; +} from '../server/roslynProtocol.ts'; +import { UriConverter } from '../utils/uriConverter.ts'; export class RoslynWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { constructor( diff --git a/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts b/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts index 70458d3bd5..54ddf5e660 100644 --- a/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts +++ b/src/lsptoolshost/diagnostics/buildDiagnosticsService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { languageServerOptions } from '../../shared/options'; +import { languageServerOptions } from '../../shared/options.ts'; export enum AnalysisSetting { FullSolution = 'fullSolution', diff --git a/src/lsptoolshost/diagnostics/buildResultReporterService.ts b/src/lsptoolshost/diagnostics/buildResultReporterService.ts index ed2587e661..998750de6b 100644 --- a/src/lsptoolshost/diagnostics/buildResultReporterService.ts +++ b/src/lsptoolshost/diagnostics/buildResultReporterService.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { CancellationToken } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; import * as vscode from 'vscode'; interface IBuildResultDiagnostics { diff --git a/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts b/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts index 5adba60290..739491d25c 100644 --- a/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts +++ b/src/lsptoolshost/diagnostics/diagnosticMiddleware.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { ProvideDiagnosticSignature, ProvideWorkspaceDiagnosticSignature, vsdiag } from 'vscode-languageclient'; -import { languageServerOptions } from '../../shared/options'; +import { languageServerOptions } from '../../shared/options.ts'; export async function provideDiagnostics( document: vscode.TextDocument | vscode.Uri, diff --git a/src/lsptoolshost/diagnostics/fixAllCodeAction.ts b/src/lsptoolshost/diagnostics/fixAllCodeAction.ts index 6e251ffb72..6975fdfbfb 100644 --- a/src/lsptoolshost/diagnostics/fixAllCodeAction.ts +++ b/src/lsptoolshost/diagnostics/fixAllCodeAction.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as RoslynProtocol from '../server/roslynProtocol'; +import * as RoslynProtocol from '../server/roslynProtocol.ts'; import { LSPAny } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; export function registerCodeActionFixAllCommands( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/diagnostics/nestedCodeAction.ts b/src/lsptoolshost/diagnostics/nestedCodeAction.ts index 98d6462424..a083cf7121 100644 --- a/src/lsptoolshost/diagnostics/nestedCodeAction.ts +++ b/src/lsptoolshost/diagnostics/nestedCodeAction.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { CodeAction, CodeActionResolveRequest, LSPAny } from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { getFixAllResponse } from './fixAllCodeAction'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { getFixAllResponse } from './fixAllCodeAction.ts'; export function registerNestedCodeActionCommands( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts index aebfa77e19..a8314db706 100644 --- a/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts +++ b/src/lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts @@ -5,21 +5,21 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { HostExecutableInformation } from '../../shared/constants/hostExecutableInformation'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { PlatformInformation } from '../../shared/platform'; -import { languageServerOptions } from '../../shared/options'; +import { HostExecutableInformation } from '../../shared/constants/hostExecutableInformation.ts'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.ts'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { languageServerOptions } from '../../shared/options.ts'; import { existsSync } from 'fs'; -import { CSharpExtensionId } from '../../constants/csharpExtensionId'; +import { CSharpExtensionId } from '../../constants/csharpExtensionId.ts'; import { readFile } from 'fs/promises'; import { DotnetInstallMode, IDotnetAcquireContext, IDotnetAcquireResult, IDotnetFindPathContext, -} from './dotnetRuntimeExtensionApi'; -import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +} from './dotnetRuntimeExtensionApi.ts'; +import { DotNetRuntimeExtensionId } from '../../checkDotNetRuntimeExtensionVersion.ts'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; const DotNetMajorVersion = '10'; const DotNetMinorVersion = '0'; diff --git a/src/lsptoolshost/extensions/builtInComponents.ts b/src/lsptoolshost/extensions/builtInComponents.ts index 179eaa2ea5..74801869f1 100644 --- a/src/lsptoolshost/extensions/builtInComponents.ts +++ b/src/lsptoolshost/extensions/builtInComponents.ts @@ -7,7 +7,7 @@ import * as vscode from 'vscode'; import * as fs from 'fs'; import * as path from 'path'; import { fileURLToPath } from 'url'; -import { LanguageServerOptions } from '../../shared/options'; +import { LanguageServerOptions } from '../../shared/options.ts'; interface ComponentInfo { defaultFolderName: string; diff --git a/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts b/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts index b158753b9f..f7e1f1b49b 100644 --- a/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts +++ b/src/lsptoolshost/extensions/roslynLanguageServerExportChannel.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; import { ParameterStructures, PartialResultParams, diff --git a/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts b/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts index a006fa06b8..10ff6a13b3 100644 --- a/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts +++ b/src/lsptoolshost/generators/sourceGeneratorsRefresh.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; -import { RefreshSourceGeneratorsNotification } from '../server/roslynProtocol'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.ts'; +import { RefreshSourceGeneratorsNotification } from '../server/roslynProtocol.ts'; export function registerSourceGeneratorRefresh( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/handlers/showToastNotification.ts b/src/lsptoolshost/handlers/showToastNotification.ts index e11f52d1b9..eff0f0947d 100644 --- a/src/lsptoolshost/handlers/showToastNotification.ts +++ b/src/lsptoolshost/handlers/showToastNotification.ts @@ -4,10 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageClient } from '../server/roslynLanguageClient'; +import { RoslynLanguageClient } from '../server/roslynLanguageClient.ts'; import { MessageType } from 'vscode-languageclient'; -import { ShowToastNotification } from '../server/roslynProtocol'; -import { showErrorMessage, showInformationMessage, showWarningMessage } from '../../shared/observers/utils/showMessage'; +import { ShowToastNotification } from '../server/roslynProtocol.ts'; +import { + showErrorMessage, + showInformationMessage, + showWarningMessage, +} from '../../shared/observers/utils/showMessage.ts'; export function registerShowToastNotification(client: RoslynLanguageClient) { client.onNotification(ShowToastNotification.type, async (notification) => { diff --git a/src/lsptoolshost/logging/collectLogs.ts b/src/lsptoolshost/logging/collectLogs.ts index fff9750de0..692e0ec927 100644 --- a/src/lsptoolshost/logging/collectLogs.ts +++ b/src/lsptoolshost/logging/collectLogs.ts @@ -6,9 +6,9 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage.ts'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel.ts'; import { DumpRequest, collectDumps, @@ -21,8 +21,8 @@ import { createActivityLogCapture, generateReadmeContent, LogsToCollect, -} from './loggingUtils'; -import { runDotnetTraceInTerminal } from './profiling'; +} from './loggingUtils.ts'; +import { runDotnetTraceInTerminal } from './profiling.ts'; /** Represents the types of data the user can choose to collect */ type CollectOption = 'activityLogs' | 'performanceTrace' | 'memoryDump' | 'gcDump'; diff --git a/src/lsptoolshost/logging/loggingUtils.ts b/src/lsptoolshost/logging/loggingUtils.ts index 33e1d3b6ee..664635c796 100644 --- a/src/lsptoolshost/logging/loggingUtils.ts +++ b/src/lsptoolshost/logging/loggingUtils.ts @@ -7,10 +7,10 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import archiver from 'archiver'; -import { execChildProcess } from '../../common'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel'; -import { ActivityLogCapture, ActivityLogResult } from '../../csharpExtensionExports'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { execChildProcess } from '../../common.ts'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel.ts'; +import { ActivityLogCapture, ActivityLogResult } from '../../csharpExtensionExports.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; /** * Configuration for a dump tool. diff --git a/src/lsptoolshost/logging/profiling.ts b/src/lsptoolshost/logging/profiling.ts index 0ed2d5cb0d..577d398e84 100644 --- a/src/lsptoolshost/logging/profiling.ts +++ b/src/lsptoolshost/logging/profiling.ts @@ -7,7 +7,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import { EOL } from 'os'; -import { ObservableLogOutputChannel } from './observableLogOutputChannel'; +import { ObservableLogOutputChannel } from './observableLogOutputChannel.ts'; const TraceTerminalName = 'dotnet-trace'; diff --git a/src/lsptoolshost/options/configurationMiddleware.ts b/src/lsptoolshost/options/configurationMiddleware.ts index e8bfc1bd89..dde4772ee5 100644 --- a/src/lsptoolshost/options/configurationMiddleware.ts +++ b/src/lsptoolshost/options/configurationMiddleware.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { ConfigurationParams } from 'vscode-languageclient'; -import { convertServerOptionNameToClientConfigurationName as convertServerOptionNameToClientConfigurationName } from './optionNameConverter'; -import { readEquivalentVsCodeConfiguration } from './universalEditorConfigProvider'; +import { convertServerOptionNameToClientConfigurationName as convertServerOptionNameToClientConfigurationName } from './optionNameConverter.ts'; +import { readEquivalentVsCodeConfiguration } from './universalEditorConfigProvider.ts'; export function readConfigurations(params: ConfigurationParams): (string | null)[] { // Note: null means there is no such configuration in client. diff --git a/src/lsptoolshost/options/optionChanges.ts b/src/lsptoolshost/options/optionChanges.ts index 0bc5f878d4..d68fbf7348 100644 --- a/src/lsptoolshost/options/optionChanges.ts +++ b/src/lsptoolshost/options/optionChanges.ts @@ -5,10 +5,14 @@ import * as vscode from 'vscode'; import { Observable } from 'rxjs'; -import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../../shared/options'; -import { HandleOptionChanges, OptionChangeObserver, OptionChanges } from '../../shared/observers/optionChangeObserver'; -import Disposable from '../../disposable'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; +import { CommonOptionsThatTriggerReload, LanguageServerOptionsThatTriggerReload } from '../../shared/options.ts'; +import { + HandleOptionChanges, + OptionChangeObserver, + OptionChanges, +} from '../../shared/observers/optionChangeObserver.ts'; +import Disposable from '../../disposable.ts'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.ts'; export function registerLanguageServerOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { diff --git a/src/lsptoolshost/projectContext/projectContextCommands.ts b/src/lsptoolshost/projectContext/projectContextCommands.ts index 4715f74ab5..76e278b58d 100644 --- a/src/lsptoolshost/projectContext/projectContextCommands.ts +++ b/src/lsptoolshost/projectContext/projectContextCommands.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { isRelevantDocument } from './projectContextService'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { VSProjectContext } from '../server/roslynProtocol'; +import { isRelevantDocument } from './projectContextService.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { VSProjectContext } from '../server/roslynProtocol.ts'; import { CancellationToken } from 'vscode-languageclient'; export const changeProjectContextCommandName = 'csharp.changeProjectContext'; diff --git a/src/lsptoolshost/projectContext/projectContextFeature.ts b/src/lsptoolshost/projectContext/projectContextFeature.ts index e8759839fc..fbdf9cdcfb 100644 --- a/src/lsptoolshost/projectContext/projectContextFeature.ts +++ b/src/lsptoolshost/projectContext/projectContextFeature.ts @@ -22,7 +22,7 @@ import { TextDocumentRegistrationOptions, } from 'vscode-languageclient'; -import * as RoslynProtocol from '../server/roslynProtocol'; +import * as RoslynProtocol from '../server/roslynProtocol.ts'; import { randomUUID } from 'crypto'; import { LanguageClient } from 'vscode-languageclient/node'; diff --git a/src/lsptoolshost/projectContext/projectContextService.ts b/src/lsptoolshost/projectContext/projectContextService.ts index 53df227d52..0386dfce0f 100644 --- a/src/lsptoolshost/projectContext/projectContextService.ts +++ b/src/lsptoolshost/projectContext/projectContextService.ts @@ -4,20 +4,20 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; import { ProjectContextRefreshRequest, VSGetProjectContextsRequest, VSProjectContext, VSProjectContextList, -} from '../server/roslynProtocol'; +} from '../server/roslynProtocol.ts'; import { TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter'; -import { LanguageServerEvents, ServerState } from '../server/languageServerEvents'; -import { RoslynLanguageClient } from '../server/roslynLanguageClient'; -import { languageServerOptions } from '../../shared/options'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; -import { RazorLanguage } from '../../razor/src/razorLanguage'; +import { UriConverter } from '../utils/uriConverter.ts'; +import { LanguageServerEvents, ServerState } from '../server/languageServerEvents.ts'; +import { RoslynLanguageClient } from '../server/roslynLanguageClient.ts'; +import { languageServerOptions } from '../../shared/options.ts'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.ts'; +import { RazorLanguage } from '../../razor/src/razorLanguage.ts'; export interface ProjectContextChangeEvent { document: vscode.TextDocument; diff --git a/src/lsptoolshost/projectContext/projectContextStatus.ts b/src/lsptoolshost/projectContext/projectContextStatus.ts index 7c3028962a..096c043b4a 100644 --- a/src/lsptoolshost/projectContext/projectContextStatus.ts +++ b/src/lsptoolshost/projectContext/projectContextStatus.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { languageServerOptions } from '../../shared/options'; -import { RazorLanguage } from '../../razor/src/razorLanguage'; -import { ServerState } from '../server/languageServerEvents'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { languageServerOptions } from '../../shared/options.ts'; +import { RazorLanguage } from '../../razor/src/razorLanguage.ts'; +import { ServerState } from '../server/languageServerEvents.ts'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.ts'; export class ProjectContextStatus { static createStatusItem(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { diff --git a/src/lsptoolshost/projectRestore/restore.ts b/src/lsptoolshost/projectRestore/restore.ts index dbabc0b2d1..750ca8a3ed 100644 --- a/src/lsptoolshost/projectRestore/restore.ts +++ b/src/lsptoolshost/projectRestore/restore.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { RestorableProjects, RestoreParams, RestoreRequest } from '../server/roslynProtocol'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { RestorableProjects, RestoreParams, RestoreRequest } from '../server/roslynProtocol.ts'; import path from 'path'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage.ts'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; import { CancellationToken } from 'vscode-languageclient'; let _restoreInProgress = false; diff --git a/src/lsptoolshost/razor/documentContentsRequest.ts b/src/lsptoolshost/razor/documentContentsRequest.ts index ea9584b05f..27f60b0b4f 100644 --- a/src/lsptoolshost/razor/documentContentsRequest.ts +++ b/src/lsptoolshost/razor/documentContentsRequest.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { TextDocumentIdentifier } from 'vscode-languageclient'; -import { GeneratedDocumentKind } from './generatedDocumentKind'; +import { GeneratedDocumentKind } from './generatedDocumentKind.ts'; export class DocumentContentsRequest { constructor( diff --git a/src/lsptoolshost/razor/htmlDocument.ts b/src/lsptoolshost/razor/htmlDocument.ts index e39f2e9773..f470a8df74 100644 --- a/src/lsptoolshost/razor/htmlDocument.ts +++ b/src/lsptoolshost/razor/htmlDocument.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { getUriPath } from '../../razor/src/uriPaths'; +import { getUriPath } from '../../razor/src/uriPaths.ts'; export class HtmlDocument { public readonly path: string; diff --git a/src/lsptoolshost/razor/htmlDocumentContentProvider.ts b/src/lsptoolshost/razor/htmlDocumentContentProvider.ts index 1401a6d05e..2ccfdd0ec2 100644 --- a/src/lsptoolshost/razor/htmlDocumentContentProvider.ts +++ b/src/lsptoolshost/razor/htmlDocumentContentProvider.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; -import { HtmlDocumentManager } from './htmlDocumentManager'; -import { getUriPath } from '../../razor/src/uriPaths'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.ts'; +import { HtmlDocumentManager } from './htmlDocumentManager.ts'; +import { getUriPath } from '../../razor/src/uriPaths.ts'; export class HtmlDocumentContentProvider implements vscode.TextDocumentContentProvider { public static readonly scheme = 'razor-html'; diff --git a/src/lsptoolshost/razor/htmlDocumentManager.ts b/src/lsptoolshost/razor/htmlDocumentManager.ts index 69f0f8531b..64a6b28c3f 100644 --- a/src/lsptoolshost/razor/htmlDocumentManager.ts +++ b/src/lsptoolshost/razor/htmlDocumentManager.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { PlatformInformation } from '../../shared/platform'; -import { getUriPath } from '../../razor/src/uriPaths'; -import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider'; -import { HtmlDocument } from './htmlDocument'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { getUriPath } from '../../razor/src/uriPaths.ts'; +import { HtmlDocumentContentProvider } from './htmlDocumentContentProvider.ts'; +import { HtmlDocument } from './htmlDocument.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.ts'; import { RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter'; +import { UriConverter } from '../utils/uriConverter.ts'; const virtualHtmlSuffix = '__virtual.html'; diff --git a/src/lsptoolshost/razor/razorEndpoints.ts b/src/lsptoolshost/razor/razorEndpoints.ts index 3c619c4f18..c71bb95c32 100644 --- a/src/lsptoolshost/razor/razorEndpoints.ts +++ b/src/lsptoolshost/razor/razorEndpoints.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; +import { ObservableLogOutputChannel } from '../logging/observableLogOutputChannel.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; import { ColorPresentationRequest, CompletionRequest, @@ -29,21 +29,21 @@ import { SignatureHelp, SignatureHelpRequest, } from 'vscode-languageclient'; -import { HtmlUpdateParameters } from './htmlUpdateParameters'; -import { UriConverter } from '../utils/uriConverter'; -import { PlatformInformation } from '../../shared/platform'; -import { HtmlDocumentManager } from './htmlDocumentManager'; -import { DocumentColorHandler } from '../../razor/src/documentColor/documentColorHandler'; -import { ColorPresentationHandler } from '../../razor/src/colorPresentation/colorPresentationHandler'; -import { convertRangeToSerializable } from '../../razor/src/rpc/serializableRange'; -import { FoldingRangeHandler } from '../../razor/src/folding/foldingRangeHandler'; -import { CompletionHandler } from '../../razor/src/completion/completionHandler'; -import { FormattingHandler } from '../../razor/src/formatting/formattingHandler'; -import { HtmlDocument } from './htmlDocument'; -import { HtmlForwardedRequest } from './htmlForwardedRequest'; -import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider'; -import { ShowGeneratedDocumentCommand } from './showGeneratedDocumentCommand'; -import { RazorLanguageConfiguration } from '../../razor/src/razorLanguageConfiguration'; +import { HtmlUpdateParameters } from './htmlUpdateParameters.ts'; +import { UriConverter } from '../utils/uriConverter.ts'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { HtmlDocumentManager } from './htmlDocumentManager.ts'; +import { DocumentColorHandler } from '../../razor/src/documentColor/documentColorHandler.ts'; +import { ColorPresentationHandler } from '../../razor/src/colorPresentation/colorPresentationHandler.ts'; +import { convertRangeToSerializable } from '../../razor/src/rpc/serializableRange.ts'; +import { FoldingRangeHandler } from '../../razor/src/folding/foldingRangeHandler.ts'; +import { CompletionHandler } from '../../razor/src/completion/completionHandler.ts'; +import { FormattingHandler } from '../../razor/src/formatting/formattingHandler.ts'; +import { HtmlDocument } from './htmlDocument.ts'; +import { HtmlForwardedRequest } from './htmlForwardedRequest.ts'; +import { BlazorDebugConfigurationProvider } from '../../razor/src/blazorDebug/blazorDebugConfigurationProvider.ts'; +import { ShowGeneratedDocumentCommand } from './showGeneratedDocumentCommand.ts'; +import { RazorLanguageConfiguration } from '../../razor/src/razorLanguageConfiguration.ts'; export function registerRazorEndpoints( context: vscode.ExtensionContext, diff --git a/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts b/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts index de5f8afab9..94eb4711b5 100644 --- a/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts +++ b/src/lsptoolshost/razor/showGeneratedDocumentCommand.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RazorLanguage } from '../../razor/src/razorLanguage'; -import { getUriPath } from '../../razor/src/uriPaths'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { DocumentContentsRequest } from './documentContentsRequest'; +import { RazorLanguage } from '../../razor/src/razorLanguage.ts'; +import { getUriPath } from '../../razor/src/uriPaths.ts'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { DocumentContentsRequest } from './documentContentsRequest.ts'; import { CancellationToken, RequestType, TextDocumentIdentifier } from 'vscode-languageclient'; -import { UriConverter } from '../utils/uriConverter'; -import { GeneratedDocumentKind } from './generatedDocumentKind'; +import { UriConverter } from '../utils/uriConverter.ts'; +import { GeneratedDocumentKind } from './generatedDocumentKind.ts'; export class ShowGeneratedDocumentCommand { private static requestType = new RequestType( diff --git a/src/lsptoolshost/server/languageServerEvents.ts b/src/lsptoolshost/server/languageServerEvents.ts index 3aa9756ef3..532c4f182b 100644 --- a/src/lsptoolshost/server/languageServerEvents.ts +++ b/src/lsptoolshost/server/languageServerEvents.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IDisposable } from '../../disposable'; +import { IDisposable } from '../../disposable.ts'; export enum ServerState { Stopped = 0, diff --git a/src/lsptoolshost/server/roslynLanguageClient.ts b/src/lsptoolshost/server/roslynLanguageClient.ts index d063636fea..8c23302790 100644 --- a/src/lsptoolshost/server/roslynLanguageClient.ts +++ b/src/lsptoolshost/server/roslynLanguageClient.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; import { CancellationToken, ErrorHandler, LanguageClientOptions, MessageSignature, State } from 'vscode-languageclient'; -import CompositeDisposable from '../../compositeDisposable'; -import { IDisposable } from '../../disposable'; -import { languageServerOptions } from '../../shared/options'; -import { RoslynLspErrorCodes } from './roslynProtocol'; -import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage'; -import { ITelemetryReporter } from '../../shared/telemetryReporter'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import { IDisposable } from '../../disposable.ts'; +import { languageServerOptions } from '../../shared/options.ts'; +import { RoslynLspErrorCodes } from './roslynProtocol.ts'; +import { showErrorMessageWithOptions } from '../../shared/observers/utils/showMessage.ts'; +import { ITelemetryReporter } from '../../shared/telemetryReporter.ts'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames.ts'; /** * Implementation of the base LanguageClient type that allows for additional items to be disposed of diff --git a/src/lsptoolshost/server/roslynLanguageServer.ts b/src/lsptoolshost/server/roslynLanguageServer.ts index c59110efc3..fddf29ce7b 100644 --- a/src/lsptoolshost/server/roslynLanguageServer.ts +++ b/src/lsptoolshost/server/roslynLanguageServer.ts @@ -23,37 +23,37 @@ import { Trace, } from 'vscode-languageclient'; import { Executable, TransportKind } from 'vscode-languageclient/node'; -import { PlatformInformation } from '../../shared/platform'; -import { readConfigurations } from '../options/configurationMiddleware'; -import * as RoslynProtocol from './roslynProtocol'; -import { CSharpDevKitExports } from '../../csharpDevKitExports'; -import { SolutionSnapshotId } from '../solutionSnapshot/ISolutionSnapshotProvider'; -import { ITelemetryReporterWithLevel } from '../../shared/telemetryReporter'; -import { csharpDevkitExtensionId, getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { readConfigurations } from '../options/configurationMiddleware.ts'; +import * as RoslynProtocol from './roslynProtocol.ts'; +import { CSharpDevKitExports } from '../../csharpDevKitExports.ts'; +import { SolutionSnapshotId } from '../solutionSnapshot/ISolutionSnapshotProvider.ts'; +import { ITelemetryReporterWithLevel } from '../../shared/telemetryReporter.ts'; +import { csharpDevkitExtensionId, getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; import { randomUUID } from 'crypto'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { RoslynLanguageClient } from './roslynLanguageClient'; -import { provideDiagnostics, provideWorkspaceDiagnostics } from '../diagnostics/diagnosticMiddleware'; -import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; -import { DotnetInfo } from '../../shared/utils/dotnetInfo'; -import { RoslynLanguageServerEvents, ServerState } from './languageServerEvents'; -import { registerShowToastNotification } from '../handlers/showToastNotification'; -import { registerOnAutoInsert } from '../autoInsert/onAutoInsert'; -import { commonOptions, languageServerOptions, omnisharpOptions } from '../../shared/options'; -import { VSTextDocumentIdentifier } from './roslynProtocol'; -import { IDisposable } from '../../disposable'; -import { BuildDiagnosticsService } from '../diagnostics/buildDiagnosticsService'; -import { getComponentPaths } from '../extensions/builtInComponents'; -import { OnAutoInsertFeature } from '../autoInsert/onAutoInsertFeature'; -import { ProjectContextService } from '../projectContext/projectContextService'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; -import { TelemetryEventNames } from '../../shared/telemetryEventNames'; -import { getProfilingEnvVars } from '../logging/profiling'; -import { getServerPath } from '../activate'; -import { UriConverter } from '../utils/uriConverter'; -import { ProjectContextFeature } from '../projectContext/projectContextFeature'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.ts'; +import { RoslynLanguageClient } from './roslynLanguageClient.ts'; +import { provideDiagnostics, provideWorkspaceDiagnostics } from '../diagnostics/diagnosticMiddleware.ts'; +import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration.ts'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.ts'; +import { DotnetInfo } from '../../shared/utils/dotnetInfo.ts'; +import { RoslynLanguageServerEvents, ServerState } from './languageServerEvents.ts'; +import { registerShowToastNotification } from '../handlers/showToastNotification.ts'; +import { registerOnAutoInsert } from '../autoInsert/onAutoInsert.ts'; +import { commonOptions, languageServerOptions, omnisharpOptions } from '../../shared/options.ts'; +import { VSTextDocumentIdentifier } from './roslynProtocol.ts'; +import { IDisposable } from '../../disposable.ts'; +import { BuildDiagnosticsService } from '../diagnostics/buildDiagnosticsService.ts'; +import { getComponentPaths } from '../extensions/builtInComponents.ts'; +import { OnAutoInsertFeature } from '../autoInsert/onAutoInsertFeature.ts'; +import { ProjectContextService } from '../projectContext/projectContextService.ts'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.ts'; +import { TelemetryEventNames } from '../../shared/telemetryEventNames.ts'; +import { getProfilingEnvVars } from '../logging/profiling.ts'; +import { getServerPath } from '../activate.ts'; +import { UriConverter } from '../utils/uriConverter.ts'; +import { ProjectContextFeature } from '../projectContext/projectContextFeature.ts'; // Flag indicating if C# Devkit was installed the last time we activated. // Used to determine if we need to restart the server on extension changes. diff --git a/src/lsptoolshost/server/roslynProtocol.ts b/src/lsptoolshost/server/roslynProtocol.ts index d54d74c6c6..f0b679aa1e 100644 --- a/src/lsptoolshost/server/roslynProtocol.ts +++ b/src/lsptoolshost/server/roslynProtocol.ts @@ -25,7 +25,7 @@ import { URI, WorkDoneProgressParams, } from 'vscode-languageclient'; -import { ProjectConfigurationMessage } from '../../shared/projectConfiguration'; +import { ProjectConfigurationMessage } from '../../shared/projectConfiguration.ts'; export interface VSProjectContextList { _vs_projectContexts: VSProjectContext[]; diff --git a/src/lsptoolshost/server/serverCommands.ts b/src/lsptoolshost/server/serverCommands.ts index 17cf5914a6..63b323d205 100644 --- a/src/lsptoolshost/server/serverCommands.ts +++ b/src/lsptoolshost/server/serverCommands.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { UriConverter } from '../utils/uriConverter'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { UriConverter } from '../utils/uriConverter.ts'; import * as languageClient from 'vscode-languageclient'; /** diff --git a/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts b/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts index f0da662abc..791ac804d6 100644 --- a/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts +++ b/src/lsptoolshost/serviceBroker/brokeredServicesHosting.ts @@ -11,7 +11,7 @@ import { ServiceMoniker, ServiceRegistration, } from '@microsoft/servicehub-framework'; -import Descriptors from '../solutionSnapshot/descriptors'; +import Descriptors from '../solutionSnapshot/descriptors.ts'; export class CSharpExtensionServiceBroker extends GlobalBrokeredServiceContainer { registerExternalServices(...monikers: ServiceMoniker[]) { diff --git a/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts b/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts index f346bed7ac..414d8425e2 100644 --- a/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts +++ b/src/lsptoolshost/solutionSnapshot/solutionSnapshotProvider.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { ISolutionSnapshotProvider, SolutionSnapshotId } from './ISolutionSnapshotProvider.ts'; /** * Brokered service implementation. diff --git a/src/lsptoolshost/testing/unitTesting.ts b/src/lsptoolshost/testing/unitTesting.ts index f6a396ba02..6a4cbf0773 100644 --- a/src/lsptoolshost/testing/unitTesting.ts +++ b/src/lsptoolshost/testing/unitTesting.ts @@ -7,12 +7,12 @@ import * as fs from 'fs'; import * as path from 'path'; import * as vscode from 'vscode'; import * as languageClient from 'vscode-languageclient'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from '../server/roslynProtocol'; -import { commonOptions } from '../../shared/options'; -import { UriConverter } from '../utils/uriConverter'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { RunTestsParams, RunTestsPartialResult, RunTestsRequest, TestProgress } from '../server/roslynProtocol.ts'; +import { commonOptions } from '../../shared/options.ts'; +import { UriConverter } from '../utils/uriConverter.ts'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage.ts'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; export function registerUnitTestingCommands(context: vscode.ExtensionContext, languageServer: RoslynLanguageServer) { if (getCSharpDevKit()) { diff --git a/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts b/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts index d1c5833328..ad153e7f57 100644 --- a/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts +++ b/src/lsptoolshost/workspace/miscellaneousFileNotifier.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import * as crypto from 'crypto'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { ActionOption, showWarningMessage } from '../../shared/observers/utils/showMessage'; -import { languageServerOptions } from '../../shared/options'; -import { ServerState } from '../server/languageServerEvents'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { ActionOption, showWarningMessage } from '../../shared/observers/utils/showMessage.ts'; +import { languageServerOptions } from '../../shared/options.ts'; +import { ServerState } from '../server/languageServerEvents.ts'; const SuppressMiscellaneousFilesToastsOption = 'dotnet.server.suppressMiscellaneousFilesToasts'; const NotifiedDocuments = new Set(); diff --git a/src/lsptoolshost/workspace/workspaceCommands.ts b/src/lsptoolshost/workspace/workspaceCommands.ts index 73ee7764d1..016ed71651 100644 --- a/src/lsptoolshost/workspace/workspaceCommands.ts +++ b/src/lsptoolshost/workspace/workspaceCommands.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServer } from '../server/roslynLanguageServer'; -import { createLaunchTargetForSolution } from '../../shared/launchTarget'; -import { getCSharpDevKit } from '../../utils/getCSharpDevKit'; +import { RoslynLanguageServer } from '../server/roslynLanguageServer.ts'; +import { createLaunchTargetForSolution } from '../../shared/launchTarget.ts'; +import { getCSharpDevKit } from '../../utils/getCSharpDevKit.ts'; /** * Register commands that drive the workspace. diff --git a/src/lsptoolshost/workspace/workspaceStatus.ts b/src/lsptoolshost/workspace/workspaceStatus.ts index f23c81f9d3..15e02e2644 100644 --- a/src/lsptoolshost/workspace/workspaceStatus.ts +++ b/src/lsptoolshost/workspace/workspaceStatus.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents'; -import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors'; -import { languageServerOptions } from '../../shared/options'; +import { RoslynLanguageServerEvents, ServerState } from '../server/languageServerEvents.ts'; +import { combineDocumentSelectors } from '../../shared/utils/combineDocumentSelectors.ts'; +import { languageServerOptions } from '../../shared/options.ts'; export class WorkspaceStatus { static createStatusItem(context: vscode.ExtensionContext, languageServerEvents: RoslynLanguageServerEvents) { diff --git a/src/main.ts b/src/main.ts index 9976fe7885..6ee1d6b9e9 100644 --- a/src/main.ts +++ b/src/main.ts @@ -3,33 +3,37 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as coreclrdebug from './coreclrDebug/activate'; -import * as util from './common'; +import * as coreclrdebug from './coreclrDebug/activate.ts'; +import * as util from './common.ts'; import * as vscode from 'vscode'; -import { ActivationFailure } from './shared/loggingEvents'; -import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver'; -import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver'; -import { EventStream } from './eventStream'; -import { PlatformInformation } from './shared/platform'; +import { ActivationFailure } from './shared/loggingEvents.ts'; +import { CsharpChannelObserver } from './shared/observers/csharpChannelObserver.ts'; +import { CsharpLoggerObserver } from './shared/observers/csharpLoggerObserver.ts'; +import { EventStream } from './eventStream.ts'; +import { PlatformInformation } from './shared/platform.ts'; import telemetryReporterModule from '@vscode/extension-telemetry'; -import { vscodeNetworkSettingsProvider } from './networkSettings'; -import createOptionStream from './shared/observables/createOptionStream'; -import { AbsolutePathPackage } from './packageManager/absolutePathPackage'; -import { IInstallDependencies } from './packageManager/IInstallDependencies'; -import { installRuntimeDependencies } from './installRuntimeDependencies'; -import { MigrateOptions } from './shared/migrateOptions'; -import { CSharpExtensionExports, LimitedExtensionExports, OmnisharpExtensionExports } from './csharpExtensionExports'; -import { getCSharpDevKit } from './utils/getCSharpDevKit'; -import { commonOptions, omnisharpOptions } from './shared/options'; -import { TelemetryEventNames } from './shared/telemetryEventNames'; -import { checkDotNetRuntimeExtensionVersion } from './checkDotNetRuntimeExtensionVersion'; -import { checkIsSupportedPlatform } from './checkSupportedPlatform'; -import { activateRoslyn } from './activateRoslyn'; -import { LimitedActivationStatus } from './shared/limitedActivationStatus'; - -// The package ships CommonJS with its constructor on exports.default; esbuild preserves that nested shape. -const TelemetryReporter = (telemetryReporterModule as unknown as { default: typeof telemetryReporterModule }).default; +import { vscodeNetworkSettingsProvider } from './networkSettings.ts'; +import createOptionStream from './shared/observables/createOptionStream.ts'; +import { AbsolutePathPackage } from './packageManager/absolutePathPackage.ts'; +import { IInstallDependencies } from './packageManager/IInstallDependencies.ts'; +import { installRuntimeDependencies } from './installRuntimeDependencies.ts'; +import { MigrateOptions } from './shared/migrateOptions.ts'; +import { + CSharpExtensionExports, + LimitedExtensionExports, + OmnisharpExtensionExports, +} from './csharpExtensionExports.ts'; +import { getCSharpDevKit } from './utils/getCSharpDevKit.ts'; +import { commonOptions, omnisharpOptions } from './shared/options.ts'; +import { TelemetryEventNames } from './shared/telemetryEventNames.ts'; +import { checkDotNetRuntimeExtensionVersion } from './checkDotNetRuntimeExtensionVersion.ts'; +import { checkIsSupportedPlatform } from './checkSupportedPlatform.ts'; +import { activateRoslyn } from './activateRoslyn.ts'; +import { LimitedActivationStatus } from './shared/limitedActivationStatus.ts'; + +// The package's CommonJS entry point exposes its constructor through the imported default object's default export. +const TelemetryReporter = telemetryReporterModule.default; export async function activate( context: vscode.ExtensionContext @@ -88,8 +92,8 @@ export async function activate( const installDependencies: IInstallDependencies = async (dependencies: AbsolutePathPackage[]) => { // Defer loading the download/zip stack (yauzl, proxy agents, fs-extra, etc.) until a // component actually needs to be downloaded, which normally never happens after install. - const { downloadAndInstallPackages } = await import('./packageManager/downloadAndInstallPackages'); - const { isValidDownload } = await import('./packageManager/isValidDownload'); + const { downloadAndInstallPackages } = await import('./packageManager/downloadAndInstallPackages.ts'); + const { isValidDownload } = await import('./packageManager/isValidDownload.ts'); return downloadAndInstallPackages( dependencies, networkSettingsProvider, @@ -155,7 +159,7 @@ export async function activate( } else { // Defer loading the OmniSharp implementation and its module graph until we actually // activate it, so the default Roslyn activations don't pay to compile/execute it. - const { activateOmniSharp } = await import('./activateOmniSharp'); + const { activateOmniSharp } = await import('./activateOmniSharp.ts'); exports = activateOmniSharp( context, platformInfo, diff --git a/src/networkSettings.ts b/src/networkSettings.ts index f94e0b5f23..835171d774 100644 --- a/src/networkSettings.ts +++ b/src/networkSettings.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from './vscodeAdapter'; +import { vscode } from './vscodeAdapter.ts'; export default class NetworkSettings { constructor( diff --git a/src/omnisharp/dotnetResolver.ts b/src/omnisharp/dotnetResolver.ts index 741f42254e..c8c15a6197 100644 --- a/src/omnisharp/dotnetResolver.ts +++ b/src/omnisharp/dotnetResolver.ts @@ -7,10 +7,10 @@ import { exec } from 'child_process'; import * as path from 'path'; import * as semver from 'semver'; import { promisify } from 'util'; -import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { PlatformInformation } from '../shared/platform'; -import { omnisharpOptions } from '../shared/options'; +import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation.ts'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.ts'; +import { PlatformInformation } from '../shared/platform.ts'; +import { omnisharpOptions } from '../shared/options.ts'; export class DotnetResolver implements IHostExecutableResolver { private readonly minimumDotnetVersion = '6.0.100'; diff --git a/src/omnisharp/engines/IEngine.ts b/src/omnisharp/engines/IEngine.ts index 48affd1778..c300ce48f4 100644 --- a/src/omnisharp/engines/IEngine.ts +++ b/src/omnisharp/engines/IEngine.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { CancellationToken } from '../../vscodeAdapter'; -import { LaunchTarget } from '../../shared/launchTarget'; -import Disposable from '../../disposable'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { Advisor } from '../features/diagnosticsProvider'; -import TestManager from '../features/dotnetTest'; -import { EventStream } from '../../eventStream'; +import { CancellationToken } from '../../vscodeAdapter.ts'; +import { LaunchTarget } from '../../shared/launchTarget.ts'; +import Disposable from '../../disposable.ts'; +import { OmniSharpServer } from '../server.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { Advisor } from '../features/diagnosticsProvider.ts'; +import TestManager from '../features/dotnetTest.ts'; +import { EventStream } from '../../eventStream.ts'; export interface IEngine { start(cwd: string, args: string[], launchTarget: LaunchTarget, launchPath: string): Promise; diff --git a/src/omnisharp/engines/lspEngine.ts b/src/omnisharp/engines/lspEngine.ts index d62dd3b953..ad06c865d7 100644 --- a/src/omnisharp/engines/lspEngine.ts +++ b/src/omnisharp/engines/lspEngine.ts @@ -3,22 +3,22 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; -import { CancellationToken } from '../../vscodeAdapter'; -import { configure } from '../launcher'; -import { LaunchTarget } from '../../shared/launchTarget'; +import * as protocol from '../protocol.ts'; +import { CancellationToken } from '../../vscodeAdapter.ts'; +import { configure } from '../launcher.ts'; +import { LaunchTarget } from '../../shared/launchTarget.ts'; import { EventEmitter } from 'events'; import { setTimeout } from 'timers'; -import * as ObservableEvents from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import CompositeDisposable from '../../compositeDisposable'; -import Disposable from '../../disposable'; +import * as ObservableEvents from '../omnisharpLoggingEvents.ts'; +import { EventStream } from '../../eventStream.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import Disposable from '../../disposable.ts'; import { ExtensionContext, CancellationTokenSource, LogOutputChannel, Location, CodeLens, Uri } from 'vscode'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { Events, OmniSharpServer } from '../server'; -import { IEngine } from './IEngine'; -import { PlatformInformation } from '../../shared/platform'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { Events, OmniSharpServer } from '../server.ts'; +import { IEngine } from './IEngine.ts'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.ts'; import { CallHierarchyPrepareRequest, Command, @@ -38,8 +38,8 @@ import { TypeHierarchyPrepareRequest, } from 'vscode-languageclient'; import { LanguageClient, ServerOptions } from 'vscode-languageclient/node'; -import { Advisor } from '../features/diagnosticsProvider'; -import dotnetTest from '../features/dotnetTest'; +import { Advisor } from '../features/diagnosticsProvider.ts'; +import dotnetTest from '../features/dotnetTest.ts'; export class LspEngine implements IEngine { client: LanguageClient | undefined; diff --git a/src/omnisharp/engines/stdioEngine.ts b/src/omnisharp/engines/stdioEngine.ts index 5fa9640d8e..63718ac9a0 100644 --- a/src/omnisharp/engines/stdioEngine.ts +++ b/src/omnisharp/engines/stdioEngine.ts @@ -3,52 +3,52 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; -import * as utils from '../../common'; -import { CancellationToken } from '../../vscodeAdapter'; +import * as protocol from '../protocol.ts'; +import * as utils from '../../common.ts'; +import { CancellationToken } from '../../vscodeAdapter.ts'; import { ChildProcess, exec } from 'child_process'; -import { LaunchTarget } from '../../shared/launchTarget'; +import { LaunchTarget } from '../../shared/launchTarget.ts'; import { ReadLine, createInterface } from 'readline'; -import { Request, RequestQueueCollection } from '../requestQueue'; +import { Request, RequestQueueCollection } from '../requestQueue.ts'; import { EventEmitter } from 'events'; -import { omnisharpOptions } from '../../shared/options'; -import { PlatformInformation } from '../../shared/platform'; -import { launchOmniSharp } from '../launcher'; +import { omnisharpOptions } from '../../shared/options.ts'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { launchOmniSharp } from '../launcher.ts'; import { setTimeout } from 'timers'; -import * as ObservableEvents from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import CompositeDisposable from '../../compositeDisposable'; -import Disposable from '../../disposable'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { removeBOMFromBuffer, removeBOMFromString } from '../../utils/removeBom'; -import { IEngine } from './IEngine'; -import { Events, OmniSharpServer } from '../server'; -import DefinitionMetadataDocumentProvider from '../features/definitionMetadataDocumentProvider'; -import SourceGeneratedDocumentProvider from '../features/sourceGeneratedDocumentProvider'; +import * as ObservableEvents from '../omnisharpLoggingEvents.ts'; +import { EventStream } from '../../eventStream.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import Disposable from '../../disposable.ts'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.ts'; +import { removeBOMFromBuffer, removeBOMFromString } from '../../utils/removeBom.ts'; +import { IEngine } from './IEngine.ts'; +import { Events, OmniSharpServer } from '../server.ts'; +import DefinitionMetadataDocumentProvider from '../features/definitionMetadataDocumentProvider.ts'; +import SourceGeneratedDocumentProvider from '../features/sourceGeneratedDocumentProvider.ts'; import * as vscode from 'vscode'; -import OmniSharpCodeLensProvider from '../features/codeLensProvider'; -import OmniSharpDocumentHighlightProvider from '../features/documentHighlightProvider'; -import OmniSharpDocumentSymbolProvider from '../features/documentSymbolProvider'; -import OmniSharpHoverProvider from '../features/hoverProvider'; -import OmniSharpRenameProvider from '../features/renameProvider'; -import OmniSharpFormatProvider from '../features/formattingEditProvider'; -import OmniSharpWorkspaceSymbolProvider from '../features/workspaceSymbolProvider'; -import OmniSharpSignatureHelpProvider from '../features/signatureHelpProvider'; -import { OmniSharpFixAllProvider } from '../features/fixAllProvider'; -import OmniSharpCompletionProvider, { CompletionAfterInsertCommand } from '../features/completionProvider'; -import OmniSharpReferenceProvider from '../features/referenceProvider'; -import OmniSharpImplementationProvider from '../features/implementationProvider'; -import OmniSharpSemanticTokensProvider from '../features/semanticTokensProvider'; -import OmniSharpInlayHintProvider from '../features/inlayHintProvider'; -import fileOpenClose from '../features/fileOpenCloseProvider'; -import trackVirtualDocuments from '../features/virtualDocumentTracker'; -import OmniSharpCodeActionProvider from '../features/codeActionProvider'; -import forwardChanges from '../features/changeForwarding'; -import OmniSharpDefinitionProvider from '../features/definitionProvider'; -import reportDiagnostics, { Advisor } from '../features/diagnosticsProvider'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import TestManager from '../features/dotnetTest'; -import { OmniSharpStructureProvider } from '../features/structureProvider'; +import OmniSharpCodeLensProvider from '../features/codeLensProvider.ts'; +import OmniSharpDocumentHighlightProvider from '../features/documentHighlightProvider.ts'; +import OmniSharpDocumentSymbolProvider from '../features/documentSymbolProvider.ts'; +import OmniSharpHoverProvider from '../features/hoverProvider.ts'; +import OmniSharpRenameProvider from '../features/renameProvider.ts'; +import OmniSharpFormatProvider from '../features/formattingEditProvider.ts'; +import OmniSharpWorkspaceSymbolProvider from '../features/workspaceSymbolProvider.ts'; +import OmniSharpSignatureHelpProvider from '../features/signatureHelpProvider.ts'; +import { OmniSharpFixAllProvider } from '../features/fixAllProvider.ts'; +import OmniSharpCompletionProvider, { CompletionAfterInsertCommand } from '../features/completionProvider.ts'; +import OmniSharpReferenceProvider from '../features/referenceProvider.ts'; +import OmniSharpImplementationProvider from '../features/implementationProvider.ts'; +import OmniSharpSemanticTokensProvider from '../features/semanticTokensProvider.ts'; +import OmniSharpInlayHintProvider from '../features/inlayHintProvider.ts'; +import fileOpenClose from '../features/fileOpenCloseProvider.ts'; +import trackVirtualDocuments from '../features/virtualDocumentTracker.ts'; +import OmniSharpCodeActionProvider from '../features/codeActionProvider.ts'; +import forwardChanges from '../features/changeForwarding.ts'; +import OmniSharpDefinitionProvider from '../features/definitionProvider.ts'; +import reportDiagnostics, { Advisor } from '../features/diagnosticsProvider.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import TestManager from '../features/dotnetTest.ts'; +import { OmniSharpStructureProvider } from '../features/structureProvider.ts'; export class StdioEngine implements IEngine { private static _nextId = 1; diff --git a/src/omnisharp/features/abstractProvider.ts b/src/omnisharp/features/abstractProvider.ts index 02ae33c313..6f1a7df1f6 100644 --- a/src/omnisharp/features/abstractProvider.ts +++ b/src/omnisharp/features/abstractProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server'; -import CompositeDisposable from '../../compositeDisposable'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { OmniSharpServer } from '../server.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; export default abstract class AbstractProvider { protected _server: OmniSharpServer; diff --git a/src/omnisharp/features/changeForwarding.ts b/src/omnisharp/features/changeForwarding.ts index b07394c43b..85bfe3dfbc 100644 --- a/src/omnisharp/features/changeForwarding.ts +++ b/src/omnisharp/features/changeForwarding.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { Uri, workspace } from 'vscode'; -import { OmniSharpServer } from '../server'; -import * as serverUtils from '../utils'; -import { FileChangeType } from '../protocol'; -import { IDisposable } from '../../disposable'; -import CompositeDisposable from '../../compositeDisposable'; +import { OmniSharpServer } from '../server.ts'; +import * as serverUtils from '../utils.ts'; +import { FileChangeType } from '../protocol.ts'; +import { IDisposable } from '../../disposable.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; function forwardDocumentChanges(server: OmniSharpServer): IDisposable { return workspace.onDidChangeTextDocument((event) => { diff --git a/src/omnisharp/features/codeActionProvider.ts b/src/omnisharp/features/codeActionProvider.ts index 736457a937..fa14632369 100644 --- a/src/omnisharp/features/codeActionProvider.ts +++ b/src/omnisharp/features/codeActionProvider.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { OmniSharpServer } from '../server'; -import AbstractProvider from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import CompositeDisposable from '../../compositeDisposable'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { buildEditForResponse } from '../fileOperationsResponseEditBuilder'; -import { omnisharpOptions } from '../../shared/options'; +import { OmniSharpServer } from '../server.ts'; +import AbstractProvider from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { buildEditForResponse } from '../fileOperationsResponseEditBuilder.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; export default class OmniSharpCodeActionProvider extends AbstractProvider diff --git a/src/omnisharp/features/codeLensProvider.ts b/src/omnisharp/features/codeLensProvider.ts index be46b9bf63..9d7900623d 100644 --- a/src/omnisharp/features/codeLensProvider.ts +++ b/src/omnisharp/features/codeLensProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; import * as vscode from 'vscode'; -import { toLocation } from '../typeConversion'; -import AbstractProvider from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import { omnisharpOptions } from '../../shared/options'; -import TestManager from './dotnetTest'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; +import { toLocation } from '../typeConversion.ts'; +import AbstractProvider from './abstractProvider.ts'; +import { OmniSharpServer } from '../server.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; +import TestManager from './dotnetTest.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; diff --git a/src/omnisharp/features/commands.ts b/src/omnisharp/features/commands.ts index 8f26d58031..6f610dfcf3 100644 --- a/src/omnisharp/features/commands.ts +++ b/src/omnisharp/features/commands.ts @@ -3,30 +3,30 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server'; -import * as serverUtils from '../utils'; -import { findLaunchTargets } from '../launcher'; -import { LaunchTarget } from '../../shared/launchTarget'; +import { OmniSharpServer } from '../server.ts'; +import * as serverUtils from '../utils.ts'; +import { findLaunchTargets } from '../launcher.ts'; +import { LaunchTarget } from '../../shared/launchTarget.ts'; import * as cp from 'child_process'; import * as fs from 'fs'; import * as path from 'path'; -import * as protocol from '../protocol'; +import * as protocol from '../protocol.ts'; import * as vscode from 'vscode'; -import { generateAssets } from '../../shared/assets'; +import { generateAssets } from '../../shared/assets.ts'; import { ShowOmniSharpChannel, CommandDotNetRestoreStart, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed, -} from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import { PlatformInformation } from '../../shared/platform'; -import CompositeDisposable from '../../compositeDisposable'; -import reportIssue from '../../shared/reportIssue'; -import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; -import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider'; +} from '../omnisharpLoggingEvents.ts'; +import { EventStream } from '../../eventStream.ts'; +import { PlatformInformation } from '../../shared/platform.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import reportIssue from '../../shared/reportIssue.ts'; +import { IHostExecutableResolver } from '../../shared/constants/IHostExecutableResolver.ts'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.ts'; +import { IWorkspaceDebugInformationProvider } from '../../shared/IWorkspaceDebugInformationProvider.ts'; export default function registerCommands( context: vscode.ExtensionContext, diff --git a/src/omnisharp/features/completionProvider.ts b/src/omnisharp/features/completionProvider.ts index 14ea102e35..d3e3b8e6f6 100644 --- a/src/omnisharp/features/completionProvider.ts +++ b/src/omnisharp/features/completionProvider.ts @@ -20,18 +20,18 @@ import { workspace, CompletionItemLabel, } from 'vscode'; -import AbstractProvider from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import AbstractProvider from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; import { CompletionTriggerKind as LspCompletionTriggerKind, InsertTextFormat, CancellationToken, } from 'vscode-languageclient'; -import { createRequest } from '../typeConversion'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { OmniSharpServer } from '../server'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +import { createRequest } from '../typeConversion.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { OmniSharpServer } from '../server.ts'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.ts'; export const CompletionAfterInsertCommand = 'csharp.completion.afterInsert'; diff --git a/src/omnisharp/features/definitionMetadataDocumentProvider.ts b/src/omnisharp/features/definitionMetadataDocumentProvider.ts index 4c1bc653c8..a795df57ec 100644 --- a/src/omnisharp/features/definitionMetadataDocumentProvider.ts +++ b/src/omnisharp/features/definitionMetadataDocumentProvider.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { TextDocument, TextDocumentContentProvider, Uri, workspace } from 'vscode'; -import { MetadataResponse } from '../protocol'; -import { IDisposable } from '../../disposable'; +import { MetadataResponse } from '../protocol.ts'; +import { IDisposable } from '../../disposable.ts'; export default class DefinitionMetadataDocumentProvider implements TextDocumentContentProvider, IDisposable { readonly scheme = 'omnisharp-metadata'; diff --git a/src/omnisharp/features/definitionProvider.ts b/src/omnisharp/features/definitionProvider.ts index a57ceb5921..84102cd5e0 100644 --- a/src/omnisharp/features/definitionProvider.ts +++ b/src/omnisharp/features/definitionProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils'; +import * as serverUtils from '../utils.ts'; import { CancellationToken, TypeDefinitionProvider, @@ -19,13 +19,13 @@ import { MetadataRequest, MetadataSource, V2, -} from '../protocol'; -import { createRequest, toRange3, toVscodeLocation } from '../typeConversion'; -import AbstractSupport from './abstractProvider'; -import DefinitionMetadataOrSourceGeneratedDocumentProvider from './definitionMetadataDocumentProvider'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; +} from '../protocol.ts'; +import { createRequest, toRange3, toVscodeLocation } from '../typeConversion.ts'; +import AbstractSupport from './abstractProvider.ts'; +import DefinitionMetadataOrSourceGeneratedDocumentProvider from './definitionMetadataDocumentProvider.ts'; +import { OmniSharpServer } from '../server.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.ts'; export default class OmniSharpDefinitionProvider extends AbstractSupport diff --git a/src/omnisharp/features/diagnosticsProvider.ts b/src/omnisharp/features/diagnosticsProvider.ts index 2d31cbb0d8..ff494805be 100644 --- a/src/omnisharp/features/diagnosticsProvider.ts +++ b/src/omnisharp/features/diagnosticsProvider.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from '../server'; -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { toRange } from '../typeConversion'; +import { OmniSharpServer } from '../server.ts'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { toRange } from '../typeConversion.ts'; import * as vscode from 'vscode'; -import CompositeDisposable from '../../compositeDisposable'; -import { IDisposable } from '../../disposable'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; -import { TextDocument } from '../../vscodeAdapter'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import { IDisposable } from '../../disposable.ts'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.ts'; +import { TextDocument } from '../../vscodeAdapter.ts'; import { Subject, Subscription } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import { BackgroundDiagnosticStatus } from '../protocol'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { omnisharpOptions } from '../../shared/options'; +import { BackgroundDiagnosticStatus } from '../protocol.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; export class Advisor { private _disposable: CompositeDisposable; diff --git a/src/omnisharp/features/documentHighlightProvider.ts b/src/omnisharp/features/documentHighlightProvider.ts index f93d1fcf8f..25446357fb 100644 --- a/src/omnisharp/features/documentHighlightProvider.ts +++ b/src/omnisharp/features/documentHighlightProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toRange } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest, toRange } from '../typeConversion.ts'; import { DocumentHighlightProvider, DocumentHighlight, diff --git a/src/omnisharp/features/documentSymbolProvider.ts b/src/omnisharp/features/documentSymbolProvider.ts index 88bacf3b9f..d16a25a747 100644 --- a/src/omnisharp/features/documentSymbolProvider.ts +++ b/src/omnisharp/features/documentSymbolProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; import * as vscode from 'vscode'; import Structure = protocol.V2.Structure; import SymbolKinds = protocol.V2.SymbolKinds; import SymbolRangeNames = protocol.V2.SymbolRangeNames; -import { toRange3 } from '../typeConversion'; +import { toRange3 } from '../typeConversion.ts'; export default class OmniSharpDocumentSymbolProvider extends AbstractSupport implements vscode.DocumentSymbolProvider { async provideDocumentSymbols( diff --git a/src/omnisharp/features/documentation.ts b/src/omnisharp/features/documentation.ts index 9295367945..feb04c23c1 100644 --- a/src/omnisharp/features/documentation.ts +++ b/src/omnisharp/features/documentation.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from '../protocol'; +import * as protocol from '../protocol.ts'; const summaryStartTag = //i; const summaryEndTag = /<\/summary>/i; diff --git a/src/omnisharp/features/dotnetTest.ts b/src/omnisharp/features/dotnetTest.ts index e333f9fddb..b5a8c7ddc8 100644 --- a/src/omnisharp/features/dotnetTest.ts +++ b/src/omnisharp/features/dotnetTest.ts @@ -6,13 +6,13 @@ import * as net from 'net'; import * as os from 'os'; import * as path from 'path'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import * as utils from '../../common'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import * as utils from '../../common.ts'; import * as vscode from 'vscode'; -import AbstractProvider from './abstractProvider'; -import * as DebuggerEventsProtocol from '../../coreclrDebug/debuggerEventsProtocol'; -import { OmniSharpServer } from '../server'; +import AbstractProvider from './abstractProvider.ts'; +import * as DebuggerEventsProtocol from '../../coreclrDebug/debuggerEventsProtocol.ts'; +import { OmniSharpServer } from '../server.ts'; import { TestExecutionCountReport, ReportDotNetTestResults, @@ -28,13 +28,13 @@ import { DotNetTestDebugStartFailure, DotNetTestRunInContextStart, DotNetTestDebugInContextStart, -} from '../omnisharpLoggingEvents'; -import { EventStream } from '../../eventStream'; -import LaunchConfiguration from './launchConfiguration'; -import Disposable from '../../disposable'; -import CompositeDisposable from '../../compositeDisposable'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { commonOptions } from '../../shared/options'; +} from '../omnisharpLoggingEvents.ts'; +import { EventStream } from '../../eventStream.ts'; +import LaunchConfiguration from './launchConfiguration.ts'; +import Disposable from '../../disposable.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { commonOptions } from '../../shared/options.ts'; const TelemetryReportingDelay = 2 * 60 * 1000; // two minutes diff --git a/src/omnisharp/features/fileOpenCloseProvider.ts b/src/omnisharp/features/fileOpenCloseProvider.ts index 4600387020..d26f5802d8 100644 --- a/src/omnisharp/features/fileOpenCloseProvider.ts +++ b/src/omnisharp/features/fileOpenCloseProvider.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IDisposable } from '../../disposable'; -import { OmniSharpServer } from '../server'; +import { IDisposable } from '../../disposable.ts'; +import { OmniSharpServer } from '../server.ts'; import * as vscode from 'vscode'; -import CompositeDisposable from '../../compositeDisposable'; -import * as serverUtils from '../utils'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import * as serverUtils from '../utils.ts'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.ts'; export default function fileOpenClose(server: OmniSharpServer): IDisposable { return new FileOpenCloseProvider(server); diff --git a/src/omnisharp/features/fixAll.ts b/src/omnisharp/features/fixAll.ts index c932f814cc..920cf9ca7a 100644 --- a/src/omnisharp/features/fixAll.ts +++ b/src/omnisharp/features/fixAll.ts @@ -3,6 +3,6 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractProvider from './abstractProvider'; +import AbstractProvider from './abstractProvider.ts'; export class FixAll extends AbstractProvider {} diff --git a/src/omnisharp/features/fixAllProvider.ts b/src/omnisharp/features/fixAllProvider.ts index 20d50d74ff..f9b6f3b1ee 100644 --- a/src/omnisharp/features/fixAllProvider.ts +++ b/src/omnisharp/features/fixAllProvider.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as serverUtils from '../utils'; -import * as protocol from '../protocol'; -import { OmniSharpServer } from '../server'; -import { FixAllScope, FixAllItem } from '../protocol'; -import CompositeDisposable from '../../compositeDisposable'; -import AbstractProvider from './abstractProvider'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { buildEditForResponse } from '../fileOperationsResponseEditBuilder'; -import { showWarningMessage } from '../../shared/observers/utils/showMessage'; +import * as serverUtils from '../utils.ts'; +import * as protocol from '../protocol.ts'; +import { OmniSharpServer } from '../server.ts'; +import { FixAllScope, FixAllItem } from '../protocol.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import AbstractProvider from './abstractProvider.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { buildEditForResponse } from '../fileOperationsResponseEditBuilder.ts'; +import { showWarningMessage } from '../../shared/observers/utils/showMessage.ts'; import { CancellationToken } from 'vscode-languageclient'; export class OmniSharpFixAllProvider extends AbstractProvider implements vscode.CodeActionProvider { diff --git a/src/omnisharp/features/formattingEditProvider.ts b/src/omnisharp/features/formattingEditProvider.ts index fc1145c025..cb9deb9e1d 100644 --- a/src/omnisharp/features/formattingEditProvider.ts +++ b/src/omnisharp/features/formattingEditProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; import { DocumentRangeFormattingEditProvider, FormattingOptions, diff --git a/src/omnisharp/features/hoverProvider.ts b/src/omnisharp/features/hoverProvider.ts index 6c7f76ebeb..27b4512fcd 100644 --- a/src/omnisharp/features/hoverProvider.ts +++ b/src/omnisharp/features/hoverProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest } from '../typeConversion.ts'; import { HoverProvider, Hover, TextDocument, CancellationToken, Position, MarkdownString } from 'vscode'; export default class OmniSharpHoverProvider extends AbstractSupport implements HoverProvider { diff --git a/src/omnisharp/features/implementationProvider.ts b/src/omnisharp/features/implementationProvider.ts index 1b6db10bc0..d89b2ec5a3 100644 --- a/src/omnisharp/features/implementationProvider.ts +++ b/src/omnisharp/features/implementationProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import { FindImplementationsRequest } from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toLocation } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import { FindImplementationsRequest } from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest, toLocation } from '../typeConversion.ts'; import { TextDocument, Position, CancellationToken, ImplementationProvider, Definition } from 'vscode'; export default class OmniSharpImplementationProvider extends AbstractSupport implements ImplementationProvider { diff --git a/src/omnisharp/features/inlayHintProvider.ts b/src/omnisharp/features/inlayHintProvider.ts index d5f32a3f00..fc3ef4290f 100644 --- a/src/omnisharp/features/inlayHintProvider.ts +++ b/src/omnisharp/features/inlayHintProvider.ts @@ -2,20 +2,20 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils'; +import * as serverUtils from '../utils.ts'; import * as vscode from 'vscode'; -import AbstractProvider from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import CompositeDisposable from '../../compositeDisposable'; +import AbstractProvider from './abstractProvider.ts'; +import { OmniSharpServer } from '../server.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; import { InlayHint, InlayHintRequest, InlayHintResolve as InlayHintResolveRequest, LinePositionSpanTextChange, -} from '../protocol'; -import { fromVSCodeRange, toVSCodePosition, toVSCodeTextEdit } from '../typeConversion'; -import { isVirtualCSharpDocument } from './virtualDocumentTracker'; +} from '../protocol.ts'; +import { fromVSCodeRange, toVSCodePosition, toVSCodeTextEdit } from '../typeConversion.ts'; +import { isVirtualCSharpDocument } from './virtualDocumentTracker.ts'; export default class OmniSharpInlayHintProvider extends AbstractProvider implements vscode.InlayHintsProvider { private readonly _onDidChangeInlayHints = new vscode.EventEmitter(); diff --git a/src/omnisharp/features/referenceProvider.ts b/src/omnisharp/features/referenceProvider.ts index 275ccbdc64..fe64c64327 100644 --- a/src/omnisharp/features/referenceProvider.ts +++ b/src/omnisharp/features/referenceProvider.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toLocation, toLocationFromUri } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest, toLocation, toLocationFromUri } from '../typeConversion.ts'; import { ReferenceProvider, Location, TextDocument, CancellationToken, Position } from 'vscode'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; +import { OmniSharpServer } from '../server.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.ts'; export default class OmniSharpReferenceProvider extends AbstractSupport implements ReferenceProvider { public constructor( diff --git a/src/omnisharp/features/renameProvider.ts b/src/omnisharp/features/renameProvider.ts index d0a0a347ba..7c14cc135e 100644 --- a/src/omnisharp/features/renameProvider.ts +++ b/src/omnisharp/features/renameProvider.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest } from '../typeConversion.ts'; import { RenameProvider, WorkspaceEdit, TextDocument, Uri, CancellationToken, Position, Range } from 'vscode'; export default class OmniSharpRenameProvider extends AbstractSupport implements RenameProvider { diff --git a/src/omnisharp/features/semanticTokensProvider.ts b/src/omnisharp/features/semanticTokensProvider.ts index d90749eca2..e5fbdab4db 100644 --- a/src/omnisharp/features/semanticTokensProvider.ts +++ b/src/omnisharp/features/semanticTokensProvider.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import { SemanticTokenTypes } from 'vscode-languageclient'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { createRequest, toRange2 } from '../typeConversion'; -import AbstractProvider from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import { omnisharpOptions } from '../../shared/options'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest, toRange2 } from '../typeConversion.ts'; +import AbstractProvider from './abstractProvider.ts'; +import { OmniSharpServer } from '../server.ts'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; // The default TokenTypes defined by VS Code https://github.com/microsoft/vscode/blob/master/src/vs/platform/theme/common/tokenClassificationRegistry.ts#L393 enum DefaultTokenType { diff --git a/src/omnisharp/features/signatureHelpProvider.ts b/src/omnisharp/features/signatureHelpProvider.ts index 44791bf5a3..e081474cfc 100644 --- a/src/omnisharp/features/signatureHelpProvider.ts +++ b/src/omnisharp/features/signatureHelpProvider.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import * as serverUtils from '../utils'; -import { createRequest } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import * as serverUtils from '../utils.ts'; +import { createRequest } from '../typeConversion.ts'; import { SignatureHelpProvider, SignatureHelp, @@ -16,7 +16,7 @@ import { Position, } from 'vscode'; import { MarkdownString } from 'vscode'; -import { SignatureHelpParameter } from '../protocol'; +import { SignatureHelpParameter } from '../protocol.ts'; export default class OmniSharpSignatureHelpProvider extends AbstractSupport implements SignatureHelpProvider { public async provideSignatureHelp( diff --git a/src/omnisharp/features/sourceGeneratedDocumentProvider.ts b/src/omnisharp/features/sourceGeneratedDocumentProvider.ts index e84da6d38d..687b861542 100644 --- a/src/omnisharp/features/sourceGeneratedDocumentProvider.ts +++ b/src/omnisharp/features/sourceGeneratedDocumentProvider.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as serverUtils from '../utils'; +import * as serverUtils from '../utils.ts'; import { CancellationToken, Event, @@ -15,9 +15,9 @@ import { window, workspace, } from 'vscode'; -import { IDisposable } from '../../disposable'; -import { SourceGeneratedFileInfo, SourceGeneratedFileResponse, UpdateType } from '../protocol'; -import { OmniSharpServer } from '../server'; +import { IDisposable } from '../../disposable.ts'; +import { SourceGeneratedFileInfo, SourceGeneratedFileResponse, UpdateType } from '../protocol.ts'; +import { OmniSharpServer } from '../server.ts'; export default class SourceGeneratedDocumentProvider implements TextDocumentContentProvider, IDisposable { readonly scheme = 'omnisharp-source-generated'; diff --git a/src/omnisharp/features/structureProvider.ts b/src/omnisharp/features/structureProvider.ts index 437e50eeb3..cf23760128 100644 --- a/src/omnisharp/features/structureProvider.ts +++ b/src/omnisharp/features/structureProvider.ts @@ -11,9 +11,9 @@ import { FoldingRange, FoldingRangeKind, } from 'vscode'; -import AbstractSupport from './abstractProvider'; -import { blockStructure } from '../utils'; -import { V2 } from '../protocol'; +import AbstractSupport from './abstractProvider.ts'; +import { blockStructure } from '../utils.ts'; +import { V2 } from '../protocol.ts'; export class OmniSharpStructureProvider extends AbstractSupport implements FoldingRangeProvider { async provideFoldingRanges( diff --git a/src/omnisharp/features/virtualDocumentTracker.ts b/src/omnisharp/features/virtualDocumentTracker.ts index 1fd67f63a9..2b1443e81a 100644 --- a/src/omnisharp/features/virtualDocumentTracker.ts +++ b/src/omnisharp/features/virtualDocumentTracker.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { workspace, TextDocument, Uri } from 'vscode'; -import { OmniSharpServer } from '../server'; -import * as serverUtils from '../utils'; -import { FileChangeType } from '../protocol'; -import { IDisposable } from '../../disposable'; -import CompositeDisposable from '../../compositeDisposable'; -import { EventStream } from '../../eventStream'; -import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents'; +import { OmniSharpServer } from '../server.ts'; +import * as serverUtils from '../utils.ts'; +import { FileChangeType } from '../protocol.ts'; +import { IDisposable } from '../../disposable.ts'; +import CompositeDisposable from '../../compositeDisposable.ts'; +import { EventStream } from '../../eventStream.ts'; +import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents.ts'; async function trackCurrentVirtualDocuments(server: OmniSharpServer, eventStream: EventStream) { for (let i = 0; i < workspace.textDocuments.length; i++) { diff --git a/src/omnisharp/features/workspaceSymbolProvider.ts b/src/omnisharp/features/workspaceSymbolProvider.ts index 61d6b50b96..36facb3c68 100644 --- a/src/omnisharp/features/workspaceSymbolProvider.ts +++ b/src/omnisharp/features/workspaceSymbolProvider.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import AbstractSupport from './abstractProvider'; -import { OmniSharpServer } from '../server'; -import * as protocol from '../protocol'; -import * as serverUtils from '../utils'; -import { toRange } from '../typeConversion'; +import AbstractSupport from './abstractProvider.ts'; +import { OmniSharpServer } from '../server.ts'; +import * as protocol from '../protocol.ts'; +import * as serverUtils from '../utils.ts'; +import { toRange } from '../typeConversion.ts'; import { CancellationToken, Uri, WorkspaceSymbolProvider, SymbolInformation, SymbolKind, Location } from 'vscode'; -import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature'; -import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider'; -import { omnisharpOptions } from '../../shared/options'; +import { LanguageMiddlewareFeature } from '../languageMiddlewareFeature.ts'; +import SourceGeneratedDocumentProvider from './sourceGeneratedDocumentProvider.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; export default class OmniSharpWorkspaceSymbolProvider extends AbstractSupport implements WorkspaceSymbolProvider { constructor( diff --git a/src/omnisharp/fileOperationsResponseEditBuilder.ts b/src/omnisharp/fileOperationsResponseEditBuilder.ts index cb652e80a7..aff691509c 100644 --- a/src/omnisharp/fileOperationsResponseEditBuilder.ts +++ b/src/omnisharp/fileOperationsResponseEditBuilder.ts @@ -5,9 +5,9 @@ import * as vscode from 'vscode'; import { Uri } from 'vscode'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; -import { FileModificationType, FileOperationResponse, ModifiedFileResponse, RenamedFileResponse } from './protocol'; -import { toRange2 } from './typeConversion'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.ts'; +import { FileModificationType, FileOperationResponse, ModifiedFileResponse, RenamedFileResponse } from './protocol.ts'; +import { toRange2 } from './typeConversion.ts'; export async function buildEditForResponse( changes: FileOperationResponse[], diff --git a/src/omnisharp/languageMiddlewareFeature.ts b/src/omnisharp/languageMiddlewareFeature.ts index cfaba25aee..2480487fe4 100644 --- a/src/omnisharp/languageMiddlewareFeature.ts +++ b/src/omnisharp/languageMiddlewareFeature.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IDisposable } from '../disposable'; +import { IDisposable } from '../disposable.ts'; export interface LanguageMiddleware extends RemapApi { language: string; diff --git a/src/omnisharp/launcher.ts b/src/omnisharp/launcher.ts index 3356eccd78..7358820d8b 100644 --- a/src/omnisharp/launcher.ts +++ b/src/omnisharp/launcher.ts @@ -6,12 +6,12 @@ import { spawn } from 'child_process'; import { ChildProcessWithoutNullStreams } from 'child_process'; -import { PlatformInformation } from '../shared/platform'; +import { PlatformInformation } from '../shared/platform.ts'; import * as path from 'path'; import * as vscode from 'vscode'; -import { commonOptions, omnisharpOptions } from '../shared/options'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget'; +import { commonOptions, omnisharpOptions } from '../shared/options.ts'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.ts'; +import { LaunchTarget, LaunchTargetKind, createLaunchTargetForSolution } from '../shared/launchTarget.ts'; export const vslsTarget: LaunchTarget = { label: 'VSLS', diff --git a/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts b/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts index 36b69a2c4e..ffc36d5a3b 100644 --- a/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts +++ b/src/omnisharp/observers/backgroundWorkStatusBarObserver.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { OmnisharpBackgroundDiagnosticStatus } from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; -import { BackgroundDiagnosticStatus } from '../protocol'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; +import { OmnisharpBackgroundDiagnosticStatus } from '../omnisharpLoggingEvents.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { BackgroundDiagnosticStatus } from '../protocol.ts'; export class BackgroundWorkStatusBarObserver extends BaseStatusBarItemObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/baseStatusBarItemObserver.ts b/src/omnisharp/observers/baseStatusBarItemObserver.ts index 03594675f3..88da52c11a 100644 --- a/src/omnisharp/observers/baseStatusBarItemObserver.ts +++ b/src/omnisharp/observers/baseStatusBarItemObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent } from '../../shared/loggingEvents'; -import { StatusBarItem } from '../../vscodeAdapter'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; +import { StatusBarItem } from '../../vscodeAdapter.ts'; export abstract class BaseStatusBarItemObserver { constructor(private statusBarItem: StatusBarItem) {} diff --git a/src/omnisharp/observers/csharpLoggerObserver.ts b/src/omnisharp/observers/csharpLoggerObserver.ts index c5ccbe252d..d546db6606 100644 --- a/src/omnisharp/observers/csharpLoggerObserver.ts +++ b/src/omnisharp/observers/csharpLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; +import { DocumentSynchronizationFailure } from '../omnisharpLoggingEvents.ts'; export class CSharpLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetChannelObserver.ts b/src/omnisharp/observers/dotnetChannelObserver.ts index ec05783aef..2535762ae9 100644 --- a/src/omnisharp/observers/dotnetChannelObserver.ts +++ b/src/omnisharp/observers/dotnetChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export class DotNetChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetLoggerObserver.ts b/src/omnisharp/observers/dotnetLoggerObserver.ts index 2fa1ad80e4..3d9ad5425e 100644 --- a/src/omnisharp/observers/dotnetLoggerObserver.ts +++ b/src/omnisharp/observers/dotnetLoggerObserver.ts @@ -2,14 +2,14 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; import { CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, CommandDotNetRestoreFailed, -} from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; +} from '../omnisharpLoggingEvents.ts'; +import { EventType } from '../../shared/eventType.ts'; export class DotnetLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetTestChannelObserver.ts b/src/omnisharp/observers/dotnetTestChannelObserver.ts index eab8cd887e..c9c7a3b540 100644 --- a/src/omnisharp/observers/dotnetTestChannelObserver.ts +++ b/src/omnisharp/observers/dotnetTestChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export default class DotnetTestChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/dotnetTestLoggerObserver.ts b/src/omnisharp/observers/dotnetTestLoggerObserver.ts index 876f339a85..7fd16b385a 100644 --- a/src/omnisharp/observers/dotnetTestLoggerObserver.ts +++ b/src/omnisharp/observers/dotnetTestLoggerObserver.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; import { DotNetTestRunStart, DotNetTestMessage, @@ -15,10 +15,10 @@ import { DotNetTestsInClassRunStart, DotNetTestRunInContextStart, DotNetTestDebugInContextStart, -} from '../omnisharpLoggingEvents'; -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import * as protocol from '../protocol'; -import { EventType } from '../../shared/eventType'; +} from '../omnisharpLoggingEvents.ts'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.ts'; +import * as protocol from '../protocol.ts'; +import { EventType } from '../../shared/eventType.ts'; export default class DotNetTestLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/errorMessageObserver.ts b/src/omnisharp/observers/errorMessageObserver.ts index 2ac535689f..c96176e718 100644 --- a/src/omnisharp/observers/errorMessageObserver.ts +++ b/src/omnisharp/observers/errorMessageObserver.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent, IntegrityCheckFailure, ZipError } from '../../shared/loggingEvents'; -import { DotNetTestRunFailure, DotNetTestDebugStartFailure } from '../omnisharpLoggingEvents'; -import { vscode } from '../../vscodeAdapter'; -import { EventType } from '../../shared/eventType'; +import { BaseEvent, IntegrityCheckFailure, ZipError } from '../../shared/loggingEvents.ts'; +import { DotNetTestRunFailure, DotNetTestDebugStartFailure } from '../omnisharpLoggingEvents.ts'; +import { vscode } from '../../vscodeAdapter.ts'; +import { EventType } from '../../shared/eventType.ts'; import { l10n } from 'vscode'; -import { showErrorMessage } from '../../shared/observers/utils/showMessage'; +import { showErrorMessage } from '../../shared/observers/utils/showMessage.ts'; export class ErrorMessageObserver { constructor(private vscode: vscode) {} diff --git a/src/omnisharp/observers/informationMessageObserver.ts b/src/omnisharp/observers/informationMessageObserver.ts index 8579793fa3..57131ffa77 100644 --- a/src/omnisharp/observers/informationMessageObserver.ts +++ b/src/omnisharp/observers/informationMessageObserver.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from '../../vscodeAdapter'; -import { EventType } from '../../shared/eventType'; -import { omnisharpOptions } from '../../shared/options'; +import { vscode } from '../../vscodeAdapter.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; import { l10n } from 'vscode'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; +import { CommandOption, showInformationMessage } from '../../shared/observers/utils/showMessage.ts'; export class InformationMessageObserver { constructor(private vscode: vscode) {} diff --git a/src/omnisharp/observers/omnisharpChannelObserver.ts b/src/omnisharp/observers/omnisharpChannelObserver.ts index a47fd3d5c6..3a7b5eb500 100644 --- a/src/omnisharp/observers/omnisharpChannelObserver.ts +++ b/src/omnisharp/observers/omnisharpChannelObserver.ts @@ -3,11 +3,11 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver'; -import { OutputChannel } from '../../vscodeAdapter'; -import { EventType } from '../../shared/eventType'; -import { omnisharpOptions } from '../../shared/options'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from '../../shared/observers/baseChannelObserver.ts'; +import { OutputChannel } from '../../vscodeAdapter.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { omnisharpOptions } from '../../shared/options.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export class OmnisharpChannelObserver extends BaseChannelObserver { constructor(channel: OutputChannel) { diff --git a/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts b/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts index 7a2f0390da..dd0ad47eb5 100644 --- a/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts +++ b/src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.ts'; import * as os from 'os'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; import { OmnisharpRequestMessage, OmnisharpServerEnqueueRequest, @@ -14,8 +14,8 @@ import { OmnisharpServerVerboseMessage, OmnisharpServerProcessRequestStart, OmnisharpEventPacketReceived, -} from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; +} from '../omnisharpLoggingEvents.ts'; +import { EventType } from '../../shared/eventType.ts'; export class OmnisharpDebugModeLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/omnisharpLoggerObserver.ts b/src/omnisharp/observers/omnisharpLoggerObserver.ts index 661b3c945f..ef96d7db50 100644 --- a/src/omnisharp/observers/omnisharpLoggerObserver.ts +++ b/src/omnisharp/observers/omnisharpLoggerObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; import { OmnisharpInitialisation, OmnisharpLaunch, @@ -15,12 +15,12 @@ import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnStdErr, OmnisharpEventPacketReceived, -} from '../omnisharpLoggingEvents'; +} from '../omnisharpLoggingEvents.ts'; import * as os from 'os'; -import { EventType } from '../../shared/eventType'; +import { EventType } from '../../shared/eventType.ts'; import * as vscode from 'vscode'; -import { PlatformInformation } from '../../shared/platform'; -import { Logger } from '../../logger'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { Logger } from '../../logger.ts'; export class OmnisharpLoggerObserver extends BaseLoggerObserver { constructor( diff --git a/src/omnisharp/observers/omnisharpStatusBarObserver.ts b/src/omnisharp/observers/omnisharpStatusBarObserver.ts index a6218d57c0..71c35bc3ab 100644 --- a/src/omnisharp/observers/omnisharpStatusBarObserver.ts +++ b/src/omnisharp/observers/omnisharpStatusBarObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseEvent, DownloadProgress, DownloadStart, InstallationStart } from '../../shared/loggingEvents'; -import { OmnisharpServerOnStdErr } from '../omnisharpLoggingEvents'; -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; -import { EventType } from '../../shared/eventType'; +import { BaseEvent, DownloadProgress, DownloadStart, InstallationStart } from '../../shared/loggingEvents.ts'; +import { OmnisharpServerOnStdErr } from '../omnisharpLoggingEvents.ts'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.ts'; +import { EventType } from '../../shared/eventType.ts'; export enum StatusBarColors { Red = 'rgb(218,0,0)', diff --git a/src/omnisharp/observers/projectStatusBarObserver.ts b/src/omnisharp/observers/projectStatusBarObserver.ts index 419bd4e232..fce1457d32 100644 --- a/src/omnisharp/observers/projectStatusBarObserver.ts +++ b/src/omnisharp/observers/projectStatusBarObserver.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { basename } from 'path'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { WorkspaceInformationUpdated } from '../omnisharpLoggingEvents'; -import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver'; -import { EventType } from '../../shared/eventType'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; +import { WorkspaceInformationUpdated } from '../omnisharpLoggingEvents.ts'; +import { BaseStatusBarItemObserver } from './baseStatusBarItemObserver.ts'; +import { EventType } from '../../shared/eventType.ts'; export class ProjectStatusBarObserver extends BaseStatusBarItemObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/razorLoggerObserver.ts b/src/omnisharp/observers/razorLoggerObserver.ts index b3d2321b05..3358e6ad91 100644 --- a/src/omnisharp/observers/razorLoggerObserver.ts +++ b/src/omnisharp/observers/razorLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver'; -import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist } from '../omnisharpLoggingEvents'; -import { EventType } from '../../shared/eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseLoggerObserver } from '../../shared/observers/baseLoggerObserver.ts'; +import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist } from '../omnisharpLoggingEvents.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export class RazorLoggerObserver extends BaseLoggerObserver { public post = (event: BaseEvent) => { diff --git a/src/omnisharp/observers/telemetryObserver.ts b/src/omnisharp/observers/telemetryObserver.ts index 35a29f3c12..e3e3a89f70 100644 --- a/src/omnisharp/observers/telemetryObserver.ts +++ b/src/omnisharp/observers/telemetryObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../../shared/platform'; -import { BaseEvent, InstallationFailure } from '../../shared/loggingEvents'; +import { PlatformInformation } from '../../shared/platform.ts'; +import { BaseEvent, InstallationFailure } from '../../shared/loggingEvents.ts'; import { TestExecutionCountReport, TelemetryEventWithMeasures, @@ -12,13 +12,13 @@ import { ProjectConfiguration, TelemetryErrorEvent, OmnisharpInitialisation, -} from '../omnisharpLoggingEvents'; -import { PackageError } from '../../packageManager/packageError'; -import { EventType } from '../../shared/eventType'; -import { getDotnetInfo } from '../../shared/utils/getDotnetInfo'; -import { DotnetInfo } from '../../shared/utils/dotnetInfo'; -import { ITelemetryReporter, getTelemetryProps } from '../../shared/telemetryReporter'; -import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration'; +} from '../omnisharpLoggingEvents.ts'; +import { PackageError } from '../../packageManager/packageError.ts'; +import { EventType } from '../../shared/eventType.ts'; +import { getDotnetInfo } from '../../shared/utils/getDotnetInfo.ts'; +import { DotnetInfo } from '../../shared/utils/dotnetInfo.ts'; +import { ITelemetryReporter, getTelemetryProps } from '../../shared/telemetryReporter.ts'; +import { reportProjectConfigurationEvent } from '../../shared/projectConfiguration.ts'; export class TelemetryObserver { private reporter: ITelemetryReporter; diff --git a/src/omnisharp/observers/warningMessageObserver.ts b/src/omnisharp/observers/warningMessageObserver.ts index a044e219a7..dc9fba1e95 100644 --- a/src/omnisharp/observers/warningMessageObserver.ts +++ b/src/omnisharp/observers/warningMessageObserver.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { debounceTime } from 'rxjs/operators'; -import { vscode } from '../../vscodeAdapter'; -import { BaseEvent } from '../../shared/loggingEvents'; -import { OmnisharpServerMsBuildProjectDiagnostics } from '../omnisharpLoggingEvents'; +import { vscode } from '../../vscodeAdapter.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; +import { OmnisharpServerMsBuildProjectDiagnostics } from '../omnisharpLoggingEvents.ts'; import { Scheduler, Subject } from 'rxjs'; -import { EventType } from '../../shared/eventType'; +import { EventType } from '../../shared/eventType.ts'; import { l10n } from 'vscode'; -import { CommandOption, showWarningMessage } from '../../shared/observers/utils/showMessage'; +import { CommandOption, showWarningMessage } from '../../shared/observers/utils/showMessage.ts'; export class WarningMessageObserver { private warningMessageDebouncer: Subject; diff --git a/src/omnisharp/omniSharpMonoResolver.ts b/src/omnisharp/omniSharpMonoResolver.ts index 6e3df3434a..43c6744797 100644 --- a/src/omnisharp/omniSharpMonoResolver.ts +++ b/src/omnisharp/omniSharpMonoResolver.ts @@ -5,10 +5,10 @@ import * as semver from 'semver'; import * as path from 'path'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation'; -import { IGetMonoVersion } from '../constants/IGetMonoVersion'; -import { omnisharpOptions } from '../shared/options'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.ts'; +import { HostExecutableInformation } from '../shared/constants/hostExecutableInformation.ts'; +import { IGetMonoVersion } from '../constants/IGetMonoVersion.ts'; +import { omnisharpOptions } from '../shared/options.ts'; export class OmniSharpMonoResolver implements IHostExecutableResolver { private readonly minimumMonoVersion = '6.4.0'; diff --git a/src/omnisharp/omnisharpDownloader.ts b/src/omnisharp/omnisharpDownloader.ts index dd0ea5bab0..c968f09797 100644 --- a/src/omnisharp/omnisharpDownloader.ts +++ b/src/omnisharp/omnisharpDownloader.ts @@ -3,23 +3,23 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { GetPackagesFromVersion } from './omnisharpPackageCreator'; -import { PlatformInformation } from '../shared/platform'; +import { GetPackagesFromVersion } from './omnisharpPackageCreator.ts'; +import { PlatformInformation } from '../shared/platform.ts'; import { PackageInstallation, LogPlatformInfo, InstallationSuccess, InstallationFailure, -} from '../shared/loggingEvents'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; -import { DownloadFile } from '../packageManager/fileDownloader'; -import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; -import { isValidDownload } from '../packageManager/isValidDownload'; -import { LatestBuildDownloadStart } from './omnisharpLoggingEvents'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +} from '../shared/loggingEvents.ts'; +import { EventStream } from '../eventStream.ts'; +import { NetworkSettingsProvider } from '../networkSettings.ts'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages.ts'; +import { DownloadFile } from '../packageManager/fileDownloader.ts'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils.ts'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall.ts'; +import { isValidDownload } from '../packageManager/isValidDownload.ts'; +import { LatestBuildDownloadStart } from './omnisharpLoggingEvents.ts'; +import { ITelemetryReporter } from '../shared/telemetryReporter.ts'; export class OmnisharpDownloader { public constructor( diff --git a/src/omnisharp/omnisharpLanguageServer.ts b/src/omnisharp/omnisharpLanguageServer.ts index 1c5325c328..69619bbd23 100644 --- a/src/omnisharp/omnisharpLanguageServer.ts +++ b/src/omnisharp/omnisharpLanguageServer.ts @@ -4,53 +4,53 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import * as utils from './utils'; -import { DotNetChannelObserver } from './observers/dotnetChannelObserver'; -import { DotnetLoggerObserver } from './observers/dotnetLoggerObserver'; -import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver'; -import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver'; -import { OmnisharpLoggerObserver } from './observers/omnisharpLoggerObserver'; -import { OmnisharpChannelObserver } from './observers/omnisharpChannelObserver'; -import { WarningMessageObserver } from './observers/warningMessageObserver'; -import { InformationMessageObserver } from './observers/informationMessageObserver'; -import { ErrorMessageObserver } from './observers/errorMessageObserver'; -import { StatusBarItemAdapter } from '../statusBarItemAdapter'; -import { OmnisharpStatusBarObserver } from './observers/omnisharpStatusBarObserver'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { PlatformInformation } from '../shared/platform'; -import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver'; -import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver'; -import { OmnisharpDebugModeLoggerObserver } from './observers/omnisharpDebugModeLoggerObserver'; -import { RazorLoggerObserver } from './observers/razorLoggerObserver'; -import { RazorOmnisharpDownloader } from '../razor/razorOmnisharpDownloader'; -import { omnisharpOptions, razorOptions } from '../shared/options'; -import CompositeDisposable from '../compositeDisposable'; -import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; -import { DotnetResolver } from './dotnetResolver'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; -import { OmniSharpServer } from './server'; -import { Advisor } from './features/diagnosticsProvider'; -import TestManager from './features/dotnetTest'; -import { OmnisharpWorkspaceDebugInformationProvider } from './omnisharpWorkspaceDebugInformationProvider'; -import Disposable from '../disposable'; -import registerCommands from './features/commands'; -import { addAssetsIfNecessary } from '../shared/assets'; +import * as utils from './utils.ts'; +import { DotNetChannelObserver } from './observers/dotnetChannelObserver.ts'; +import { DotnetLoggerObserver } from './observers/dotnetLoggerObserver.ts'; +import DotNetTestLoggerObserver from './observers/dotnetTestLoggerObserver.ts'; +import DotNetTestChannelObserver from './observers/dotnetTestChannelObserver.ts'; +import { OmnisharpLoggerObserver } from './observers/omnisharpLoggerObserver.ts'; +import { OmnisharpChannelObserver } from './observers/omnisharpChannelObserver.ts'; +import { WarningMessageObserver } from './observers/warningMessageObserver.ts'; +import { InformationMessageObserver } from './observers/informationMessageObserver.ts'; +import { ErrorMessageObserver } from './observers/errorMessageObserver.ts'; +import { StatusBarItemAdapter } from '../statusBarItemAdapter.ts'; +import { OmnisharpStatusBarObserver } from './observers/omnisharpStatusBarObserver.ts'; +import { EventStream } from '../eventStream.ts'; +import { NetworkSettingsProvider } from '../networkSettings.ts'; +import { PlatformInformation } from '../shared/platform.ts'; +import { ProjectStatusBarObserver } from './observers/projectStatusBarObserver.ts'; +import { BackgroundWorkStatusBarObserver } from './observers/backgroundWorkStatusBarObserver.ts'; +import { OmnisharpDebugModeLoggerObserver } from './observers/omnisharpDebugModeLoggerObserver.ts'; +import { RazorLoggerObserver } from './observers/razorLoggerObserver.ts'; +import { RazorOmnisharpDownloader } from '../razor/razorOmnisharpDownloader.ts'; +import { omnisharpOptions, razorOptions } from '../shared/options.ts'; +import CompositeDisposable from '../compositeDisposable.ts'; +import { OmniSharpMonoResolver } from './omniSharpMonoResolver.ts'; +import { DotnetResolver } from './dotnetResolver.ts'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.ts'; +import { OmniSharpServer } from './server.ts'; +import { Advisor } from './features/diagnosticsProvider.ts'; +import TestManager from './features/dotnetTest.ts'; +import { OmnisharpWorkspaceDebugInformationProvider } from './omnisharpWorkspaceDebugInformationProvider.ts'; +import Disposable from '../disposable.ts'; +import registerCommands from './features/commands.ts'; +import { addAssetsIfNecessary } from '../shared/assets.ts'; import { ActiveTextEditorChanged, OmnisharpStart, ProjectJsonDeprecatedWarning, RazorDevModeActive, -} from './omnisharpLoggingEvents'; -import { DotnetWorkspaceConfigurationProvider } from '../shared/workspaceConfigurationProvider'; -import { getMonoVersion } from '../utils/getMonoVersion'; -import { safeLength, sum } from '../common'; -import { TelemetryObserver } from './observers/telemetryObserver'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +} from './omnisharpLoggingEvents.ts'; +import { DotnetWorkspaceConfigurationProvider } from '../shared/workspaceConfigurationProvider.ts'; +import { getMonoVersion } from '../utils/getMonoVersion.ts'; +import { safeLength, sum } from '../common.ts'; +import { TelemetryObserver } from './observers/telemetryObserver.ts'; +import { ITelemetryReporter } from '../shared/telemetryReporter.ts'; import { Observable } from 'rxjs'; -import { registerOmnisharpOptionChanges } from './omnisharpOptionChanges'; -import { CSharpLoggerObserver } from './observers/csharpLoggerObserver'; -import { showWarningMessage } from '../shared/observers/utils/showMessage'; +import { registerOmnisharpOptionChanges } from './omnisharpOptionChanges.ts'; +import { CSharpLoggerObserver } from './observers/csharpLoggerObserver.ts'; +import { showWarningMessage } from '../shared/observers/utils/showMessage.ts'; export interface ActivationResult { readonly server: OmniSharpServer; diff --git a/src/omnisharp/omnisharpLoggingEvents.ts b/src/omnisharp/omnisharpLoggingEvents.ts index 9fd7fdf1dd..f3efec307e 100644 --- a/src/omnisharp/omnisharpLoggingEvents.ts +++ b/src/omnisharp/omnisharpLoggingEvents.ts @@ -3,12 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Request } from './requestQueue'; -import * as protocol from './protocol'; -import { LaunchTarget } from '../shared/launchTarget'; -import { EventType } from '../shared/eventType'; -import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; -import { BaseEvent, EventWithMessage } from '../shared/loggingEvents'; +import { Request } from './requestQueue.ts'; +import * as protocol from './protocol.ts'; +import { LaunchTarget } from '../shared/launchTarget.ts'; +import { EventType } from '../shared/eventType.ts'; +import { ProjectConfigurationMessage } from '../shared/projectConfiguration.ts'; +import { BaseEvent, EventWithMessage } from '../shared/loggingEvents.ts'; export class TelemetryEvent implements BaseEvent { type = EventType.TelemetryEvent; diff --git a/src/omnisharp/omnisharpManager.ts b/src/omnisharp/omnisharpManager.ts index 91159a3690..8a7cd1cc0d 100644 --- a/src/omnisharp/omnisharpManager.ts +++ b/src/omnisharp/omnisharpManager.ts @@ -5,10 +5,10 @@ import * as path from 'path'; import * as semver from 'semver'; -import * as util from '../common'; -import { OmnisharpDownloader } from './omnisharpDownloader'; -import { PlatformInformation } from '../shared/platform'; -import { modernNetVersion } from './omnisharpPackageCreator'; +import * as util from '../common.ts'; +import { OmnisharpDownloader } from './omnisharpDownloader.ts'; +import { PlatformInformation } from '../shared/platform.ts'; +import { modernNetVersion } from './omnisharpPackageCreator.ts'; export class OmnisharpManager { private readonly latestVersionFileServerPath = 'releases/versioninfo.txt'; diff --git a/src/omnisharp/omnisharpOptionChanges.ts b/src/omnisharp/omnisharpOptionChanges.ts index 880f9e7424..954a381432 100644 --- a/src/omnisharp/omnisharpOptionChanges.ts +++ b/src/omnisharp/omnisharpOptionChanges.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver'; -import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options'; +import { HandleOptionChanges, OptionChangeObserver } from '../shared/observers/optionChangeObserver.ts'; +import { CommonOptionsThatTriggerReload, OmnisharpOptionsThatTriggerReload } from '../shared/options.ts'; import { Observable } from 'rxjs'; -import Disposable from '../disposable'; -import { CommandOption, showInformationMessage } from '../shared/observers/utils/showMessage'; +import Disposable from '../disposable.ts'; +import { CommandOption, showInformationMessage } from '../shared/observers/utils/showMessage.ts'; export function registerOmnisharpOptionChanges(optionObservable: Observable): Disposable { const optionChangeObserver: OptionChangeObserver = { diff --git a/src/omnisharp/omnisharpPackageCreator.ts b/src/omnisharp/omnisharpPackageCreator.ts index ff68e4c26c..1dfb08f869 100644 --- a/src/omnisharp/omnisharpPackageCreator.ts +++ b/src/omnisharp/omnisharpPackageCreator.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Package } from '../packageManager/package'; +import { Package } from '../packageManager/package.ts'; export const modernNetVersion = '6.0'; diff --git a/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts b/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts index 7018dddd0a..9699c38a1f 100644 --- a/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts +++ b/src/omnisharp/omnisharpWorkspaceDebugInformationProvider.ts @@ -4,15 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import * as serverUtils from './utils'; +import * as serverUtils from './utils.ts'; import { IWorkspaceDebugInformationProvider, ProjectDebugInformation, -} from '../shared/IWorkspaceDebugInformationProvider'; -import { OmniSharpServer } from './server'; +} from '../shared/IWorkspaceDebugInformationProvider.ts'; +import { OmniSharpServer } from './server.ts'; import { Uri } from 'vscode'; -import { findNetCoreTargetFramework } from '../shared/utils'; -import { isSubfolderOf } from '../common'; +import { findNetCoreTargetFramework } from '../shared/utils.ts'; +import { isSubfolderOf } from '../common.ts'; export class OmnisharpWorkspaceDebugInformationProvider implements IWorkspaceDebugInformationProvider { constructor(private server: OmniSharpServer) {} diff --git a/src/omnisharp/prioritization.ts b/src/omnisharp/prioritization.ts index 9e5641c108..35d9d018ae 100644 --- a/src/omnisharp/prioritization.ts +++ b/src/omnisharp/prioritization.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from './protocol'; +import * as protocol from './protocol.ts'; const priorityCommands = [ protocol.Requests.ChangeBuffer, diff --git a/src/omnisharp/protocol.ts b/src/omnisharp/protocol.ts index 94cf74c397..efe657727c 100644 --- a/src/omnisharp/protocol.ts +++ b/src/omnisharp/protocol.ts @@ -9,7 +9,7 @@ import { findNetCoreTargetFramework, findNetFrameworkTargetFramework, findNetStandardTargetFramework, -} from '../shared/utils'; +} from '../shared/utils.ts'; export namespace Requests { export const AddToProject = '/addtoproject'; diff --git a/src/omnisharp/requestQueue.ts b/src/omnisharp/requestQueue.ts index d7f6439085..bc60e01326 100644 --- a/src/omnisharp/requestQueue.ts +++ b/src/omnisharp/requestQueue.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as prioritization from './prioritization'; +import * as prioritization from './prioritization.ts'; import { OmnisharpServerProcessRequestComplete, OmnisharpServerProcessRequestStart, OmnisharpServerDequeueRequest, OmnisharpServerEnqueueRequest, -} from './omnisharpLoggingEvents'; -import { EventStream } from '../eventStream'; +} from './omnisharpLoggingEvents.ts'; +import { EventStream } from '../eventStream.ts'; export interface Request { command: string; diff --git a/src/omnisharp/requirementCheck.ts b/src/omnisharp/requirementCheck.ts index 2a59f8995a..7810c34314 100644 --- a/src/omnisharp/requirementCheck.ts +++ b/src/omnisharp/requirementCheck.ts @@ -5,11 +5,11 @@ import * as vscode from 'vscode'; import * as semver from 'semver'; -import { getDotnetInfo } from '../shared/utils/getDotnetInfo'; -import { getMonoVersion } from '../utils/getMonoVersion'; -import { OmniSharpMonoResolver } from './omniSharpMonoResolver'; -import { getMSBuildVersion } from '../utils/getMsBuildInfo'; -import { omnisharpOptions } from '../shared/options'; +import { getDotnetInfo } from '../shared/utils/getDotnetInfo.ts'; +import { getMonoVersion } from '../utils/getMonoVersion.ts'; +import { OmniSharpMonoResolver } from './omniSharpMonoResolver.ts'; +import { getMSBuildVersion } from '../utils/getMsBuildInfo.ts'; +import { omnisharpOptions } from '../shared/options.ts'; export interface RequirementResult { needsDotNetSdk: boolean; diff --git a/src/omnisharp/server.ts b/src/omnisharp/server.ts index aa54915492..403d5aff8a 100644 --- a/src/omnisharp/server.ts +++ b/src/omnisharp/server.ts @@ -5,36 +5,36 @@ import * as fs from 'fs'; import * as path from 'path'; -import * as protocol from './protocol'; -import * as serverUtils from './utils'; -import { vscode, CancellationToken } from '../vscodeAdapter'; -import { LaunchTarget, LaunchTargetKind } from '../shared/launchTarget'; -import { DelayTracker } from './delayTracker'; +import * as protocol from './protocol.ts'; +import * as serverUtils from './utils.ts'; +import { vscode, CancellationToken } from '../vscodeAdapter.ts'; +import { LaunchTarget, LaunchTargetKind } from '../shared/launchTarget.ts'; +import { DelayTracker } from './delayTracker.ts'; import { EventEmitter } from 'events'; -import { OmnisharpManager } from './omnisharpManager'; -import { PlatformInformation } from '../shared/platform'; -import { OmnisharpDownloader } from './omnisharpDownloader'; -import * as ObservableEvents from './omnisharpLoggingEvents'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; +import { OmnisharpManager } from './omnisharpManager.ts'; +import { PlatformInformation } from '../shared/platform.ts'; +import { OmnisharpDownloader } from './omnisharpDownloader.ts'; +import * as ObservableEvents from './omnisharpLoggingEvents.ts'; +import { EventStream } from '../eventStream.ts'; +import { NetworkSettingsProvider } from '../networkSettings.ts'; import { Subject } from 'rxjs'; import { debounceTime } from 'rxjs/operators'; -import CompositeDisposable from '../compositeDisposable'; -import Disposable from '../disposable'; +import CompositeDisposable from '../compositeDisposable.ts'; +import Disposable from '../disposable.ts'; import { ExtensionContext, LogOutputChannel, OutputChannel } from 'vscode'; -import { LanguageMiddlewareFeature } from './languageMiddlewareFeature'; -import { LspEngine } from './engines/lspEngine'; -import { IEngine } from './engines/IEngine'; -import { StdioEngine } from './engines/stdioEngine'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; -import { showProjectSelector } from './features/commands'; -import { validateRequirements } from './requirementCheck'; -import { Advisor } from './features/diagnosticsProvider'; -import TestManager from './features/dotnetTest'; -import { findLaunchTargets } from './launcher'; -import { ProjectConfigurationMessage } from '../shared/projectConfiguration'; -import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +import { LanguageMiddlewareFeature } from './languageMiddlewareFeature.ts'; +import { LspEngine } from './engines/lspEngine.ts'; +import { IEngine } from './engines/IEngine.ts'; +import { StdioEngine } from './engines/stdioEngine.ts'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.ts'; +import { showProjectSelector } from './features/commands.ts'; +import { validateRequirements } from './requirementCheck.ts'; +import { Advisor } from './features/diagnosticsProvider.ts'; +import TestManager from './features/dotnetTest.ts'; +import { findLaunchTargets } from './launcher.ts'; +import { ProjectConfigurationMessage } from '../shared/projectConfiguration.ts'; +import { commonOptions, omnisharpOptions, razorOptions } from '../shared/options.ts'; +import { ITelemetryReporter } from '../shared/telemetryReporter.ts'; enum ServerState { Starting, diff --git a/src/omnisharp/typeConversion.ts b/src/omnisharp/typeConversion.ts index 4fa0212385..6c2c5e82e9 100644 --- a/src/omnisharp/typeConversion.ts +++ b/src/omnisharp/typeConversion.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as protocol from './protocol'; +import * as protocol from './protocol.ts'; import * as vscode from 'vscode'; export function toLocation(location: protocol.ResourceLocation | protocol.QuickFix): vscode.Location { diff --git a/src/omnisharp/utils.ts b/src/omnisharp/utils.ts index 56f92b3bf5..55e8805d7b 100644 --- a/src/omnisharp/utils.ts +++ b/src/omnisharp/utils.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { OmniSharpServer } from './server'; -import * as protocol from './protocol'; +import { OmniSharpServer } from './server.ts'; +import * as protocol from './protocol.ts'; import * as vscode from 'vscode'; import { CancellationToken } from 'vscode-languageclient'; import { @@ -13,7 +13,7 @@ import { isBlazorWebAssemblyHosted, isBlazorWebAssemblyHostedServer, findNetCoreTargetFramework, -} from '../shared/utils'; +} from '../shared/utils.ts'; export async function codeCheck(server: OmniSharpServer, request: protocol.Request, token: vscode.CancellationToken) { return server.makeRequest(protocol.Requests.CodeCheck, request, token); diff --git a/src/packageManager/IInstallDependencies.ts b/src/packageManager/IInstallDependencies.ts index d4c12b3cfc..3986b3473c 100644 --- a/src/packageManager/IInstallDependencies.ts +++ b/src/packageManager/IInstallDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { AbsolutePathPackage } from './absolutePathPackage'; +import { AbsolutePathPackage } from './absolutePathPackage.ts'; export type DependencyInstallationStatus = { [name: string]: boolean }; diff --git a/src/packageManager/absolutePathPackage.ts b/src/packageManager/absolutePathPackage.ts index 5505dc43eb..cc31f67762 100644 --- a/src/packageManager/absolutePathPackage.ts +++ b/src/packageManager/absolutePathPackage.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { Package } from './package'; -import { IPackage } from './IPackage'; -import { AbsolutePath } from './absolutePath'; +import { Package } from './package.ts'; +import { IPackage } from './IPackage.ts'; +import { AbsolutePath } from './absolutePath.ts'; export class AbsolutePathPackage implements IPackage { constructor( diff --git a/src/packageManager/downloadAndInstallPackages.ts b/src/packageManager/downloadAndInstallPackages.ts index 9c8da1cbb3..50a3698232 100644 --- a/src/packageManager/downloadAndInstallPackages.ts +++ b/src/packageManager/downloadAndInstallPackages.ts @@ -3,21 +3,21 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PackageError } from './packageError'; -import { NestedError } from '../nestedError'; -import { DownloadFile } from './fileDownloader'; -import { InstallZip } from './zipInstaller'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { AbsolutePathPackage } from './absolutePathPackage'; -import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from '../common'; -import { InstallationFailure, IntegrityCheckFailure } from '../shared/loggingEvents'; +import { PackageError } from './packageError.ts'; +import { NestedError } from '../nestedError.ts'; +import { DownloadFile } from './fileDownloader.ts'; +import { InstallZip } from './zipInstaller.ts'; +import { EventStream } from '../eventStream.ts'; +import { NetworkSettingsProvider } from '../networkSettings.ts'; +import { AbsolutePathPackage } from './absolutePathPackage.ts'; +import { touchInstallFile, InstallFileType, deleteInstallFile, installFileExists } from '../common.ts'; +import { InstallationFailure, IntegrityCheckFailure } from '../shared/loggingEvents.ts'; import fsExtra from 'fs-extra'; -import { PackageInstallStart } from '../shared/loggingEvents'; -import { DownloadValidator } from './isValidDownload'; +import { PackageInstallStart } from '../shared/loggingEvents.ts'; +import { DownloadValidator } from './isValidDownload.ts'; import { CancellationToken } from 'vscode'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; -import { DependencyInstallationStatus } from './IInstallDependencies'; +import { ITelemetryReporter } from '../shared/telemetryReporter.ts'; +import { DependencyInstallationStatus } from './IInstallDependencies.ts'; export async function downloadAndInstallPackages( packages: AbsolutePathPackage[], diff --git a/src/packageManager/fileDownloader.ts b/src/packageManager/fileDownloader.ts index b1535a2132..4705ec9f47 100644 --- a/src/packageManager/fileDownloader.ts +++ b/src/packageManager/fileDownloader.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as https from 'https'; -import { EventStream } from '../eventStream'; +import { EventStream } from '../eventStream.ts'; import { DownloadSuccess, DownloadStart, @@ -12,11 +12,11 @@ import { DownloadFailure, DownloadProgress, DownloadSizeObtained, -} from '../shared/loggingEvents'; -import { NestedError } from '../nestedError'; +} from '../shared/loggingEvents.ts'; +import { NestedError } from '../nestedError.ts'; import { parse as parseUrl } from 'url'; -import { getProxyAgent } from './proxy'; -import { NetworkSettingsProvider } from '../networkSettings'; +import { getProxyAgent } from './proxy.ts'; +import { NetworkSettingsProvider } from '../networkSettings.ts'; import { CancellationToken } from 'vscode'; export async function DownloadFile( diff --git a/src/packageManager/getAbsolutePathPackagesToInstall.ts b/src/packageManager/getAbsolutePathPackagesToInstall.ts index 3efc604519..4d5c5bbd0e 100644 --- a/src/packageManager/getAbsolutePathPackagesToInstall.ts +++ b/src/packageManager/getAbsolutePathPackagesToInstall.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import { AbsolutePathPackage } from './absolutePathPackage'; -import { getNotInstalledPackagesForPlatform } from './packageFilterer'; -import { Package } from './package'; +import { PlatformInformation } from '../shared/platform.ts'; +import { AbsolutePathPackage } from './absolutePathPackage.ts'; +import { getNotInstalledPackagesForPlatform } from './packageFilterer.ts'; +import { Package } from './package.ts'; export async function getAbsolutePathPackagesToInstall( packages: Package[], diff --git a/src/packageManager/isValidDownload.ts b/src/packageManager/isValidDownload.ts index fd592395ff..3b0b5975ac 100644 --- a/src/packageManager/isValidDownload.ts +++ b/src/packageManager/isValidDownload.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as crypto from 'crypto'; -import { EventStream } from '../eventStream'; -import { IntegrityCheckSuccess, DownloadValidation } from '../shared/loggingEvents'; +import { EventStream } from '../eventStream.ts'; +import { IntegrityCheckSuccess, DownloadValidation } from '../shared/loggingEvents.ts'; export interface DownloadValidator { (buffer: Buffer, integrity: string | undefined, eventStream: EventStream): boolean; diff --git a/src/packageManager/package.ts b/src/packageManager/package.ts index da54200e5d..e90539e231 100644 --- a/src/packageManager/package.ts +++ b/src/packageManager/package.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IPackage } from './IPackage'; +import { IPackage } from './IPackage.ts'; export interface Package extends IPackage { installPath?: string; diff --git a/src/packageManager/packageError.ts b/src/packageManager/packageError.ts index 9954ee8ec8..489cd7b48f 100644 --- a/src/packageManager/packageError.ts +++ b/src/packageManager/packageError.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { NestedError } from '../nestedError'; -import { IPackage } from './IPackage'; +import { NestedError } from '../nestedError.ts'; +import { IPackage } from './IPackage.ts'; export class PackageError extends NestedError { // Do not put PII (personally identifiable information) in the 'message' field as it will be logged to telemetry diff --git a/src/packageManager/packageFilterer.ts b/src/packageManager/packageFilterer.ts index 80d22fe4a8..88196fab45 100644 --- a/src/packageManager/packageFilterer.ts +++ b/src/packageManager/packageFilterer.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import * as util from '../common'; -import { AbsolutePathPackage } from './absolutePathPackage'; +import { PlatformInformation } from '../shared/platform.ts'; +import * as util from '../common.ts'; +import { AbsolutePathPackage } from './absolutePathPackage.ts'; const NEUTRAL = 'neutral'; diff --git a/src/packageManager/zipInstaller.ts b/src/packageManager/zipInstaller.ts index cccbb8ce19..b4314c3ec8 100644 --- a/src/packageManager/zipInstaller.ts +++ b/src/packageManager/zipInstaller.ts @@ -7,10 +7,10 @@ import * as fs from 'fs'; import fsExtra from 'fs-extra'; import * as path from 'path'; import * as yauzl from 'yauzl'; -import { EventStream } from '../eventStream'; -import { InstallationStart, ZipError } from '../shared/loggingEvents'; -import { NestedError } from '../nestedError'; -import { AbsolutePath } from './absolutePath'; +import { EventStream } from '../eventStream.ts'; +import { InstallationStart, ZipError } from '../shared/loggingEvents.ts'; +import { NestedError } from '../nestedError.ts'; +import { AbsolutePath } from './absolutePath.ts'; export async function InstallZip( buffer: Buffer, diff --git a/src/razor/razorOmnisharp.ts b/src/razor/razorOmnisharp.ts index 21a341e865..b754afef4c 100644 --- a/src/razor/razorOmnisharp.ts +++ b/src/razor/razorOmnisharp.ts @@ -7,8 +7,8 @@ import * as fs from 'fs'; import * as RazorOmniSharp from 'microsoft.aspnetcore.razor.vscode'; import * as path from 'path'; import * as vscode from 'vscode'; -import { EventStream } from '../eventStream'; -import { showWarningMessage } from '../shared/observers/utils/showMessage'; +import { EventStream } from '../eventStream.ts'; +import { showWarningMessage } from '../shared/observers/utils/showMessage.ts'; export async function activateRazorOmniSharpExtension( context: vscode.ExtensionContext, diff --git a/src/razor/razorOmnisharpDownloader.ts b/src/razor/razorOmnisharpDownloader.ts index 83ffd4edc5..ab780cc216 100644 --- a/src/razor/razorOmnisharpDownloader.ts +++ b/src/razor/razorOmnisharpDownloader.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../shared/loggingEvents'; -import { EventStream } from '../eventStream'; -import { NetworkSettingsProvider } from '../networkSettings'; -import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages'; -import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall'; -import { isValidDownload } from '../packageManager/isValidDownload'; -import { ITelemetryReporter } from '../shared/telemetryReporter'; +import { PlatformInformation } from '../shared/platform.ts'; +import { PackageInstallation, LogPlatformInfo, InstallationSuccess } from '../shared/loggingEvents.ts'; +import { EventStream } from '../eventStream.ts'; +import { NetworkSettingsProvider } from '../networkSettings.ts'; +import { downloadAndInstallPackages } from '../packageManager/downloadAndInstallPackages.ts'; +import { getRuntimeDependenciesPackages } from '../tools/runtimeDependencyPackageUtils.ts'; +import { getAbsolutePathPackagesToInstall } from '../packageManager/getAbsolutePathPackagesToInstall.ts'; +import { isValidDownload } from '../packageManager/isValidDownload.ts'; +import { ITelemetryReporter } from '../shared/telemetryReporter.ts'; export class RazorOmnisharpDownloader { public constructor( diff --git a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts index 9f88c3b5b9..ecfd131a3b 100644 --- a/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts +++ b/src/razor/src/blazorDebug/blazorDebugConfigurationProvider.ts @@ -9,19 +9,19 @@ import { join } from 'path'; import { fileURLToPath } from 'url'; import * as vscode from 'vscode'; import { ChromeBrowserFinder, EdgeBrowserFinder } from '@vscode/js-debug-browsers'; -import { ONLY_JS_DEBUG_NAME, MANAGED_DEBUG_NAME, JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; -import { isValidEvent, onDidTerminateDebugSession } from './terminateDebugHandler'; +import { ONLY_JS_DEBUG_NAME, MANAGED_DEBUG_NAME, JS_DEBUG_NAME, SERVER_APP_NAME } from './constants.ts'; +import { isValidEvent, onDidTerminateDebugSession } from './terminateDebugHandler.ts'; import * as path from 'path'; import * as cp from 'child_process'; -import { getExtensionPath } from '../../../common'; -import { getCSharpDevKit } from '../../../utils/getCSharpDevKit'; -import { CSharpExtensionId } from '../../../constants/csharpExtensionId'; -import { DotNetRuntimeVersion } from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver'; +import { getExtensionPath } from '../../../common.ts'; +import { getCSharpDevKit } from '../../../utils/getCSharpDevKit.ts'; +import { CSharpExtensionId } from '../../../constants/csharpExtensionId.ts'; +import { DotNetRuntimeVersion } from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionResolver.ts'; import { IDotnetAcquireContext, IDotnetAcquireResult, IDotnetFindPathContext, -} from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi'; +} from '../../../lsptoolshost/dotnetRuntime/dotnetRuntimeExtensionApi.ts'; import { EventEmitter } from 'events'; import { Formatters, @@ -59,7 +59,7 @@ const targetFrameworkServiceDescriptor: ServiceRpcDescriptor = Object.freeze( ) ); -import { showErrorMessage, showInformationMessage } from '../../../shared/observers/utils/showMessage'; +import { showErrorMessage, showInformationMessage } from '../../../shared/observers/utils/showMessage.ts'; export class BlazorDebugConfigurationProvider implements vscode.DebugConfigurationProvider { private static readonly autoDetectUserNotice: string = vscode.l10n.t( diff --git a/src/razor/src/blazorDebug/terminateDebugHandler.ts b/src/razor/src/blazorDebug/terminateDebugHandler.ts index 6c60d3f5a8..070385abac 100644 --- a/src/razor/src/blazorDebug/terminateDebugHandler.ts +++ b/src/razor/src/blazorDebug/terminateDebugHandler.ts @@ -6,7 +6,7 @@ import psList from 'ps-list'; import { DebugSession } from 'vscode'; import { LogOutputChannel } from 'vscode'; -import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants'; +import { JS_DEBUG_NAME, SERVER_APP_NAME } from './constants.ts'; export const isValidEvent = (name: string) => { // The name can be of the form: `Debug Blazor Web Assembly in Browser: https://localhost:7291` diff --git a/src/razor/src/colorPresentation/colorPresentationHandler.ts b/src/razor/src/colorPresentation/colorPresentationHandler.ts index dbe21cd5f6..7c7f4f4a1a 100644 --- a/src/razor/src/colorPresentation/colorPresentationHandler.ts +++ b/src/razor/src/colorPresentation/colorPresentationHandler.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit'; -import { ColorPresentationContext } from './colorPresentationContext'; -import { SerializableColorPresentation } from './serializableColorPresentation'; -import { SerializableColorPresentationParams } from './serializableColorPresentationParams'; +import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit.ts'; +import { ColorPresentationContext } from './colorPresentationContext.ts'; +import { SerializableColorPresentation } from './serializableColorPresentation.ts'; +import { SerializableColorPresentationParams } from './serializableColorPresentationParams.ts'; export class ColorPresentationHandler { constructor() {} diff --git a/src/razor/src/colorPresentation/serializableColorPresentation.ts b/src/razor/src/colorPresentation/serializableColorPresentation.ts index 6d5de76161..f30e3e1fd0 100644 --- a/src/razor/src/colorPresentation/serializableColorPresentation.ts +++ b/src/razor/src/colorPresentation/serializableColorPresentation.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SerializableTextEdit } from '../rpc/serializableTextEdit'; +import { SerializableTextEdit } from '../rpc/serializableTextEdit.ts'; export class SerializableColorPresentation { constructor( diff --git a/src/razor/src/colorPresentation/serializableColorPresentationParams.ts b/src/razor/src/colorPresentation/serializableColorPresentationParams.ts index f9c74c533c..5fc2cbebe5 100644 --- a/src/razor/src/colorPresentation/serializableColorPresentationParams.ts +++ b/src/razor/src/colorPresentation/serializableColorPresentationParams.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { SerializableRange } from '../rpc/serializableRange'; -import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier'; +import { SerializableRange } from '../rpc/serializableRange.ts'; +import { SerializableTextDocumentIdentifier } from '../rpc/serializableTextDocumentIdentifier.ts'; export interface SerializableColorPresentationParams { textDocument: SerializableTextDocumentIdentifier; diff --git a/src/razor/src/documentColor/documentColorHandler.ts b/src/razor/src/documentColor/documentColorHandler.ts index 9a451ea98f..2ce53068da 100644 --- a/src/razor/src/documentColor/documentColorHandler.ts +++ b/src/razor/src/documentColor/documentColorHandler.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertRangeToSerializable } from '../rpc/serializableRange'; -import { SerializableColorInformation } from './serializableColorInformation'; +import { convertRangeToSerializable } from '../rpc/serializableRange.ts'; +import { SerializableColorInformation } from './serializableColorInformation.ts'; export class DocumentColorHandler { constructor() {} diff --git a/src/razor/src/documentColor/serializableColorInformation.ts b/src/razor/src/documentColor/serializableColorInformation.ts index 76572b986e..bc909cd0bc 100644 --- a/src/razor/src/documentColor/serializableColorInformation.ts +++ b/src/razor/src/documentColor/serializableColorInformation.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { SerializableRange } from '../rpc/serializableRange'; +import { SerializableRange } from '../rpc/serializableRange.ts'; export class SerializableColorInformation { constructor( diff --git a/src/razor/src/folding/foldingRangeHandler.ts b/src/razor/src/folding/foldingRangeHandler.ts index 762ccadb1a..23e60b6ac6 100644 --- a/src/razor/src/folding/foldingRangeHandler.ts +++ b/src/razor/src/folding/foldingRangeHandler.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import { FoldingRange, FoldingRangeKind } from 'vscode-languageclient'; -import { ObservableLogOutputChannel } from '../../../lsptoolshost/logging/observableLogOutputChannel'; +import { ObservableLogOutputChannel } from '../../../lsptoolshost/logging/observableLogOutputChannel.ts'; export class FoldingRangeHandler { constructor() {} diff --git a/src/razor/src/formatting/formattingHandler.ts b/src/razor/src/formatting/formattingHandler.ts index 15fcc05be6..a072ee86c4 100644 --- a/src/razor/src/formatting/formattingHandler.ts +++ b/src/razor/src/formatting/formattingHandler.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit'; -import { SerializableFormattingResponse } from './serializableFormattingResponse'; -import { SerializablePosition } from '../rpc/serializablePosition'; +import { convertTextEditToSerializable, SerializableTextEdit } from '../rpc/serializableTextEdit.ts'; +import { SerializableFormattingResponse } from './serializableFormattingResponse.ts'; +import { SerializablePosition } from '../rpc/serializablePosition.ts'; export class FormattingHandler { private static emptyFormattingResponse = new SerializableFormattingResponse(); diff --git a/src/razor/src/formatting/serializableFormattingResponse.ts b/src/razor/src/formatting/serializableFormattingResponse.ts index 615917b6f6..708a689c6f 100644 --- a/src/razor/src/formatting/serializableFormattingResponse.ts +++ b/src/razor/src/formatting/serializableFormattingResponse.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { SerializableTextEdit } from '../rpc/serializableTextEdit'; +import { SerializableTextEdit } from '../rpc/serializableTextEdit.ts'; export class SerializableFormattingResponse { constructor(public readonly edits?: SerializableTextEdit[]) {} diff --git a/src/razor/src/razorLanguage.ts b/src/razor/src/razorLanguage.ts index 7e7b29bca3..2cad07658f 100644 --- a/src/razor/src/razorLanguage.ts +++ b/src/razor/src/razorLanguage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from './vscodeAdapter'; +import * as vscode from './vscodeAdapter.ts'; export class RazorLanguage { public static id = 'aspnetcorerazor'; diff --git a/src/razor/src/razorLanguageConfiguration.ts b/src/razor/src/razorLanguageConfiguration.ts index 9b754bc24b..26f701bd7c 100644 --- a/src/razor/src/razorLanguageConfiguration.ts +++ b/src/razor/src/razorLanguageConfiguration.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { RazorLanguage } from './razorLanguage'; +import { RazorLanguage } from './razorLanguage.ts'; const VOID_ELEMENTS: string[] = [ 'area', diff --git a/src/razor/src/rpc/serializableRange.ts b/src/razor/src/rpc/serializableRange.ts index 8f0c8ed55c..d0e865d93f 100644 --- a/src/razor/src/rpc/serializableRange.ts +++ b/src/razor/src/rpc/serializableRange.ts @@ -8,7 +8,7 @@ import { convertPositionFromSerializable, convertPositionToSerializable, SerializablePosition, -} from './serializablePosition'; +} from './serializablePosition.ts'; // We'd typically just use vscode.Range here; however, that type doesn't serialize properly over the wire. export interface SerializableRange { diff --git a/src/razor/src/rpc/serializableTextEdit.ts b/src/razor/src/rpc/serializableTextEdit.ts index 6a5ae5565d..c069659cf0 100644 --- a/src/razor/src/rpc/serializableTextEdit.ts +++ b/src/razor/src/rpc/serializableTextEdit.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { convertRangeFromSerializable, convertRangeToSerializable, SerializableRange } from './serializableRange'; +import { convertRangeFromSerializable, convertRangeToSerializable, SerializableRange } from './serializableRange.ts'; // We'd typically just use vscode.TextEdit here; however, that type doesn't serialize properly over the wire. export interface SerializableTextEdit { diff --git a/src/shared/assets.ts b/src/shared/assets.ts index e9a3fa89c3..3d373e2c2d 100644 --- a/src/shared/assets.ts +++ b/src/shared/assets.ts @@ -9,12 +9,12 @@ import { FormattingOptions, ModificationOptions } from 'jsonc-parser'; import * as os from 'os'; import * as path from 'path'; import * as tasks from 'vscode-tasks'; -import * as util from '../common'; +import * as util from '../common.ts'; import * as vscode from 'vscode'; -import { tolerantParse } from '../json'; -import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider'; -import { showErrorMessage } from './observers/utils/showMessage'; +import { tolerantParse } from '../json.ts'; +import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider.ts'; +import { showErrorMessage } from './observers/utils/showMessage.ts'; type DebugConsoleOptions = { console: string }; diff --git a/src/shared/configurationProvider.ts b/src/shared/configurationProvider.ts index a073e24168..775df939c1 100644 --- a/src/shared/configurationProvider.ts +++ b/src/shared/configurationProvider.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { ParsedEnvironmentFile } from '../coreclrDebug/parsedEnvironmentFile'; -import { debugSessionTracker } from '../coreclrDebug/provisionalDebugSessionTracker'; +import { ParsedEnvironmentFile } from '../coreclrDebug/parsedEnvironmentFile.ts'; +import { debugSessionTracker } from '../coreclrDebug/provisionalDebugSessionTracker.ts'; -import { CertToolStatusCodes, createSelfSignedCert, hasDotnetDevCertsHttps } from '../utils/dotnetDevCertsHttps'; +import { CertToolStatusCodes, createSelfSignedCert, hasDotnetDevCertsHttps } from '../utils/dotnetDevCertsHttps.ts'; import { AttachItem, RemoteAttachPicker, DotNetAttachItemsProviderFactory, AttachPicker, -} from '../shared/processPicker'; -import { PlatformInformation } from './platform'; -import { getCSharpDevKit } from '../utils/getCSharpDevKit'; +} from '../shared/processPicker.ts'; +import { PlatformInformation } from './platform.ts'; +import { getCSharpDevKit } from '../utils/getCSharpDevKit.ts'; import { ActionOption, showErrorMessageWithOptions, showInformationMessage, showWarningMessage, -} from './observers/utils/showMessage'; +} from './observers/utils/showMessage.ts'; /** * Class used for debug configurations that will be sent to the debugger registered by {@link DebugAdapterExecutableFactory} diff --git a/src/shared/constants/IHostExecutableResolver.ts b/src/shared/constants/IHostExecutableResolver.ts index f1c783ef63..16172a9264 100644 --- a/src/shared/constants/IHostExecutableResolver.ts +++ b/src/shared/constants/IHostExecutableResolver.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { HostExecutableInformation } from './hostExecutableInformation'; +import { HostExecutableInformation } from './hostExecutableInformation.ts'; export interface IHostExecutableResolver { getHostExecutableInfo(): Promise; diff --git a/src/shared/dotnetConfigurationProvider.ts b/src/shared/dotnetConfigurationProvider.ts index f18134e238..798526fb95 100644 --- a/src/shared/dotnetConfigurationProvider.ts +++ b/src/shared/dotnetConfigurationProvider.ts @@ -5,16 +5,16 @@ import fs from 'fs-extra'; import * as vscode from 'vscode'; -import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider'; -import { AssetGenerator, AssetOperations, addTasksJsonIfNecessary, getBuildOperations } from './assets'; -import { getServiceBroker } from '../lsptoolshost/serviceBroker/brokeredServicesHosting'; -import Descriptors from '../lsptoolshost/solutionSnapshot/descriptors'; +import { IWorkspaceDebugInformationProvider, ProjectDebugInformation } from './IWorkspaceDebugInformationProvider.ts'; +import { AssetGenerator, AssetOperations, addTasksJsonIfNecessary, getBuildOperations } from './assets.ts'; +import { getServiceBroker } from '../lsptoolshost/serviceBroker/brokeredServicesHosting.ts'; +import Descriptors from '../lsptoolshost/solutionSnapshot/descriptors.ts'; import { DotnetDebugConfigurationServiceErrorKind, IDotnetDebugConfigurationService, IDotnetDebugConfigurationServiceResult, -} from '../lsptoolshost/debugger/IDotnetDebugConfigurationService'; -import { DotnetWorkspaceConfigurationProvider } from './workspaceConfigurationProvider'; +} from '../lsptoolshost/debugger/IDotnetDebugConfigurationService.ts'; +import { DotnetWorkspaceConfigurationProvider } from './workspaceConfigurationProvider.ts'; // User errors that can be shown to the user. class LaunchServiceError extends Error {} diff --git a/src/shared/limitedActivationStatus.ts b/src/shared/limitedActivationStatus.ts index d365c25d30..5d7a086230 100644 --- a/src/shared/limitedActivationStatus.ts +++ b/src/shared/limitedActivationStatus.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { languageServerOptions } from './options'; -import { RazorLanguage } from '../razor/src/razorLanguage'; -import { combineDocumentSelectors } from './utils/combineDocumentSelectors'; +import { languageServerOptions } from './options.ts'; +import { RazorLanguage } from '../razor/src/razorLanguage.ts'; +import { combineDocumentSelectors } from './utils/combineDocumentSelectors.ts'; export class LimitedActivationStatus { static createStatusItem(context: vscode.ExtensionContext) { diff --git a/src/shared/loggingEvents.ts b/src/shared/loggingEvents.ts index 77addb4da8..50de151811 100644 --- a/src/shared/loggingEvents.ts +++ b/src/shared/loggingEvents.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventType } from './eventType'; -import { PlatformInformation } from './platform'; +import { EventType } from './eventType.ts'; +import { PlatformInformation } from './platform.ts'; export interface BaseEvent { type: EventType; diff --git a/src/shared/migrateOptions.ts b/src/shared/migrateOptions.ts index 7ddc0cb9a4..380be43d20 100644 --- a/src/shared/migrateOptions.ts +++ b/src/shared/migrateOptions.ts @@ -6,9 +6,9 @@ import * as fs from 'fs'; import * as path from 'path'; import { types } from 'util'; -import { ConfigurationTarget, vscode, WorkspaceConfiguration } from '../vscodeAdapter'; -import { CSharpExtensionId } from '../constants/csharpExtensionId'; -import { commonOptions } from './options'; +import { ConfigurationTarget, vscode, WorkspaceConfiguration } from '../vscodeAdapter.ts'; +import { CSharpExtensionId } from '../constants/csharpExtensionId.ts'; +import { commonOptions } from './options.ts'; export interface IDotnetAcquisitionExistingPaths { extensionId: string; diff --git a/src/shared/observables/createOptionStream.ts b/src/shared/observables/createOptionStream.ts index 9d977a5653..78d3cdd4b3 100644 --- a/src/shared/observables/createOptionStream.ts +++ b/src/shared/observables/createOptionStream.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { vscode } from '../../vscodeAdapter'; +import { vscode } from '../../vscodeAdapter.ts'; import { Observable, Observer } from 'rxjs'; import { publishBehavior } from 'rxjs/operators'; diff --git a/src/shared/observers/baseChannelObserver.ts b/src/shared/observers/baseChannelObserver.ts index 1942129df4..c856a58d87 100644 --- a/src/shared/observers/baseChannelObserver.ts +++ b/src/shared/observers/baseChannelObserver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../../vscodeAdapter'; -import { BaseEvent } from '../../shared/loggingEvents'; +import * as vscode from '../../vscodeAdapter.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export abstract class BaseChannelObserver { constructor(private channel: vscode.OutputChannel) {} diff --git a/src/shared/observers/baseLoggerObserver.ts b/src/shared/observers/baseLoggerObserver.ts index b6478572cb..63b38f9a17 100644 --- a/src/shared/observers/baseLoggerObserver.ts +++ b/src/shared/observers/baseLoggerObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../../vscodeAdapter'; -import { Logger } from '../../logger'; -import { BaseEvent } from '../../shared/loggingEvents'; +import * as vscode from '../../vscodeAdapter.ts'; +import { Logger } from '../../logger.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export abstract class BaseLoggerObserver { public logger: Logger; diff --git a/src/shared/observers/csharpChannelObserver.ts b/src/shared/observers/csharpChannelObserver.ts index ccc96b39f4..0000d59e74 100644 --- a/src/shared/observers/csharpChannelObserver.ts +++ b/src/shared/observers/csharpChannelObserver.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseChannelObserver } from './baseChannelObserver'; -import { EventType } from '../eventType'; -import { BaseEvent } from '../../shared/loggingEvents'; +import { BaseChannelObserver } from './baseChannelObserver.ts'; +import { EventType } from '../eventType.ts'; +import { BaseEvent } from '../../shared/loggingEvents.ts'; export class CsharpChannelObserver extends BaseChannelObserver { public post = (event: BaseEvent) => { diff --git a/src/shared/observers/csharpLoggerObserver.ts b/src/shared/observers/csharpLoggerObserver.ts index e702586214..3915e1fa24 100644 --- a/src/shared/observers/csharpLoggerObserver.ts +++ b/src/shared/observers/csharpLoggerObserver.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { BaseLoggerObserver } from './baseLoggerObserver'; -import * as Event from '../../shared/loggingEvents'; -import { PackageError } from '../../packageManager/packageError'; -import { EventType } from '../eventType'; +import { BaseLoggerObserver } from './baseLoggerObserver.ts'; +import * as Event from '../../shared/loggingEvents.ts'; +import { PackageError } from '../../packageManager/packageError.ts'; +import { EventType } from '../eventType.ts'; export class CsharpLoggerObserver extends BaseLoggerObserver { private dots = 0; diff --git a/src/shared/observers/optionChangeObserver.ts b/src/shared/observers/optionChangeObserver.ts index b35fb396ec..2da51bc0b7 100644 --- a/src/shared/observers/optionChangeObserver.ts +++ b/src/shared/observers/optionChangeObserver.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Observable } from 'rxjs'; -import Disposable from '../../disposable'; +import Disposable from '../../disposable.ts'; import { isDeepStrictEqual } from 'util'; import { CommonOptions, @@ -13,7 +13,7 @@ import { commonOptions, languageServerOptions, omnisharpOptions, -} from '../options'; +} from '../options.ts'; type RelevantOptionValues = { commonOptions: Map; diff --git a/src/shared/observers/utils/showMessage.ts b/src/shared/observers/utils/showMessage.ts index 6771a5dc98..42bb452d0f 100644 --- a/src/shared/observers/utils/showMessage.ts +++ b/src/shared/observers/utils/showMessage.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { MessageOptions, vscode } from '../../../vscodeAdapter'; +import { MessageOptions, vscode } from '../../../vscodeAdapter.ts'; /** * Show an error message toast. diff --git a/src/shared/platform.ts b/src/shared/platform.ts index de1e48845d..1eee6273f8 100644 --- a/src/shared/platform.ts +++ b/src/shared/platform.ts @@ -7,7 +7,7 @@ import * as crypto from 'crypto'; import * as fs from 'fs'; import * as os from 'os'; import { fileURLToPath } from 'url'; -import * as util from '../common'; +import * as util from '../common.ts'; const unknown = 'unknown'; const currentDirectory = fileURLToPath(new URL('.', import.meta.url)); diff --git a/src/shared/processPicker.ts b/src/shared/processPicker.ts index ffdd9b97ee..3f58545551 100644 --- a/src/shared/processPicker.ts +++ b/src/shared/processPicker.ts @@ -9,8 +9,8 @@ import * as os from 'os'; import * as path from 'path'; import * as vscode from 'vscode'; -import { PlatformInformation } from './platform'; -import { findPowerShell, getExtensionPath } from '../common'; +import { PlatformInformation } from './platform.ts'; +import { findPowerShell, getExtensionPath } from '../common.ts'; export interface AttachItem extends vscode.QuickPickItem { id: string; diff --git a/src/shared/projectConfiguration.ts b/src/shared/projectConfiguration.ts index cd8162a2e5..b1b02d5623 100644 --- a/src/shared/projectConfiguration.ts +++ b/src/shared/projectConfiguration.ts @@ -5,9 +5,9 @@ import * as crypto from 'crypto'; import nodeMachineId from 'node-machine-id'; -import { PlatformInformation } from './platform'; -import { ITelemetryReporter, getTelemetryProps } from './telemetryReporter'; -import { DotnetInfo } from './utils/dotnetInfo'; +import { PlatformInformation } from './platform.ts'; +import { ITelemetryReporter, getTelemetryProps } from './telemetryReporter.ts'; +import { DotnetInfo } from './utils/dotnetInfo.ts'; export interface ProjectConfigurationMessage { ProjectId: string; diff --git a/src/shared/reportIssue.ts b/src/shared/reportIssue.ts index 2645adfa08..4f5a73e40b 100644 --- a/src/shared/reportIssue.ts +++ b/src/shared/reportIssue.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver'; +import { IHostExecutableResolver } from '../shared/constants/IHostExecutableResolver.ts'; import { basename, dirname } from 'path'; -import { DotnetInfo } from './utils/dotnetInfo'; -import { CSharpExtensionId } from '../constants/csharpExtensionId'; -import { commonOptions, LanguageServerOptions, languageServerOptions } from './options'; +import { DotnetInfo } from './utils/dotnetInfo.ts'; +import { CSharpExtensionId } from '../constants/csharpExtensionId.ts'; +import { commonOptions, LanguageServerOptions, languageServerOptions } from './options.ts'; export default async function reportIssue( context: vscode.ExtensionContext, diff --git a/src/shared/telemetryReporter.ts b/src/shared/telemetryReporter.ts index f1533ebced..e2a4dd7baf 100644 --- a/src/shared/telemetryReporter.ts +++ b/src/shared/telemetryReporter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from './platform'; +import { PlatformInformation } from './platform.ts'; export interface ITelemetryReporter { sendTelemetryEvent( diff --git a/src/shared/utils/getDotnetInfo.ts b/src/shared/utils/getDotnetInfo.ts index 69e3c896e6..3c9c9d3a51 100644 --- a/src/shared/utils/getDotnetInfo.ts +++ b/src/shared/utils/getDotnetInfo.ts @@ -5,9 +5,9 @@ import * as semver from 'semver'; import { join } from 'path'; -import { execChildProcess } from '../../common'; -import { CoreClrDebugUtil } from '../../coreclrDebug/util'; -import { DotnetInfo, RuntimeInfo } from './dotnetInfo'; +import { execChildProcess } from '../../common.ts'; +import { CoreClrDebugUtil } from '../../coreclrDebug/util.ts'; +import { DotnetInfo, RuntimeInfo } from './dotnetInfo.ts'; import { EOL } from 'os'; // This function calls `dotnet --info` and returns the result as a DotnetInfo object. diff --git a/src/shared/workspaceConfigurationProvider.ts b/src/shared/workspaceConfigurationProvider.ts index 7c8c55c7ba..87227d03c7 100644 --- a/src/shared/workspaceConfigurationProvider.ts +++ b/src/shared/workspaceConfigurationProvider.ts @@ -13,12 +13,12 @@ import { createAttachConfiguration, createFallbackLaunchConfiguration, getBuildOperations, -} from './assets'; +} from './assets.ts'; import { parse } from 'jsonc-parser'; -import { IWorkspaceDebugInformationProvider } from './IWorkspaceDebugInformationProvider'; -import { PlatformInformation } from './platform'; -import { BaseVsDbgConfigurationProvider } from './configurationProvider'; -import { showErrorMessage } from './observers/utils/showMessage'; +import { IWorkspaceDebugInformationProvider } from './IWorkspaceDebugInformationProvider.ts'; +import { PlatformInformation } from './platform.ts'; +import { BaseVsDbgConfigurationProvider } from './configurationProvider.ts'; +import { showErrorMessage } from './observers/utils/showMessage.ts'; /** * This class will be used for providing debug configurations given workspace information. diff --git a/src/statusBarItemAdapter.ts b/src/statusBarItemAdapter.ts index 5c62196679..c42fe69181 100644 --- a/src/statusBarItemAdapter.ts +++ b/src/statusBarItemAdapter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from './vscodeAdapter'; +import * as vscodeAdapter from './vscodeAdapter.ts'; import * as vscode from 'vscode'; export class StatusBarItemAdapter implements vscodeAdapter.StatusBarItem { diff --git a/src/textEditorAdapter.ts b/src/textEditorAdapter.ts index de9e73b13b..31ac7112c8 100644 --- a/src/textEditorAdapter.ts +++ b/src/textEditorAdapter.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscodeAdapter from './vscodeAdapter'; +import * as vscodeAdapter from './vscodeAdapter.ts'; import * as vscode from 'vscode'; export class TextEditorAdapter implements vscodeAdapter.TextEditor { diff --git a/src/tools/runtimeDependencyPackageUtils.ts b/src/tools/runtimeDependencyPackageUtils.ts index d5342b4e27..62322f0a89 100644 --- a/src/tools/runtimeDependencyPackageUtils.ts +++ b/src/tools/runtimeDependencyPackageUtils.ts @@ -3,10 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { PlatformInformation } from '../shared/platform'; -import { AbsolutePathPackage } from '../packageManager/absolutePathPackage'; -import { filterPlatformPackages } from '../packageManager/packageFilterer'; -import { Package } from '../packageManager/package'; +import { PlatformInformation } from '../shared/platform.ts'; +import { AbsolutePathPackage } from '../packageManager/absolutePathPackage.ts'; +import { filterPlatformPackages } from '../packageManager/packageFilterer.ts'; +import { Package } from '../packageManager/package.ts'; export function getRuntimeDependencyPackageWithId( packageId: string, diff --git a/src/tools/updatePackageDependencies.ts b/src/tools/updatePackageDependencies.ts index dd94414dfb..7aa1d8bf37 100644 --- a/src/tools/updatePackageDependencies.ts +++ b/src/tools/updatePackageDependencies.ts @@ -5,13 +5,13 @@ import * as fs from 'fs'; import * as os from 'os'; -import { Package } from '../packageManager/package'; -import { DownloadFile } from '../packageManager/fileDownloader'; -import { EventStream } from '../eventStream'; -import * as Event from '../shared/loggingEvents'; -import NetworkSettings, { NetworkSettingsProvider } from '../networkSettings'; -import { getBufferIntegrityHash } from '../packageManager/isValidDownload'; -import { EventType } from '../shared/eventType'; +import { Package } from '../packageManager/package.ts'; +import { DownloadFile } from '../packageManager/fileDownloader.ts'; +import { EventStream } from '../eventStream.ts'; +import * as Event from '../shared/loggingEvents.ts'; +import NetworkSettings, { NetworkSettingsProvider } from '../networkSettings.ts'; +import { getBufferIntegrityHash } from '../packageManager/isValidDownload.ts'; +import { EventType } from '../shared/eventType.ts'; interface PackageJSONFile { runtimeDependencies: Package[]; diff --git a/src/utils/dotnetDevCertsHttps.ts b/src/utils/dotnetDevCertsHttps.ts index 9f7a20604f..1f1a851d43 100644 --- a/src/utils/dotnetDevCertsHttps.ts +++ b/src/utils/dotnetDevCertsHttps.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as cp from 'child_process'; -import { getExtensionPath } from '../common'; -import { commonOptions, omnisharpOptions } from '../shared/options'; +import { getExtensionPath } from '../common.ts'; +import { commonOptions, omnisharpOptions } from '../shared/options.ts'; // Will return true if `dotnet dev-certs https --check` succesfully finds a trusted development certificate. export async function hasDotnetDevCertsHttps(): Promise { diff --git a/src/utils/getCSharpDevKit.ts b/src/utils/getCSharpDevKit.ts index fcbcbd9e9c..bca7f69d3f 100644 --- a/src/utils/getCSharpDevKit.ts +++ b/src/utils/getCSharpDevKit.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { CSharpDevKitExports } from '../csharpDevKitExports'; -import { languageServerOptions } from '../shared/options'; +import { CSharpDevKitExports } from '../csharpDevKitExports.ts'; +import { languageServerOptions } from '../shared/options.ts'; export const csharpDevkitExtensionId = 'ms-dotnettools.csdevkit'; export const csharpDevkitIntelliCodeExtensionId = 'ms-dotnettools.vscodeintellicode-csharp'; diff --git a/src/utils/getMonoVersion.ts b/src/utils/getMonoVersion.ts index 55814461e1..ab06680736 100644 --- a/src/utils/getMonoVersion.ts +++ b/src/utils/getMonoVersion.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { spawn } from 'child_process'; -import { IGetMonoVersion } from '../constants/IGetMonoVersion'; +import { IGetMonoVersion } from '../constants/IGetMonoVersion.ts'; export const getMonoVersion: IGetMonoVersion = async (environment: NodeJS.ProcessEnv) => { const versionRegexp = /(\d+\.\d+\.\d+)/; diff --git a/src/utils/getMsBuildInfo.ts b/src/utils/getMsBuildInfo.ts index fe608c73f1..3618534a83 100644 --- a/src/utils/getMsBuildInfo.ts +++ b/src/utils/getMsBuildInfo.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { join } from 'path'; -import { execChildProcess } from '../common'; -import { CoreClrDebugUtil } from '../coreclrDebug/util'; +import { execChildProcess } from '../common.ts'; +import { CoreClrDebugUtil } from '../coreclrDebug/util.ts'; let _msbuildVersion: string | undefined; diff --git a/tasks/compilation/copyEsmSupportFiles.ts b/tasks/compilation/copyEsmSupportFiles.ts index 921b2fd102..760b9e1ece 100644 --- a/tasks/compilation/copyEsmSupportFiles.ts +++ b/tasks/compilation/copyEsmSupportFiles.ts @@ -5,7 +5,7 @@ import { copyFile, mkdir } from 'fs/promises'; import path from 'path'; -import { outPath, rootPath } from '../projectPaths'; +import { outPath, rootPath } from '../projectPaths.ts'; const outputTestPath = path.join(outPath, 'test'); await mkdir(outputTestPath, { recursive: true }); diff --git a/tasks/components/publishRoslynCopilot.ts b/tasks/components/publishRoslynCopilot.ts index 37f9169698..9fbdd645b3 100644 --- a/tasks/components/publishRoslynCopilot.ts +++ b/tasks/components/publishRoslynCopilot.ts @@ -14,9 +14,9 @@ import { createPullRequest, doesBranchExist, findPRByTitle, -} from '../gitTasks'; -import { updatePackageDependencies } from '../../src/tools/updatePackageDependencies'; -import { runTask } from '../runTask'; +} from '../gitTasks.ts'; +import { updatePackageDependencies } from '../../src/tools/updatePackageDependencies.ts'; +import { runTask } from '../runTask.ts'; type Options = { userName?: string; diff --git a/tasks/debugger/fixLocUrls.ts b/tasks/debugger/fixLocUrls.ts index 05b93dc23a..dcfd76828c 100644 --- a/tasks/debugger/fixLocUrls.ts +++ b/tasks/debugger/fixLocUrls.ts @@ -5,7 +5,7 @@ import * as fs from 'fs'; import * as os from 'os'; -import { runTask } from '../runTask'; +import { runTask } from '../runTask.ts'; runTask(fixLocUrls); diff --git a/tasks/debugger/generateOptionsSchema.ts b/tasks/debugger/generateOptionsSchema.ts index 82452807c5..d19883eeb7 100644 --- a/tasks/debugger/generateOptionsSchema.ts +++ b/tasks/debugger/generateOptionsSchema.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as optionsSchemaGenerator from '../../src/tools/generateOptionsSchema'; -import { runTask } from '../runTask'; +import * as optionsSchemaGenerator from '../../src/tools/generateOptionsSchema.ts'; +import { runTask } from '../runTask.ts'; runTask(optionsSchemaGenerator.GenerateOptionsSchema); diff --git a/tasks/debugger/updatePackageDependencies.ts b/tasks/debugger/updatePackageDependencies.ts index 4b68bf66cb..e1944165d4 100644 --- a/tasks/debugger/updatePackageDependencies.ts +++ b/tasks/debugger/updatePackageDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as packageDependencyUpdater from '../../src/tools/updatePackageDependencies'; -import { runTask } from '../runTask'; +import * as packageDependencyUpdater from '../../src/tools/updatePackageDependencies.ts'; +import { runTask } from '../runTask.ts'; runTask(packageDependencyUpdater.updatePackageDependencies); diff --git a/tasks/localization/publishLocalizationContent.ts b/tasks/localization/publishLocalizationContent.ts index 7939328368..2b8a9bb261 100644 --- a/tasks/localization/publishLocalizationContent.ts +++ b/tasks/localization/publishLocalizationContent.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import * as util from 'node:util'; import { EOL } from 'node:os'; import { Octokit } from '@octokit/rest'; -import { runTask } from '../runTask'; +import { runTask } from '../runTask.ts'; type Options = { userName?: string; diff --git a/tasks/packaging/installDependencies.ts b/tasks/packaging/installDependencies.ts index 0f1cf530bb..15255ddf1e 100644 --- a/tasks/packaging/installDependencies.ts +++ b/tasks/packaging/installDependencies.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { installDependencies } from './offlinePackagingTasks'; -import { runTask } from '../runTask'; +import { installDependencies } from './offlinePackagingTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(installDependencies); diff --git a/tasks/packaging/installDependenciesClean.ts b/tasks/packaging/installDependenciesClean.ts index cbb8b10d0f..6f6d605805 100644 --- a/tasks/packaging/installDependenciesClean.ts +++ b/tasks/packaging/installDependenciesClean.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { installDependencies } from './offlinePackagingTasks'; -import { runTask } from '../runTask'; +import { installDependencies } from './offlinePackagingTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(async () => installDependencies(/* clean */ true)); diff --git a/tasks/packaging/offlinePackagingTasks.ts b/tasks/packaging/offlinePackagingTasks.ts index a297b4ddae..a3fef4e4d6 100644 --- a/tasks/packaging/offlinePackagingTasks.ts +++ b/tasks/packaging/offlinePackagingTasks.ts @@ -7,14 +7,14 @@ import * as cp from 'child_process'; import * as fs from 'fs'; import fsextra from 'fs-extra'; import * as nbgv from 'nerdbank-gitversioning'; -import { Logger } from '../../src/logger'; -import { PlatformInformation } from '../../src/shared/platform'; -import { CsharpLoggerObserver } from '../../src/shared/observers/csharpLoggerObserver'; -import { EventStream } from '../../src/eventStream'; -import NetworkSettings from '../../src/networkSettings'; -import { downloadAndInstallPackages } from '../../src/packageManager/downloadAndInstallPackages'; -import { getRuntimeDependenciesPackages } from '../../src/tools/runtimeDependencyPackageUtils'; -import { getAbsolutePathPackagesToInstall } from '../../src/packageManager/getAbsolutePathPackagesToInstall'; +import { Logger } from '../../src/logger.ts'; +import { PlatformInformation } from '../../src/shared/platform.ts'; +import { CsharpLoggerObserver } from '../../src/shared/observers/csharpLoggerObserver.ts'; +import { EventStream } from '../../src/eventStream.ts'; +import NetworkSettings from '../../src/networkSettings.ts'; +import { downloadAndInstallPackages } from '../../src/packageManager/downloadAndInstallPackages.ts'; +import { getRuntimeDependenciesPackages } from '../../src/tools/runtimeDependencyPackageUtils.ts'; +import { getAbsolutePathPackagesToInstall } from '../../src/packageManager/getAbsolutePathPackagesToInstall.ts'; import { codeExtensionPath, packedVsixOutputRoot, @@ -24,10 +24,10 @@ import { devKitDependenciesDirectory, xamlToolsDirectory, testDiscoveryDirectory, -} from '../projectPaths'; -import { getPackageJSON } from '../packageJson'; -import { createPackageAsync, generateVsixManifest } from './vsceTasks'; -import { isValidDownload } from '../../src/packageManager/isValidDownload'; +} from '../projectPaths.ts'; +import { getPackageJSON } from '../packageJson.ts'; +import { createPackageAsync, generateVsixManifest } from './vsceTasks.ts'; +import { isValidDownload } from '../../src/packageManager/isValidDownload.ts'; import path from 'path'; import { CancellationToken } from 'vscode'; diff --git a/tasks/packaging/updateRoslynVersion.ts b/tasks/packaging/updateRoslynVersion.ts index 78177d2fc2..8c615c19db 100644 --- a/tasks/packaging/updateRoslynVersion.ts +++ b/tasks/packaging/updateRoslynVersion.ts @@ -8,9 +8,9 @@ import { allNugetPackages, installDependencies, updateNugetPackageVersion, -} from './offlinePackagingTasks'; -import { runTask } from '../runTask'; -import { getPackageJSON } from '../packageJson'; +} from './offlinePackagingTasks.ts'; +import { runTask } from '../runTask.ts'; +import { getPackageJSON } from '../packageJson.ts'; runTask(updateRoslynVersion); diff --git a/tasks/packaging/vsceTasks.ts b/tasks/packaging/vsceTasks.ts index 787212fff5..930437e01f 100644 --- a/tasks/packaging/vsceTasks.ts +++ b/tasks/packaging/vsceTasks.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as path from 'path'; -import * as util from '../../src/common'; +import * as util from '../../src/common.ts'; import * as fs from 'fs'; -import spawnNode from '../spawnNode'; -import { vscePath } from '../projectPaths'; +import spawnNode from '../spawnNode.ts'; +import { vscePath } from '../projectPaths.ts'; /// Packaging (VSIX) Tasks export async function createPackageAsync( diff --git a/tasks/packaging/vsixReleasePackage.ts b/tasks/packaging/vsixReleasePackage.ts index 17e238f6de..08a37a1491 100644 --- a/tasks/packaging/vsixReleasePackage.ts +++ b/tasks/packaging/vsixReleasePackage.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import minimist from 'minimist'; -import { vsixReleasePackageTask } from './offlinePackagingTasks'; -import { runTask } from '../runTask'; +import { vsixReleasePackageTask } from './offlinePackagingTasks.ts'; +import { runTask } from '../runTask.ts'; const argv = minimist(process.argv.slice(2)); runTask(async () => await vsixReleasePackageTask(!!argv.prerelease)); diff --git a/tasks/profiling/profiling.ts b/tasks/profiling/profiling.ts index f6ccaea6d1..85d158026d 100644 --- a/tasks/profiling/profiling.ts +++ b/tasks/profiling/profiling.ts @@ -5,10 +5,10 @@ import fs from 'fs'; import * as path from 'path'; -import { basicSlnTestProject, runIntegrationTest } from '../tests/testHelpers'; -import { outPath } from '../projectPaths'; +import { basicSlnTestProject, runIntegrationTest } from '../tests/testHelpers.ts'; +import { outPath } from '../projectPaths.ts'; import { execSync } from 'child_process'; -import { runTask } from '../runTask'; +import { runTask } from '../runTask.ts'; const profilingOutputFolder = path.join(outPath, 'profiling'); diff --git a/tasks/projectPaths.ts b/tasks/projectPaths.ts index 28398a78de..9b34483b50 100644 --- a/tasks/projectPaths.ts +++ b/tasks/projectPaths.ts @@ -5,8 +5,8 @@ import * as path from 'path'; import { fileURLToPath } from 'url'; -import { commandLineOptions } from './commandLineArguments'; -import { componentInfo } from '../src/lsptoolshost/extensions/builtInComponents'; +import { commandLineOptions } from './commandLineArguments.ts'; +import { componentInfo } from '../src/lsptoolshost/extensions/builtInComponents.ts'; export const rootPath = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'); diff --git a/tasks/signing/installSignPlugin.ts b/tasks/signing/installSignPlugin.ts index 3a3ad49344..13770e14ef 100644 --- a/tasks/signing/installSignPlugin.ts +++ b/tasks/signing/installSignPlugin.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths'; -import { execDotnet } from './signingTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.ts'; +import { execDotnet } from './signingTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(installSignPlugin); diff --git a/tasks/signing/signJs.ts b/tasks/signing/signJs.ts index 91bc89969a..a2d1b0c32c 100644 --- a/tasks/signing/signJs.ts +++ b/tasks/signing/signJs.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths'; -import { execDotnet, getLogPath } from './signingTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.ts'; +import { execDotnet, getLogPath } from './signingTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(signJs); diff --git a/tasks/signing/signVsix.ts b/tasks/signing/signVsix.ts index e38c05dd10..84a6f116db 100644 --- a/tasks/signing/signVsix.ts +++ b/tasks/signing/signVsix.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { rootPath } from '../projectPaths'; -import { execDotnet, getLogPath } from './signingTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.ts'; +import { execDotnet, getLogPath } from './signingTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(signVsix); diff --git a/tasks/signing/signingTasks.ts b/tasks/signing/signingTasks.ts index 19db4aaff3..26112189ba 100644 --- a/tasks/signing/signingTasks.ts +++ b/tasks/signing/signingTasks.ts @@ -5,7 +5,7 @@ import * as cp from 'child_process'; import * as fs from 'fs'; -import { rootPath } from '../projectPaths'; +import { rootPath } from '../projectPaths.ts'; import path from 'path'; export function getLogPath(): string { diff --git a/tasks/signing/verifyVsix.ts b/tasks/signing/verifyVsix.ts index d5eab1f3cf..96d99349b8 100644 --- a/tasks/signing/verifyVsix.ts +++ b/tasks/signing/verifyVsix.ts @@ -5,8 +5,8 @@ import * as fs from 'fs'; import path from 'path'; -import { verifySignature } from '../packaging/vsceTasks'; -import { runTask } from '../runTask'; +import { verifySignature } from '../packaging/vsceTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(verifyVsix); diff --git a/tasks/snap/incrementVersion.ts b/tasks/snap/incrementVersion.ts index 0489adf690..8ab0199d1e 100644 --- a/tasks/snap/incrementVersion.ts +++ b/tasks/snap/incrementVersion.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import minimist from 'minimist'; -import { addChangelogSection, getNextReleaseVersion, readVersionJson, writeVersionJson } from './snapTasks'; -import { runTask } from '../runTask'; +import { addChangelogSection, getNextReleaseVersion, readVersionJson, writeVersionJson } from './snapTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(incrementVersion); diff --git a/tasks/snap/snapTasks.ts b/tasks/snap/snapTasks.ts index d7c3e3a7f0..fa6d46bc07 100644 --- a/tasks/snap/snapTasks.ts +++ b/tasks/snap/snapTasks.ts @@ -6,7 +6,7 @@ import * as fs from 'fs'; import * as path from 'path'; import * as os from 'os'; -import { rootPath } from '../projectPaths'; +import { rootPath } from '../projectPaths.ts'; /** * Calculate the next release (stable) version from the current version. diff --git a/tasks/snap/updateChangelog.ts b/tasks/snap/updateChangelog.ts index dd8f23f25c..701f0869d2 100644 --- a/tasks/snap/updateChangelog.ts +++ b/tasks/snap/updateChangelog.ts @@ -8,9 +8,9 @@ import * as path from 'path'; import * as os from 'os'; import { exec } from 'child_process'; import { promisify } from 'util'; -import { rootPath } from '../projectPaths'; -import { findTagsByVersion } from '../gitTasks'; -import { runTask } from '../runTask'; +import { rootPath } from '../projectPaths.ts'; +import { findTagsByVersion } from '../gitTasks.ts'; +import { runTask } from '../runTask.ts'; const execAsync = promisify(exec); const prRegex = /^\*.+\(PR: \[#(\d+)\]\(/; diff --git a/tasks/snap/updateVersionForStableRelease.ts b/tasks/snap/updateVersionForStableRelease.ts index 461d9df58f..bd69759854 100644 --- a/tasks/snap/updateVersionForStableRelease.ts +++ b/tasks/snap/updateVersionForStableRelease.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { readVersionJson, getNextReleaseVersion, writeVersionJson, addChangelogSection } from './snapTasks'; -import { runTask } from '../runTask'; +import { readVersionJson, getNextReleaseVersion, writeVersionJson, addChangelogSection } from './snapTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(updateVersionForStableRelease); diff --git a/tasks/spawnNode.ts b/tasks/spawnNode.ts index 5ea1987308..bf544e6908 100644 --- a/tasks/spawnNode.ts +++ b/tasks/spawnNode.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { spawnSync, SpawnSyncOptions } from 'child_process'; -import { nodePath, rootPath } from './projectPaths'; +import { nodePath, rootPath } from './projectPaths.ts'; export default async function spawnNode(args?: string[], options?: SpawnSyncOptions) { if (!options) { diff --git a/tasks/tags/createTags.ts b/tasks/tags/createTags.ts index 8b010cd5d8..bd8edca9f9 100644 --- a/tasks/tags/createTags.ts +++ b/tasks/tags/createTags.ts @@ -7,11 +7,11 @@ import * as fs from 'fs'; import { spawnSync } from 'child_process'; import minimist from 'minimist'; import { Octokit } from '@octokit/rest'; -import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from '../packaging/offlinePackagingTasks'; -import { PlatformInformation } from '../../src/shared/platform'; +import { allNugetPackages, NugetPackageInfo, platformSpecificPackages } from '../packaging/offlinePackagingTasks.ts'; +import { PlatformInformation } from '../../src/shared/platform.ts'; import path from 'path'; -import { runTask } from '../runTask'; -import { rootPath } from '../projectPaths'; +import { runTask } from '../runTask.ts'; +import { rootPath } from '../projectPaths.ts'; runTask(createTags); diff --git a/tasks/tests/omnisharptest.ts b/tasks/tests/omnisharptest.ts index f7cfcf0422..62e0d83ed6 100644 --- a/tasks/tests/omnisharptest.ts +++ b/tasks/tests/omnisharptest.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestIntegration, omnisharpTestUnit } from './omnisharptestTasks'; -import { runTask } from '../runTask'; +import { omnisharpTestIntegration, omnisharpTestUnit } from './omnisharptestTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(omnisharpTest); diff --git a/tasks/tests/omnisharptestIntegration.ts b/tasks/tests/omnisharptestIntegration.ts index 5a537d7528..150a4ee638 100644 --- a/tasks/tests/omnisharptestIntegration.ts +++ b/tasks/tests/omnisharptestIntegration.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestIntegration } from './omnisharptestTasks'; -import { runTask } from '../runTask'; +import { omnisharpTestIntegration } from './omnisharptestTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(omnisharpTestIntegration); diff --git a/tasks/tests/omnisharptestTasks.ts b/tasks/tests/omnisharptestTasks.ts index c47670eef0..ed5357b1dc 100644 --- a/tasks/tests/omnisharptestTasks.ts +++ b/tasks/tests/omnisharptestTasks.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { codeExtensionPath, rootPath } from '../projectPaths'; -import { runJestIntegrationTest, runJestTest } from './testHelpers'; +import { codeExtensionPath, rootPath } from '../projectPaths.ts'; +import { runJestIntegrationTest, runJestTest } from './testHelpers.ts'; import { jestProjectNames } from '../../test/jestProjectNames.mjs'; const omnisharpIntegrationTestProjects = ['singleCsproj', 'slnWithCsproj', 'slnFilterWithCsproj', 'BasicRazorApp2_1']; diff --git a/tasks/tests/omnisharptestUnit.ts b/tasks/tests/omnisharptestUnit.ts index 49dc4d9f37..e3e395325f 100644 --- a/tasks/tests/omnisharptestUnit.ts +++ b/tasks/tests/omnisharptestUnit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { omnisharpTestUnit } from './omnisharptestTasks'; -import { runTask } from '../runTask'; +import { omnisharpTestUnit } from './omnisharptestTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(omnisharpTestUnit); diff --git a/tasks/tests/test.ts b/tasks/tests/test.ts index 3491d03160..bd6efc6c18 100644 --- a/tasks/tests/test.ts +++ b/tasks/tests/test.ts @@ -10,8 +10,8 @@ import { testIntegrationRazorCohost, testIntegrationUntrusted, testUnit, -} from './testTasks'; -import { runTask } from '../runTask'; +} from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(test); diff --git a/tasks/tests/testArtifacts.ts b/tasks/tests/testArtifacts.ts index 0612f2625d..211393f9f1 100644 --- a/tasks/tests/testArtifacts.ts +++ b/tasks/tests/testArtifacts.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testArtifacts } from './testTasks'; -import { runTask } from '../runTask'; +import { testArtifacts } from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(testArtifacts); diff --git a/tasks/tests/testHelpers.ts b/tasks/tests/testHelpers.ts index 07bcc700dd..4fe4782c01 100644 --- a/tasks/tests/testHelpers.ts +++ b/tasks/tests/testHelpers.ts @@ -7,8 +7,8 @@ import fs from 'fs'; import * as path from 'path'; import jest from 'jest'; import { Config } from '@jest/types'; -import { rootPath, outPath } from '../projectPaths'; -import { prepareVSCodeAndExecuteTests } from '../../test/vscodeLauncher'; +import { rootPath, outPath } from '../projectPaths.ts'; +import { prepareVSCodeAndExecuteTests } from '../../test/vscodeLauncher.ts'; export const basicSlnTestProject = 'slnWithCsproj'; export const integrationTestProjects = [basicSlnTestProject]; diff --git a/tasks/tests/testIntegrationCsharp.ts b/tasks/tests/testIntegrationCsharp.ts index 249988b14e..9e2e14430d 100644 --- a/tasks/tests/testIntegrationCsharp.ts +++ b/tasks/tests/testIntegrationCsharp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationCSharp } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationCSharp } from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(testIntegrationCSharp); diff --git a/tasks/tests/testIntegrationDevkit.ts b/tasks/tests/testIntegrationDevkit.ts index c47c15560f..456a55a0aa 100644 --- a/tasks/tests/testIntegrationDevkit.ts +++ b/tasks/tests/testIntegrationDevkit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationDevkit } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationDevkit } from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(testIntegrationDevkit); diff --git a/tasks/tests/testIntegrationRazorCohost.ts b/tasks/tests/testIntegrationRazorCohost.ts index fa3585734b..e505c0882f 100644 --- a/tasks/tests/testIntegrationRazorCohost.ts +++ b/tasks/tests/testIntegrationRazorCohost.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationRazorCohost } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationRazorCohost } from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(testIntegrationRazorCohost); diff --git a/tasks/tests/testIntegrationUntrusted.ts b/tasks/tests/testIntegrationUntrusted.ts index d17e7baaa4..168318e4fe 100644 --- a/tasks/tests/testIntegrationUntrusted.ts +++ b/tasks/tests/testIntegrationUntrusted.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testIntegrationUntrusted } from './testTasks'; -import { runTask } from '../runTask'; +import { testIntegrationUntrusted } from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(testIntegrationUntrusted); diff --git a/tasks/tests/testTasks.ts b/tasks/tests/testTasks.ts index 2525958b18..93f5f2c424 100644 --- a/tasks/tests/testTasks.ts +++ b/tasks/tests/testTasks.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import path from 'path'; -import { integrationTestProjects, runDevKitIntegrationTests, runIntegrationTest, runJestTest } from './testHelpers'; +import { integrationTestProjects, runDevKitIntegrationTests, runIntegrationTest, runJestTest } from './testHelpers.ts'; import { jestProjectNames } from '../../test/jestProjectNames.mjs'; const razorIntegrationTestProjects = ['RazorApp']; diff --git a/tasks/tests/testUnit.ts b/tasks/tests/testUnit.ts index a1a25d13e2..d672ae7dbd 100644 --- a/tasks/tests/testUnit.ts +++ b/tasks/tests/testUnit.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { testUnit } from './testTasks'; -import { runTask } from '../runTask'; +import { testUnit } from './testTasks.ts'; +import { runTask } from '../runTask.ts'; runTask(testUnit); diff --git a/test/createTmpAsset.ts b/test/createTmpAsset.ts index 49cf447ca2..f520debae9 100644 --- a/test/createTmpAsset.ts +++ b/test/createTmpAsset.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as tmp from 'tmp'; import fsExtra from 'fs-extra'; -import { NestedError } from '../src/nestedError'; +import { NestedError } from '../src/nestedError.ts'; export async function CreateTmpFile(): Promise { const tmpFile = await new Promise((resolve, reject) => { diff --git a/test/fakes.ts b/test/fakes.ts index da06b10f41..579e4949d5 100644 --- a/test/fakes.ts +++ b/test/fakes.ts @@ -3,15 +3,15 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import * as vscode from '../src/vscodeAdapter'; -import * as protocol from '../src/omnisharp/protocol'; -import { ITelemetryReporter } from '../src/shared/telemetryReporter'; +import * as vscode from '../src/vscodeAdapter.ts'; +import * as protocol from '../src/omnisharp/protocol.ts'; +import { ITelemetryReporter } from '../src/shared/telemetryReporter.ts'; import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnError, OmnisharpServerUnresolvedDependencies, WorkspaceInformationUpdated, -} from '../src/omnisharp/omnisharpLoggingEvents'; +} from '../src/omnisharp/omnisharpLoggingEvents.ts'; export const getNullChannel = (): vscode.OutputChannel => { const returnChannel: vscode.OutputChannel = { diff --git a/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts index 7d49a91670..fbb8b16c43 100644 --- a/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/buildDiagnostics.integration.test.ts @@ -5,12 +5,12 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeAll, afterAll, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { AnalysisSetting, BuildDiagnosticsService, -} from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; -import * as integrationHelpers from './integrationHelpers'; +} from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.ts'; +import * as integrationHelpers from './integrationHelpers.ts'; import path from 'path'; describe(`Build and live diagnostics dedupe`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/classification.integration.test.ts b/test/lsptoolshost/integrationTests/classification.integration.test.ts index eeb454debd..44c0c7cfa3 100644 --- a/test/lsptoolshost/integrationTests/classification.integration.test.ts +++ b/test/lsptoolshost/integrationTests/classification.integration.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Classification Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/codeactions.integration.test.ts b/test/lsptoolshost/integrationTests/codeactions.integration.test.ts index e4b0c90bb5..b43b631f8e 100644 --- a/test/lsptoolshost/integrationTests/codeactions.integration.test.ts +++ b/test/lsptoolshost/integrationTests/codeactions.integration.test.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; describe(`Code Actions Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/codelens.integration.test.ts b/test/lsptoolshost/integrationTests/codelens.integration.test.ts index 7af16faa2c..4c410f65d8 100644 --- a/test/lsptoolshost/integrationTests/codelens.integration.test.ts +++ b/test/lsptoolshost/integrationTests/codelens.integration.test.ts @@ -7,13 +7,13 @@ import * as lsp from 'vscode-languageclient'; import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, getCodeLensesAsync, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; describe(`CodeLens Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts b/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts index c84d995fb1..10ca5de019 100644 --- a/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts +++ b/test/lsptoolshost/integrationTests/commandEnablement.integration.test.ts @@ -5,14 +5,14 @@ import { expect, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, testIfCSharp, testIfDevKit } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { activateCSharpExtension, testIfCSharp, testIfDevKit } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { RoslynDevKitCommands, RoslynStandaloneCommands, UnexpectedRoslynDevKitCommands, UnexpectedRoslynStandaloneCommands, -} from './expectedCommands'; +} from './expectedCommands.ts'; describe(`Command Enablement Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/completion.integration.test.ts b/test/lsptoolshost/integrationTests/completion.integration.test.ts index 4924a9a99a..3b28517bc7 100644 --- a/test/lsptoolshost/integrationTests/completion.integration.test.ts +++ b/test/lsptoolshost/integrationTests/completion.integration.test.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, getCompletionsAsync, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; describe(`Completion Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts b/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts index fbf6f2fae7..3cb6b3383f 100644 --- a/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts +++ b/test/lsptoolshost/integrationTests/diagnosticsHelpers.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; import { expect } from '@jest/globals'; -import { restartLanguageServer, waitForExpectedResult } from './integrationHelpers'; +import { restartLanguageServer, waitForExpectedResult } from './integrationHelpers.ts'; function sortDiagnostics(diagnostics: vscode.Diagnostic[]): vscode.Diagnostic[] { return diagnostics.sort((a, b) => { diff --git a/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts index 149d6e6b5b..558cd26c6f 100644 --- a/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/documentDiagnostics.integration.test.ts @@ -5,16 +5,16 @@ import * as vscode from 'vscode'; import { describe, test, beforeAll, afterAll, expect, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.ts'; import path from 'path'; -import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers'; +import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers.ts'; import { activateCSharpExtension, closeAllEditorsAsync, describeIfCSharp, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; // Restarting the server is required for these tests, but not supported with C# Dev Kit. describeIfCSharp(`Document Diagnostics Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts b/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts index bfe1022cd5..6f659af0bf 100644 --- a/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts +++ b/test/lsptoolshost/integrationTests/documentSymbolProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll, describe, afterEach, beforeEach } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.ts'; describe(`Document Symbol Tests`, () => { let fileUri: vscode.Uri; diff --git a/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts b/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts index 362118b3c6..467009639f 100644 --- a/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts +++ b/test/lsptoolshost/integrationTests/fileBasedPrograms.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -15,9 +15,9 @@ import { waitForAllAsyncOperationsAsync, waitForExpectedResult, describeIfFileBasedPrograms, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; +import { CSharpExtensionExports } from '../../../src/csharpExtensionExports.ts'; describeIfFileBasedPrograms(`File-based Programs Tests`, () => { let exports: CSharpExtensionExports; diff --git a/test/lsptoolshost/integrationTests/formatting.integration.test.ts b/test/lsptoolshost/integrationTests/formatting.integration.test.ts index 8549717ec6..9b06957d8c 100644 --- a/test/lsptoolshost/integrationTests/formatting.integration.test.ts +++ b/test/lsptoolshost/integrationTests/formatting.integration.test.ts @@ -5,15 +5,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { describe, beforeEach, afterAll, test, afterEach } from '@jest/globals'; -import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers'; +import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers.ts'; describe(`Formatting Tests`, () => { beforeEach(async () => { diff --git a/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts b/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts index 67452574e1..20e27e770d 100644 --- a/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts +++ b/test/lsptoolshost/integrationTests/formattingEditorConfig.integration.test.ts @@ -5,15 +5,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, expectText, openFileInWorkspaceAsync, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, afterEach } from '@jest/globals'; -import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers'; +import { formatDocumentAsync, formatOnTypeAsync, formatRangeAsync } from './formattingTestHelpers.ts'; describe(`Formatting With EditorConfig Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts b/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts index 6de7304141..a0e8b0fd77 100644 --- a/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts +++ b/test/lsptoolshost/integrationTests/gotoDefinition.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -14,7 +14,7 @@ import { openFileInWorkspaceAsync, testIfCSharp, testIfDevKit, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; /** diff --git a/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts b/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts index f62d694932..f4b40b43de 100644 --- a/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts +++ b/test/lsptoolshost/integrationTests/gotoImplementation.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, sortLocations, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Go To Implementation Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/hover.integration.test.ts b/test/lsptoolshost/integrationTests/hover.integration.test.ts index ff9a3a3182..73266b1699 100644 --- a/test/lsptoolshost/integrationTests/hover.integration.test.ts +++ b/test/lsptoolshost/integrationTests/hover.integration.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { EOL } from 'os'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Hover Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/index.ts b/test/lsptoolshost/integrationTests/index.ts index d989f4a934..9e8cfed6e4 100644 --- a/test/lsptoolshost/integrationTests/index.ts +++ b/test/lsptoolshost/integrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests.js'; +import { runIntegrationTests } from '../../runIntegrationTests.ts'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/lsptoolshost/integrationTests/integrationHelpers.ts b/test/lsptoolshost/integrationTests/integrationHelpers.ts index 4f87296490..f360dc06a2 100644 --- a/test/lsptoolshost/integrationTests/integrationHelpers.ts +++ b/test/lsptoolshost/integrationTests/integrationHelpers.ts @@ -6,13 +6,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; import * as semver from 'semver'; -import { CSharpExtensionExports } from '../../../src/csharpExtensionExports'; +import { CSharpExtensionExports } from '../../../src/csharpExtensionExports.ts'; import { existsSync } from 'fs'; -import { ServerState } from '../../../src/lsptoolshost/server/languageServerEvents'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import { ServerState } from '../../../src/lsptoolshost/server/languageServerEvents.ts'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { EOL, platform } from 'os'; import { describe, expect, test } from '@jest/globals'; -import { WaitForAsyncOperationsRequest } from './testHooks'; +import { WaitForAsyncOperationsRequest } from './testHooks.ts'; export async function activateCSharpExtension(): Promise { const csharpExtension = vscode.extensions.getExtension('ms-dotnettools.csharp'); diff --git a/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts b/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts index 678023f11f..2a4ee48af6 100644 --- a/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts +++ b/test/lsptoolshost/integrationTests/lspInlayHints.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { describe, beforeAll, afterAll, test, expect, beforeEach, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import * as integrationHelpers from './integrationHelpers.ts'; import { InlayHint, InlayHintKind, Position } from 'vscode-languageclient'; describe(`Inlay Hints Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts b/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts index 59717573af..d6acc8f749 100644 --- a/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts +++ b/test/lsptoolshost/integrationTests/onAutoInsert.integration.test.ts @@ -5,14 +5,14 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, revertActiveFile, waitForExpectedResult, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; import { EOL } from 'os'; diff --git a/test/lsptoolshost/integrationTests/references.integration.test.ts b/test/lsptoolshost/integrationTests/references.integration.test.ts index f17706c7eb..e1ecdcd6ab 100644 --- a/test/lsptoolshost/integrationTests/references.integration.test.ts +++ b/test/lsptoolshost/integrationTests/references.integration.test.ts @@ -5,13 +5,13 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync, sortLocations, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Find References Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts b/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts index 92d0f41117..f68a21312d 100644 --- a/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts +++ b/test/lsptoolshost/integrationTests/signatureHelp.integration.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import { activateCSharpExtension, closeAllEditorsAsync, openFileInWorkspaceAsync } from './integrationHelpers.ts'; import { describe, beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; describe(`Signature Help Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts b/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts index 3acd32e37e..eacfe3584d 100644 --- a/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts +++ b/test/lsptoolshost/integrationTests/sourceGenerator.integration.test.ts @@ -5,7 +5,7 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, @@ -13,7 +13,7 @@ import { openFileInWorkspaceAsync, sleep, sortLocations, -} from './integrationHelpers'; +} from './integrationHelpers.ts'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach, describe } from '@jest/globals'; describe(`Source Generator Tests`, () => { diff --git a/test/lsptoolshost/integrationTests/testAssets/razorApp.ts b/test/lsptoolshost/integrationTests/testAssets/razorApp.ts index 7692d29fe8..a65888645b 100644 --- a/test/lsptoolshost/integrationTests/testAssets/razorApp.ts +++ b/test/lsptoolshost/integrationTests/testAssets/razorApp.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.ts'; const workspace: ITestAssetWorkspace = { description: 'Razor App', diff --git a/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts index f53fabdbaf..550ce8232b 100644 --- a/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/singleCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.ts'; const workspace: ITestAssetWorkspace = { description: 'single csproj at root of workspace', diff --git a/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts index 6e9d9ba449..b3fcdac743 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.ts'; const workspace: ITestAssetWorkspace = { description: "sln filter with a csproj's", diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts index 4973fface7..9e67da8f2c 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.ts'; const workspace: ITestAssetWorkspace = { description: "sln with several csproj's", diff --git a/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts b/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts index 79a221f780..9fe370615f 100644 --- a/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts +++ b/test/lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace } from './testAssets.ts'; const workspace: ITestAssetWorkspace = { description: 'sln with a source generator', diff --git a/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts b/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts index 842ab375ce..241a1467a3 100644 --- a/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts +++ b/test/lsptoolshost/integrationTests/testAssets/testAssetWorkspace.ts @@ -6,13 +6,13 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { ITestAssetWorkspace, TestAssetWorkspace } from './testAssets'; +import { ITestAssetWorkspace, TestAssetWorkspace } from './testAssets.ts'; -import singleCsproj from './singleCsproj'; -import slnWithCsproj from './slnWithCsproj'; -import slnFilterWithCsproj from './slnFilterWithCsproj'; -import RazorApp from './razorApp'; -import slnWithGenerator from './slnWithGenerator'; +import singleCsproj from './singleCsproj.ts'; +import slnWithCsproj from './slnWithCsproj.ts'; +import slnFilterWithCsproj from './slnFilterWithCsproj.ts'; +import RazorApp from './razorApp.ts'; +import slnWithGenerator from './slnWithGenerator.ts'; const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { singleCsproj, diff --git a/test/lsptoolshost/integrationTests/testAssets/testAssets.ts b/test/lsptoolshost/integrationTests/testAssets/testAssets.ts index 0cf326067c..c019cfd4c5 100644 --- a/test/lsptoolshost/integrationTests/testAssets/testAssets.ts +++ b/test/lsptoolshost/integrationTests/testAssets/testAssets.ts @@ -6,8 +6,8 @@ import fs from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; -import spawnGit from './spawnGit'; -import { execChildProcess } from '../../../../src/common'; +import spawnGit from './spawnGit.ts'; +import { execChildProcess } from '../../../../src/common.ts'; export class TestAssetProject { constructor(project: ITestAssetProject) { diff --git a/test/lsptoolshost/integrationTests/unitTests.integration.test.ts b/test/lsptoolshost/integrationTests/unitTests.integration.test.ts index 8753a65607..a2d80ede0f 100644 --- a/test/lsptoolshost/integrationTests/unitTests.integration.test.ts +++ b/test/lsptoolshost/integrationTests/unitTests.integration.test.ts @@ -6,15 +6,15 @@ import * as vscode from 'vscode'; import * as path from 'path'; import { beforeAll, beforeEach, afterAll, test, expect, afterEach } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; import { activateCSharpExtension, closeAllEditorsAsync, describeIfCSharp, getCodeLensesAsync, openFileInWorkspaceAsync, -} from './integrationHelpers'; -import { TestProgress } from '../../../src/lsptoolshost/server/roslynProtocol'; +} from './integrationHelpers.ts'; +import { TestProgress } from '../../../src/lsptoolshost/server/roslynProtocol.ts'; describeIfCSharp(`Unit Testing Tests`, () => { beforeAll(async () => { diff --git a/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts b/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts index 50388aa0b7..93d6d8a6ca 100644 --- a/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts +++ b/test/lsptoolshost/integrationTests/workspaceDiagnostics.integration.test.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeAll, afterAll } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService'; -import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers'; -import { activateCSharpExtension, describeIfCSharp } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import { AnalysisSetting } from '../../../src/lsptoolshost/diagnostics/buildDiagnosticsService.ts'; +import { getCode, setDiagnosticSettings, waitForExpectedDiagnostics } from './diagnosticsHelpers.ts'; +import { activateCSharpExtension, describeIfCSharp } from './integrationHelpers.ts'; // Restarting the server is required for these tests, but not supported with C# Dev Kit. describeIfCSharp(`Workspace Diagnostic Tests`, () => { diff --git a/test/lsptoolshost/unitTests/captureActivityLogs.test.ts b/test/lsptoolshost/unitTests/captureActivityLogs.test.ts index 1cf040f954..ae24f3e3b9 100644 --- a/test/lsptoolshost/unitTests/captureActivityLogs.test.ts +++ b/test/lsptoolshost/unitTests/captureActivityLogs.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { LogObserver } from '../../../src/lsptoolshost/logging/observableLogOutputChannel'; +import { LogObserver } from '../../../src/lsptoolshost/logging/observableLogOutputChannel.ts'; describe('captureActivityLogs', () => { describe('LogObserver', () => { diff --git a/test/lsptoolshost/unitTests/configurationMiddleware.test.ts b/test/lsptoolshost/unitTests/configurationMiddleware.test.ts index 759d8bc46f..31795e2e6b 100644 --- a/test/lsptoolshost/unitTests/configurationMiddleware.test.ts +++ b/test/lsptoolshost/unitTests/configurationMiddleware.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { readFileSync } from 'fs'; -import { convertServerOptionNameToClientConfigurationName } from '../../../src/lsptoolshost/options/optionNameConverter'; +import { convertServerOptionNameToClientConfigurationName } from '../../../src/lsptoolshost/options/optionNameConverter.ts'; import { describe, test, expect } from '@jest/globals'; const editorBehaviorSection = 1; diff --git a/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts b/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts index 722765e2c3..7064c2d319 100644 --- a/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts +++ b/test/lsptoolshost/unitTests/csharpChannelObserver.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getNullChannel } from '../../fakes'; -import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver'; +import { getNullChannel } from '../../fakes.ts'; +import { CsharpChannelObserver } from '../../../src/shared/observers/csharpChannelObserver.ts'; import { InstallationFailure, BaseEvent, @@ -13,7 +13,7 @@ import { IntegrityCheckFailure, DebuggerNotInstalledFailure, DebuggerPrerequisiteFailure, -} from '../../../src/shared/loggingEvents'; +} from '../../../src/shared/loggingEvents.ts'; describe('CsharpChannelObserver', () => { [ diff --git a/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts b/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts index f757ab824f..398f480ec8 100644 --- a/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts +++ b/test/lsptoolshost/unitTests/csharpLoggerObserver.test.ts @@ -4,12 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../fakes'; -import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver'; -import { PlatformInformation } from '../../../src/shared/platform'; -import { PackageError } from '../../../src/packageManager/packageError'; -import { Package } from '../../../src/packageManager/package'; -import * as Event from '../../../src/shared/loggingEvents'; +import { getNullChannel } from '../../fakes.ts'; +import { CsharpLoggerObserver } from '../../../src/shared/observers/csharpLoggerObserver.ts'; +import { PlatformInformation } from '../../../src/shared/platform.ts'; +import { PackageError } from '../../../src/packageManager/packageError.ts'; +import { Package } from '../../../src/packageManager/package.ts'; +import * as Event from '../../../src/shared/loggingEvents.ts'; describe('CsharpLoggerObserver', () => { let logOutput = ''; diff --git a/test/lsptoolshost/unitTests/json.test.ts b/test/lsptoolshost/unitTests/json.test.ts index d0a4acf4f4..f12cbd3858 100644 --- a/test/lsptoolshost/unitTests/json.test.ts +++ b/test/lsptoolshost/unitTests/json.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { tolerantParse } from '../../../src/json'; +import { tolerantParse } from '../../../src/json.ts'; import { describe, test, expect } from '@jest/globals'; describe('JSON', () => { diff --git a/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts b/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts index 0e439e4ddb..3ef23cda38 100644 --- a/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts +++ b/test/lsptoolshost/unitTests/languageServerConfigChangeObserver.test.ts @@ -5,11 +5,11 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { registerLanguageServerOptionChanges } from '../../../src/lsptoolshost/options/optionChanges'; +import { registerLanguageServerOptionChanges } from '../../../src/lsptoolshost/options/optionChanges.ts'; import { describe, beforeEach, test, expect } from '@jest/globals'; import * as vscode from 'vscode'; -import { getVSCodeWithConfig, updateConfig } from '../../fakes'; +import { getVSCodeWithConfig, updateConfig } from '../../fakes.ts'; describe('Option changes observer', () => { let doClickOk: () => void; diff --git a/test/lsptoolshost/unitTests/migrateOptions.test.ts b/test/lsptoolshost/unitTests/migrateOptions.test.ts index ea2619eb15..48ec2870ac 100644 --- a/test/lsptoolshost/unitTests/migrateOptions.test.ts +++ b/test/lsptoolshost/unitTests/migrateOptions.test.ts @@ -5,11 +5,11 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { IDotnetAcquisitionExistingPaths } from '../../../src/shared/migrateOptions'; +import { IDotnetAcquisitionExistingPaths } from '../../../src/shared/migrateOptions.ts'; import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { getVSCodeWithConfig } from '../../fakes'; -import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId'; -import { ConfigurationTarget } from '../../../src/vscodeAdapter'; +import { getVSCodeWithConfig } from '../../fakes.ts'; +import { CSharpExtensionId } from '../../../src/constants/csharpExtensionId.ts'; +import { ConfigurationTarget } from '../../../src/vscodeAdapter.ts'; const mockExistsSync = jest.fn(); jest.unstable_mockModule('fs', async () => ({ @@ -18,7 +18,7 @@ jest.unstable_mockModule('fs', async () => ({ })); const fs = await import('fs'); const { dotnetAcquisitionExtensionOption, dotnetPathOption, MigrateOptions, migrateOptions } = - await import('../../../src/shared/migrateOptions'); + await import('../../../src/shared/migrateOptions.ts'); describe('Migrate configurations', () => { const packageJson = JSON.parse(fs.readFileSync('package.json').toString()); diff --git a/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts b/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts index 46a8bd162b..7d7000ae83 100644 --- a/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts +++ b/test/lsptoolshost/unitTests/roslynLanguageClient.test.ts @@ -21,8 +21,8 @@ jest.unstable_mockModule('vscode-languageclient', () => ({ State: { Running: 2 }, })); -const { RoslynLanguageClient } = await import('../../../src/lsptoolshost/server/roslynLanguageClient'); -const { TelemetryEventNames } = await import('../../../src/shared/telemetryEventNames'); +const { RoslynLanguageClient } = await import('../../../src/lsptoolshost/server/roslynLanguageClient.ts'); +const { TelemetryEventNames } = await import('../../../src/shared/telemetryEventNames.ts'); describe('RoslynLanguageClient', () => { test('shows one crash notification and emits one telemetry event per crash', () => { diff --git a/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts index 86bebe0516..5802acab8b 100644 --- a/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/advisor.integration.test.ts @@ -6,10 +6,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as path from 'path'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; -import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider'; +import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider.ts'; function setLimit(to: number | null) { const csharpConfig = vscode.workspace.getConfiguration('csharp'); diff --git a/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts index 5c305b12d3..e271268252 100644 --- a/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/codeActionRename.integration.test.ts @@ -5,11 +5,11 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; import * as path from 'path'; -import { assertWithPoll } from './poll'; -import { isNotNull } from '../testUtil'; +import { assertWithPoll } from './poll.ts'; +import { isNotNull } from '../testUtil.ts'; describe.skip(`Code Action Rename ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts index 548f0d99d0..fdf0a1724e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/codeLensProvider.integration.test.ts @@ -6,9 +6,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfSlnWithCsProj, describeIfNotGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { isNotNull } from '../testUtil'; +import { activateCSharpExtension, describeIfSlnWithCsProj, describeIfNotGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { isNotNull } from '../testUtil.ts'; describeIfNotGenerator(`CodeLensProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts index a00e85774b..56263cc866 100644 --- a/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/completionProvider.integration.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { expect, test, beforeAll, afterAll } from '@jest/globals'; -import OmniSharpCompletionProvider from '../../../src/omnisharp/features/completionProvider'; +import OmniSharpCompletionProvider from '../../../src/omnisharp/features/completionProvider.ts'; import * as vscode from 'vscode'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; describeIfNotRazorOrGenerator(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts index 62bf7013fb..fda563079b 100644 --- a/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/definitionProvider.test.ts @@ -5,10 +5,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.ts'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { + activateCSharpExtension, + describeIfNotRazorOrGenerator, + restartOmniSharpServer, +} from './integrationHelpers.ts'; describeIfNotRazorOrGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts index b3808099e0..af142f32d4 100644 --- a/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/diagnostics.integration.test.ts @@ -14,10 +14,10 @@ import { isRazorWorkspace, isSlnWithGenerator, restartOmniSharpServer, -} from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { poll, assertWithPoll, pollDoesNotHappen } from './poll'; -import { isNotNull } from '../testUtil'; +} from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { poll, assertWithPoll, pollDoesNotHappen } from './poll.ts'; +import { isNotNull } from '../testUtil.ts'; async function setDiagnosticWorkspaceLimit(to: number | null) { const csharpConfig = vscode.workspace.getConfiguration('csharp'); diff --git a/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts index eb8ebf9ac4..a6fcaa1f1e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/documentSymbolProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; describeIfNotRazorOrGenerator(`DocumentSymbolProvider: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts index df49d08ee0..0952f91b5e 100644 --- a/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/documentationCommentAutoFormatting.integration.test.ts @@ -6,7 +6,7 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; const onTypeFormatProviderCommand = 'vscode.executeFormatOnTypeProvider'; diff --git a/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts index 73a5b17246..d46907a6cf 100644 --- a/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/dotnetTest.integration.test.ts @@ -6,13 +6,13 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfSlnWithCsProj } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/shared/eventType'; -import { OmnisharpRequestMessage } from '../../../src/omnisharp/omnisharpLoggingEvents'; -import { V2 } from '../../../src/omnisharp/protocol'; -import { isNotNull } from '../testUtil'; +import { activateCSharpExtension, describeIfSlnWithCsProj } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { EventStream } from '../../../src/eventStream.ts'; +import { EventType } from '../../../src/shared/eventType.ts'; +import { OmnisharpRequestMessage } from '../../../src/omnisharp/omnisharpLoggingEvents.ts'; +import { V2 } from '../../../src/omnisharp/protocol.ts'; +import { isNotNull } from '../testUtil.ts'; // These tests only run on the slnWithCsproj solution describeIfSlnWithCsProj(`DotnetTest: ${testAssetWorkspace.description}`, function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts index 798038385d..227505c5d5 100644 --- a/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/hoverProvider.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; export type Test = 'a' | 'b' | ['c', any]; diff --git a/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts index bcb39a937d..7ff7de3f8d 100644 --- a/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/implementationProvider.test.ts @@ -5,10 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpImplementationProvider from '../../../src/omnisharp/features/implementationProvider'; +import OmniSharpImplementationProvider from '../../../src/omnisharp/features/implementationProvider.ts'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; describeIfNotRazorOrGenerator(`${OmniSharpImplementationProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/index.ts b/test/omnisharp/omnisharpIntegrationTests/index.ts index 67ebf31a6e..2a4654aef7 100644 --- a/test/omnisharp/omnisharpIntegrationTests/index.ts +++ b/test/omnisharp/omnisharpIntegrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests.js'; +import { runIntegrationTests } from '../../runIntegrationTests.ts'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts index b8bce4c45e..794cd5565f 100644 --- a/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/inlayHints.integration.test.ts @@ -5,11 +5,15 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { + activateCSharpExtension, + describeIfNotRazorOrGenerator, + restartOmniSharpServer, +} from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; import * as path from 'path'; -import { InlayHint, LinePositionSpanTextChange } from '../../../src/omnisharp/protocol'; -import { isNotNull } from '../testUtil'; +import { InlayHint, LinePositionSpanTextChange } from '../../../src/omnisharp/protocol.ts'; +import { isNotNull } from '../testUtil.ts'; describeIfNotRazorOrGenerator(`Inlay Hints ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts b/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts index 60ab788210..48d60f56a4 100644 --- a/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts +++ b/test/omnisharp/omnisharpIntegrationTests/integrationHelpers.ts @@ -5,10 +5,10 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/shared/eventType'; -import { OmnisharpExtensionExports } from '../../../src/csharpExtensionExports'; +import { Advisor } from '../../../src/omnisharp/features/diagnosticsProvider.ts'; +import { EventStream } from '../../../src/eventStream.ts'; +import { EventType } from '../../../src/shared/eventType.ts'; +import { OmnisharpExtensionExports } from '../../../src/csharpExtensionExports.ts'; import { describe } from '@jest/globals'; export interface ActivationResult { diff --git a/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts index b802e7b4f5..502e37ec37 100644 --- a/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/languageMiddleware.integration.test.ts @@ -6,9 +6,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../../src/omnisharp/languageMiddlewareFeature'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import { LanguageMiddleware, LanguageMiddlewareFeature } from '../../../src/omnisharp/languageMiddlewareFeature.ts'; describeIfNotRazorOrGenerator(`${LanguageMiddlewareFeature.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts index 80e9393694..bc0c585bd3 100644 --- a/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/launchConfiguration.integration.test.ts @@ -6,10 +6,10 @@ import { describe, expect, test, beforeAll, afterAll } from '@jest/globals'; import fs from 'fs-extra'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { poll } from './poll'; -import { isNotNull } from '../testUtil'; +import { activateCSharpExtension } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { poll } from './poll.ts'; +import { isNotNull } from '../testUtil.ts'; // Consistently failing in CI: https://github.com/OmniSharp/omnisharp-vscode/issues/4646 describe.skip(`Tasks generation: ${testAssetWorkspace.description}`, function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts b/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts index 72ee28e512..faa8b240fa 100644 --- a/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/launcher.test.ts @@ -10,8 +10,8 @@ import { resourcesToLaunchTargets, vsls, vslsTarget, -} from '../../../src/omnisharp/launcher'; -import { LaunchTargetKind } from '../../../src/shared/launchTarget'; +} from '../../../src/omnisharp/launcher.ts'; +import { LaunchTargetKind } from '../../../src/shared/launchTarget.ts'; describe(`launcher:`, () => { const workspaceFolders: vscode.WorkspaceFolder[] = [{ uri: vscode.Uri.parse('/'), name: 'root', index: 0 }]; diff --git a/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts index f3d567ee51..00c9d13795 100644 --- a/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/omnisharpCommands.integration.test.ts @@ -5,9 +5,12 @@ import { expect, test, beforeAll, afterAll, describe } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { OmniSharpCommands, UnexpectedOmniSharpCommands } from '../../lsptoolshost/integrationTests/expectedCommands'; +import { activateCSharpExtension } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { + OmniSharpCommands, + UnexpectedOmniSharpCommands, +} from '../../lsptoolshost/integrationTests/expectedCommands.ts'; describe(`Command Enablement: ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts b/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts index 22c7e749e3..572176d879 100644 --- a/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/parsedEnvironmentFile.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { ParsedEnvironmentFile } from '../../../src/coreclrDebug/parsedEnvironmentFile'; +import { ParsedEnvironmentFile } from '../../../src/coreclrDebug/parsedEnvironmentFile.ts'; describe('ParsedEnvironmentFile', () => { test('Add single variable', () => { diff --git a/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts index 5cb9752252..b1f51c8c9b 100644 --- a/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/reAnalyze.integration.test.ts @@ -6,14 +6,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { poll, assertWithPoll } from './poll'; -import { EventStream } from '../../../src/eventStream'; -import { EventType } from '../../../src/shared/eventType'; -import { BaseEvent } from '../../../src/shared/loggingEvents'; -import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/omnisharpLoggingEvents'; -import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { poll, assertWithPoll } from './poll.ts'; +import { EventStream } from '../../../src/eventStream.ts'; +import { EventType } from '../../../src/shared/eventType.ts'; +import { BaseEvent } from '../../../src/shared/loggingEvents.ts'; +import { OmnisharpBackgroundDiagnosticStatus } from '../../../src/omnisharp/omnisharpLoggingEvents.ts'; +import { BackgroundDiagnosticStatus } from '../../../src/omnisharp/protocol.ts'; function listenEvents(stream: EventStream, type: EventType): T[] { const results: T[] = []; diff --git a/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts index 4d76051903..63fe7197f4 100644 --- a/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/referenceProvider.test.ts @@ -5,10 +5,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpReferenceProvider from '../../../src/omnisharp/features/referenceProvider'; +import OmniSharpReferenceProvider from '../../../src/omnisharp/features/referenceProvider.ts'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; describeIfNotRazorOrGenerator(`${OmniSharpReferenceProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts index d629b6e614..989a83ee8f 100644 --- a/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/semanticTokensProvider.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; interface ExpectedToken { startLine: number; diff --git a/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts index a1b56ab7a6..40023c8e1f 100644 --- a/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/signatureHelp.integration.test.ts @@ -6,8 +6,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; describeIfNotRazorOrGenerator(`SignatureHelp: ${testAssetWorkspace.description}`, function () { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts index 3edbc9f4f1..f8dc2dd650 100644 --- a/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/sourceGeneratorDefinitionProvider.test.ts @@ -6,10 +6,10 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; import * as path from 'path'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; -import { activateCSharpExtension, describeIfGenerator, restartOmniSharpServer } from './integrationHelpers'; -import { assertWithPoll, sleep } from './poll'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.ts'; +import { activateCSharpExtension, describeIfGenerator, restartOmniSharpServer } from './integrationHelpers.ts'; +import { assertWithPoll, sleep } from './poll.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; describeIfGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts b/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts index 458734000d..01b5030fe0 100644 --- a/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts +++ b/test/omnisharp/omnisharpIntegrationTests/testAssets/activeTestAssetWorkspace.ts @@ -6,14 +6,14 @@ import * as path from 'path'; import * as vscode from 'vscode'; -import { ITestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; +import { ITestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets.ts'; -import singleCsproj from '../../../lsptoolshost/integrationTests/testAssets/singleCsproj'; -import slnWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnWithCsproj'; -import slnFilterWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj'; -import BasicRazorApp2_1 from '../../../lsptoolshost/integrationTests/testAssets/razorApp'; -import slnWithGenerator from '../../../lsptoolshost/integrationTests/testAssets/slnWithGenerator'; -import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace'; +import singleCsproj from '../../../lsptoolshost/integrationTests/testAssets/singleCsproj.ts'; +import slnWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnWithCsproj.ts'; +import slnFilterWithCsproj from '../../../lsptoolshost/integrationTests/testAssets/slnFilterWithCsproj.ts'; +import BasicRazorApp2_1 from '../../../lsptoolshost/integrationTests/testAssets/razorApp.ts'; +import slnWithGenerator from '../../../lsptoolshost/integrationTests/testAssets/slnWithGenerator.ts'; +import { OmnisharpTestAssetWorkspace } from './omnisharpTestAssetWorkspace.ts'; const testAssetWorkspaces: { [x: string]: ITestAssetWorkspace } = { singleCsproj, diff --git a/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts b/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts index e98b279d7f..655325385d 100644 --- a/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts +++ b/test/omnisharp/omnisharpIntegrationTests/testAssets/omnisharpTestAssetWorkspace.ts @@ -4,12 +4,15 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import { EventStream } from '../../../../src/eventStream'; -import { EventType } from '../../../../src/shared/eventType'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; -import { poll } from '../poll'; -import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; -import { ActivationResult } from '../integrationHelpers'; +import { EventStream } from '../../../../src/eventStream.ts'; +import { EventType } from '../../../../src/shared/eventType.ts'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.ts'; +import { poll } from '../poll.ts'; +import { + ITestAssetWorkspace, + TestAssetWorkspace, +} from '../../../lsptoolshost/integrationTests/testAssets/testAssets.ts'; +import { ActivationResult } from '../integrationHelpers.ts'; export class OmnisharpTestAssetWorkspace extends TestAssetWorkspace { constructor(workspace: ITestAssetWorkspace) { diff --git a/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts b/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts index 724d66df2e..cf5d557b68 100644 --- a/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/typeDefinitionProvider.test.ts @@ -5,10 +5,14 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider'; +import OmniSharpDefinitionProvider from '../../../src/omnisharp/features/definitionProvider.ts'; import * as path from 'path'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator, restartOmniSharpServer } from './integrationHelpers'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { + activateCSharpExtension, + describeIfNotRazorOrGenerator, + restartOmniSharpServer, +} from './integrationHelpers.ts'; describeIfNotRazorOrGenerator(`${OmniSharpDefinitionProvider.name}: ${testAssetWorkspace.description}`, () => { let fileUri: vscode.Uri; diff --git a/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts index cceb330ad8..864c6ece79 100644 --- a/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/virtualDocumentTracker.integration.test.ts @@ -5,9 +5,9 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotGenerator, isSlnWithGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; -import { IDisposable } from '../../../src/disposable'; +import { activateCSharpExtension, describeIfNotGenerator, isSlnWithGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; +import { IDisposable } from '../../../src/disposable.ts'; describeIfNotGenerator(`Virtual Document Tracking ${testAssetWorkspace.description}`, function () { const virtualScheme = 'virtual'; diff --git a/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts b/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts index 7f6dff7cf5..a71f977f68 100644 --- a/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts +++ b/test/omnisharp/omnisharpIntegrationTests/workspaceSymbolProvider.integration.test.ts @@ -5,8 +5,8 @@ import { expect, test, beforeAll, afterAll } from '@jest/globals'; import * as vscode from 'vscode'; -import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers'; -import testAssetWorkspace from './testAssets/activeTestAssetWorkspace'; +import { activateCSharpExtension, describeIfNotRazorOrGenerator } from './integrationHelpers.ts'; +import testAssetWorkspace from './testAssets/activeTestAssetWorkspace.ts'; describeIfNotRazorOrGenerator(`WorkspaceSymbolProvider: ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts b/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts index b1c5baf8f2..53db9acd24 100644 --- a/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts +++ b/test/omnisharp/omnisharpUnitTests/absolutePath.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { AbsolutePath } from '../../../src/packageManager/absolutePath'; -import { TmpAsset, CreateTmpFile } from '../../createTmpAsset'; +import { AbsolutePath } from '../../../src/packageManager/absolutePath.ts'; +import { TmpAsset, CreateTmpFile } from '../../createTmpAsset.ts'; import { join } from 'path'; describe(AbsolutePath.name, () => { diff --git a/test/omnisharp/omnisharpUnitTests/assets.test.ts b/test/omnisharp/omnisharpUnitTests/assets.test.ts index 3f4781c98d..0d94b83bed 100644 --- a/test/omnisharp/omnisharpUnitTests/assets.test.ts +++ b/test/omnisharp/omnisharpUnitTests/assets.test.ts @@ -14,11 +14,11 @@ import { ProgramLaunchType, replaceCommentPropertiesWithComments, updateJsonWithComments, -} from '../../../src/shared/assets'; +} from '../../../src/shared/assets.ts'; import { parse } from 'jsonc-parser'; -import { ProjectDebugInformation } from '../../../src/shared/IWorkspaceDebugInformationProvider'; -import { findNetCoreTargetFramework } from '../../../src/shared/utils'; -import { isNotNull } from '../testUtil'; +import { ProjectDebugInformation } from '../../../src/shared/IWorkspaceDebugInformationProvider.ts'; +import { findNetCoreTargetFramework } from '../../../src/shared/utils.ts'; +import { isNotNull } from '../testUtil.ts'; describe('Asset generation: csproj', () => { test('Create tasks.json for project opened in workspace', () => { diff --git a/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts b/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts index e459e66e10..a3222c014e 100644 --- a/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts +++ b/test/omnisharp/omnisharpUnitTests/blazorWebAssemblyDetection.test.ts @@ -6,8 +6,12 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import fs from 'fs-extra'; import * as path from 'path'; -import { CreateTmpDir, TmpAsset } from '../../createTmpAsset'; -import { isBlazorWebAssemblyHostedServer, isBlazorWebAssemblyProject, isWebProject } from '../../../src/shared/utils'; +import { CreateTmpDir, TmpAsset } from '../../createTmpAsset.ts'; +import { + isBlazorWebAssemblyHostedServer, + isBlazorWebAssemblyProject, + isWebProject, +} from '../../../src/shared/utils.ts'; const webSdkCsproj = ` diff --git a/test/omnisharp/omnisharpUnitTests/common.test.ts b/test/omnisharp/omnisharpUnitTests/common.test.ts index 9d454e1e35..3e77557b36 100644 --- a/test/omnisharp/omnisharpUnitTests/common.test.ts +++ b/test/omnisharp/omnisharpUnitTests/common.test.ts @@ -6,7 +6,7 @@ import { describe, test, expect } from '@jest/globals'; import * as path from 'path'; -import { isSubfolderOf, safeLength, sum } from '../../../src/common'; +import { isSubfolderOf, safeLength, sum } from '../../../src/common.ts'; describe('Common', () => { describe('safeLength', () => { diff --git a/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts b/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts index ad12001afb..54f9f758ab 100644 --- a/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts +++ b/test/omnisharp/omnisharpUnitTests/coreclrDebug/targetArchitecture.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getTargetArchitecture } from '../../../../src/coreclrDebug/util'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo'; +import { getTargetArchitecture } from '../../../../src/coreclrDebug/util.ts'; +import { PlatformInformation } from '../../../../src/shared/platform.ts'; +import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo.ts'; describe('getTargetArchitecture Tests', () => { describe('Windows', () => { diff --git a/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts b/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts index d74aeb7599..79e5cc751c 100644 --- a/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts +++ b/test/omnisharp/omnisharpUnitTests/fakes/fakeDotnetResolver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver'; -import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation'; +import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver.ts'; +import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation.ts'; export const fakeMonoInfo: HostExecutableInformation = { version: 'someDotNetVersion', diff --git a/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts b/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts index 97c45f410b..8a52f94c57 100644 --- a/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts +++ b/test/omnisharp/omnisharpUnitTests/fakes/fakeMonoResolver.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver'; -import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation'; +import { IHostExecutableResolver } from '../../../../src/shared/constants/IHostExecutableResolver.ts'; +import { HostExecutableInformation } from '../../../../src/shared/constants/hostExecutableInformation.ts'; export const fakeMonoInfo: HostExecutableInformation = { version: 'someMonoVersion', diff --git a/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts b/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts index c052d189ab..4b3f8d4b46 100644 --- a/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts +++ b/test/omnisharp/omnisharpUnitTests/features/reportIssue.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import * as vscode from 'vscode'; -import reportIssue from '../../../../src/shared/reportIssue'; -import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver'; -import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver'; -import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo'; +import reportIssue from '../../../../src/shared/reportIssue.ts'; +import { FakeMonoResolver, fakeMonoInfo } from '../fakes/fakeMonoResolver.ts'; +import { FakeDotnetResolver } from '../fakes/fakeDotnetResolver.ts'; +import { DotnetInfo } from '../../../../src/shared/utils/dotnetInfo.ts'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; describe(`${reportIssue.name}`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts index d04aef9607..fea8513945 100644 --- a/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/informationMessageObserver.test.ts @@ -5,8 +5,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { InformationMessageObserver } from '../../../src/omnisharp/observers/informationMessageObserver'; -import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../fakes'; +import { InformationMessageObserver } from '../../../src/omnisharp/observers/informationMessageObserver.ts'; +import { getUnresolvedDependenices, getWorkspaceConfiguration } from '../../fakes.ts'; import { Subject, from as observableFrom } from 'rxjs'; import { timeout } from 'rxjs/operators'; diff --git a/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts b/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts index 0ce27b8f82..706ad3f920 100644 --- a/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts +++ b/test/omnisharp/omnisharpUnitTests/installRuntimeDependencies.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { installRuntimeDependencies } from '../../../src/installRuntimeDependencies'; -import { IInstallDependencies } from '../../../src/packageManager/IInstallDependencies'; -import { EventStream } from '../../../src/eventStream'; -import { PlatformInformation } from '../../../src/shared/platform'; -import TestEventBus from './testAssets/testEventBus'; -import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage'; -import { Package } from '../../../src/packageManager/package'; -import { isNotNull } from '../testUtil'; +import { installRuntimeDependencies } from '../../../src/installRuntimeDependencies.ts'; +import { IInstallDependencies } from '../../../src/packageManager/IInstallDependencies.ts'; +import { EventStream } from '../../../src/eventStream.ts'; +import { PlatformInformation } from '../../../src/shared/platform.ts'; +import TestEventBus from './testAssets/testEventBus.ts'; +import { AbsolutePathPackage } from '../../../src/packageManager/absolutePathPackage.ts'; +import { Package } from '../../../src/packageManager/package.ts'; +import { isNotNull } from '../testUtil.ts'; describe(`${installRuntimeDependencies.name}`, () => { let packageJSON = { diff --git a/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts index 8d44d5f992..57148487bc 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/backgroundWorkStatusBarObserver.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { StatusBarItem } from '../../../../src/vscodeAdapter'; -import { OmnisharpBackgroundDiagnosticStatus } from '../../../../src/omnisharp/omnisharpLoggingEvents'; -import { BackgroundWorkStatusBarObserver } from '../../../../src/omnisharp/observers/backgroundWorkStatusBarObserver'; -import { BackgroundDiagnosticStatus } from '../../../../src/omnisharp/protocol'; +import { StatusBarItem } from '../../../../src/vscodeAdapter.ts'; +import { OmnisharpBackgroundDiagnosticStatus } from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; +import { BackgroundWorkStatusBarObserver } from '../../../../src/omnisharp/observers/backgroundWorkStatusBarObserver.ts'; +import { BackgroundDiagnosticStatus } from '../../../../src/omnisharp/protocol.ts'; describe('BackgroundWorkStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts index 016bbb4f47..7812a3d29f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetChannelObserver.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { DotNetChannelObserver } from '../../../../src/omnisharp/observers/dotnetChannelObserver'; -import { getNullChannel } from '../../../fakes'; -import { CommandDotNetRestoreStart } from '../../../../src/omnisharp/omnisharpLoggingEvents'; +import { DotNetChannelObserver } from '../../../../src/omnisharp/observers/dotnetChannelObserver.ts'; +import { getNullChannel } from '../../../fakes.ts'; +import { CommandDotNetRestoreStart } from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('DotnetChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts index 0e5eee3649..2fb17a5731 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetLoggerObserver.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { DotnetLoggerObserver } from '../../../../src/omnisharp/observers/dotnetLoggerObserver'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents'; +import { getNullChannel } from '../../../fakes.ts'; +import { DotnetLoggerObserver } from '../../../../src/omnisharp/observers/dotnetLoggerObserver.ts'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents.ts'; import { CommandDotNetRestoreFailed, CommandDotNetRestoreProgress, CommandDotNetRestoreSucceeded, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('DotnetLoggerObserver', () => { [ diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts index cb2c57dce1..59f169e498 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestChannelObserver.test.ts @@ -4,16 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; -import DotnetTestChannelObserver from '../../../../src/omnisharp/observers/dotnetTestChannelObserver'; +import { getNullChannel } from '../../../fakes.ts'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.ts'; +import DotnetTestChannelObserver from '../../../../src/omnisharp/observers/dotnetTestChannelObserver.ts'; import { DotNetTestDebugStart, DotNetTestRunFailure, DotNetTestRunStart, DotNetTestsInClassDebugStart, DotNetTestsInClassRunStart, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('DotnetTestChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts index 4de7ae08c3..6e1095a223 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/dotnetTestLoggerObserver.test.ts @@ -4,10 +4,10 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { EventWithMessage, BaseEvent } from '../../../../src/shared/loggingEvents'; -import DotNetTestLoggerObserver from '../../../../src/omnisharp/observers/dotnetTestLoggerObserver'; -import * as protocol from '../../../../src/omnisharp/protocol'; +import { getNullChannel } from '../../../fakes.ts'; +import { EventWithMessage, BaseEvent } from '../../../../src/shared/loggingEvents.ts'; +import DotNetTestLoggerObserver from '../../../../src/omnisharp/observers/dotnetTestLoggerObserver.ts'; +import * as protocol from '../../../../src/omnisharp/protocol.ts'; import { DotNetTestDebugComplete, DotNetTestDebugInContextStart, @@ -20,7 +20,7 @@ import { DotNetTestsInClassDebugStart, DotNetTestsInClassRunStart, ReportDotNetTestResults, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe(`${DotNetTestLoggerObserver.name}`, () => { let appendedMessage: string; diff --git a/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts index a9348339e0..4b00525f38 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/errorMessageObserver.test.ts @@ -4,11 +4,11 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { MessageItem, vscode } from '../../../../src/vscodeAdapter'; -import { ErrorMessageObserver } from '../../../../src/omnisharp/observers/errorMessageObserver'; -import { ZipError, EventWithMessage, IntegrityCheckFailure } from '../../../../src/shared/loggingEvents'; -import { getFakeVsCode } from '../../../fakes'; -import { DotNetTestDebugStartFailure, DotNetTestRunFailure } from '../../../../src/omnisharp/omnisharpLoggingEvents'; +import { MessageItem, vscode } from '../../../../src/vscodeAdapter.ts'; +import { ErrorMessageObserver } from '../../../../src/omnisharp/observers/errorMessageObserver.ts'; +import { ZipError, EventWithMessage, IntegrityCheckFailure } from '../../../../src/shared/loggingEvents.ts'; +import { getFakeVsCode } from '../../../fakes.ts'; +import { DotNetTestDebugStartFailure, DotNetTestRunFailure } from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('ErrorMessageObserver', () => { const vscode: vscode = getFakeVsCode(); diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts index 4a838a1e30..56e2a6e24f 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpChannelObserver.test.ts @@ -5,16 +5,16 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel, getWorkspaceConfiguration } from '../../../fakes'; -import { OmnisharpChannelObserver } from '../../../../src/omnisharp/observers/omnisharpChannelObserver'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; +import { getNullChannel, getWorkspaceConfiguration } from '../../../fakes.ts'; +import { OmnisharpChannelObserver } from '../../../../src/omnisharp/observers/omnisharpChannelObserver.ts'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.ts'; import { Subject } from 'rxjs'; import { OmnisharpFailure, OmnisharpRestart, OmnisharpServerOnStdErr, ShowOmniSharpChannel, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('OmnisharpChannelObserver', () => { let hasShown: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts index 09ffa8a098..da29f32d7c 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpDebugModeLoggerObserver.test.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents'; -import { OmnisharpDebugModeLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpDebugModeLoggerObserver'; +import { getNullChannel } from '../../../fakes.ts'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents.ts'; +import { OmnisharpDebugModeLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpDebugModeLoggerObserver.ts'; import { OmnisharpEventPacketReceived, OmnisharpRequestMessage, @@ -15,7 +15,7 @@ import { OmnisharpServerProcessRequestStart, OmnisharpServerRequestCancelled, OmnisharpServerVerboseMessage, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('OmnisharpDebugModeLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts index 48c3c4725f..f0f6144679 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpLoggerObserver.test.ts @@ -2,9 +2,9 @@ * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getNullChannel } from '../../../fakes'; +import { getNullChannel } from '../../../fakes.ts'; import { describe, test, expect, beforeEach } from '@jest/globals'; -import { OmnisharpLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpLoggerObserver'; +import { OmnisharpLoggerObserver } from '../../../../src/omnisharp/observers/omnisharpLoggerObserver.ts'; import { OmnisharpServerMsBuildProjectDiagnostics, OmnisharpServerOnStdErr, @@ -15,10 +15,10 @@ import { OmnisharpServerOnError, OmnisharpFailure, OmnisharpEventPacketReceived, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; import { OutputChannel } from 'vscode'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { EventWithMessage } from '../../../../src/shared/loggingEvents'; +import { PlatformInformation } from '../../../../src/shared/platform.ts'; +import { EventWithMessage } from '../../../../src/shared/loggingEvents.ts'; describe('OmnisharpLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts index 8bf0a4731b..57ddb8107e 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/omnisharpStatusBarObserver.test.ts @@ -4,14 +4,14 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { StatusBarItem } from '../../../../src/vscodeAdapter'; +import { StatusBarItem } from '../../../../src/vscodeAdapter.ts'; import { DownloadStart, InstallationStart, DownloadProgress, BaseEvent, InstallationSuccess, -} from '../../../../src/shared/loggingEvents'; +} from '../../../../src/shared/loggingEvents.ts'; import { OmnisharpOnBeforeServerInstall, OmnisharpOnBeforeServerStart, @@ -19,11 +19,11 @@ import { OmnisharpServerOnStart, OmnisharpServerOnStop, OmnisharpServerOnStdErr, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; import { OmnisharpStatusBarObserver, StatusBarColors, -} from '../../../../src/omnisharp/observers/omnisharpStatusBarObserver'; +} from '../../../../src/omnisharp/observers/omnisharpStatusBarObserver.ts'; describe('OmnisharpStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts index dd5da182b6..d41c50610e 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/projectStatusBarObserver.test.ts @@ -4,13 +4,13 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../fakes'; -import { StatusBarItem } from '../../../../src/vscodeAdapter'; -import { ProjectStatusBarObserver } from '../../../../src/omnisharp/observers/projectStatusBarObserver'; +import { getWorkspaceInformationUpdated, getMSBuildWorkspaceInformation } from '../../../fakes.ts'; +import { StatusBarItem } from '../../../../src/vscodeAdapter.ts'; +import { ProjectStatusBarObserver } from '../../../../src/omnisharp/observers/projectStatusBarObserver.ts'; import { OmnisharpOnMultipleLaunchTargets, OmnisharpServerOnStop, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('ProjectStatusBarObserver', () => { let showCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts index 9336ca79ac..abe749b5d7 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/razorLoggerObserver.test.ts @@ -3,13 +3,13 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { getNullChannel } from '../../../fakes'; -import { RazorLoggerObserver } from '../../../../src/omnisharp/observers/razorLoggerObserver'; +import { getNullChannel } from '../../../fakes.ts'; +import { RazorLoggerObserver } from '../../../../src/omnisharp/observers/razorLoggerObserver.ts'; import { RazorPluginPathSpecified, RazorPluginPathDoesNotExist, RazorDevModeActive, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; describe('RazorLoggerObserver', () => { let logOutput = ''; diff --git a/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts index 26b4bf3728..61d59482e4 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/telemetryObserver.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { beforeEach, test, describe, expect } from '@jest/globals'; -import { TelemetryObserver } from '../../../../src/omnisharp/observers/telemetryObserver'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { PackageInstallation, InstallationFailure, InstallationSuccess } from '../../../../src/shared/loggingEvents'; +import { TelemetryObserver } from '../../../../src/omnisharp/observers/telemetryObserver.ts'; +import { PlatformInformation } from '../../../../src/shared/platform.ts'; +import { PackageInstallation, InstallationFailure, InstallationSuccess } from '../../../../src/shared/loggingEvents.ts'; import { TestExecutionCountReport, TelemetryEventWithMeasures, @@ -15,11 +15,11 @@ import { TelemetryEvent, ProjectConfiguration, TelemetryErrorEvent, -} from '../../../../src/omnisharp/omnisharpLoggingEvents'; -import { getNullTelemetryReporter } from '../../../fakes'; -import { Package } from '../../../../src/packageManager/package'; -import { PackageError } from '../../../../src/packageManager/packageError'; -import { isNotNull } from '../../testUtil'; +} from '../../../../src/omnisharp/omnisharpLoggingEvents.ts'; +import { getNullTelemetryReporter } from '../../../fakes.ts'; +import { Package } from '../../../../src/packageManager/package.ts'; +import { PackageError } from '../../../../src/packageManager/packageError.ts'; +import { isNotNull } from '../../testUtil.ts'; describe('TelemetryReporterObserver', () => { const platformInfo = new PlatformInformation('linux', 'architecture'); diff --git a/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts b/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts index 053c03a780..e64ec7cee4 100644 --- a/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/logging/warningMessageObserver.test.ts @@ -3,14 +3,14 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach } from '@jest/globals'; -import { WarningMessageObserver } from '../../../../src/omnisharp/observers/warningMessageObserver'; +import { WarningMessageObserver } from '../../../../src/omnisharp/observers/warningMessageObserver.ts'; import { getFakeVsCode, getMSBuildDiagnosticsMessage, getOmnisharpMSBuildProjectDiagnosticsEvent, getOmnisharpServerOnErrorEvent, -} from '../../../fakes'; -import { vscode } from '../../../../src/vscodeAdapter'; +} from '../../../fakes.ts'; +import { vscode } from '../../../../src/vscodeAdapter.ts'; import { TestScheduler } from 'rxjs/testing'; import { from as observableFrom, Subject } from 'rxjs'; import { timeout, map } from 'rxjs/operators'; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts index 3f6b21c324..3e3f387452 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharp/omniSharpMonoResolver.test.ts @@ -5,10 +5,10 @@ import * as vscode from 'vscode'; import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { OmniSharpMonoResolver } from '../../../../src/omnisharp/omniSharpMonoResolver'; +import { OmniSharpMonoResolver } from '../../../../src/omnisharp/omniSharpMonoResolver.ts'; import { join } from 'path'; -import { getWorkspaceConfiguration } from '../../../fakes'; +import { getWorkspaceConfiguration } from '../../../fakes.ts'; describe(`${OmniSharpMonoResolver.name}`, () => { let getMonoCalled: boolean; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts index 74d2b999f7..a85f85a034 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpDownloader.test.ts @@ -4,16 +4,16 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader'; -import NetworkSettings from '../../../src/networkSettings'; -import { EventStream } from '../../../src/eventStream'; -import { PlatformInformation } from '../../../src/shared/platform'; -import { CreateTmpDir, TmpAsset } from '../../createTmpAsset'; -import * as util from '../../../src/common'; +import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader.ts'; +import NetworkSettings from '../../../src/networkSettings.ts'; +import { EventStream } from '../../../src/eventStream.ts'; +import { PlatformInformation } from '../../../src/shared/platform.ts'; +import { CreateTmpDir, TmpAsset } from '../../createTmpAsset.ts'; +import * as util from '../../../src/common.ts'; import * as path from 'path'; -import MockHttpsServer from './testAssets/mockHttpsServer'; -import TestZip from './testAssets/testZip'; -import { createTestFile } from './testAssets/testFile'; +import MockHttpsServer from './testAssets/mockHttpsServer.ts'; +import TestZip from './testAssets/testZip.ts'; +import { createTestFile } from './testAssets/testFile.ts'; import { PackageInstallation, LogPlatformInfo, @@ -24,10 +24,10 @@ import { InstallationStart, InstallationSuccess, PackageInstallStart, -} from '../../../src/shared/loggingEvents'; -import TestEventBus from './testAssets/testEventBus'; -import { testPackageJSON } from './testAssets/testAssets'; -import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator'; +} from '../../../src/shared/loggingEvents.ts'; +import TestEventBus from './testAssets/testEventBus.ts'; +import { testPackageJSON } from './testAssets/testAssets.ts'; +import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator.ts'; [true, false].forEach((useFramework) => { describe(`OmnisharpDownloader (useFramework: ${useFramework})`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts index 78f882771e..16bd33b0f0 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpManager.test.ts @@ -4,19 +4,19 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { OmnisharpManager } from '../../../src/omnisharp/omnisharpManager'; -import MockHttpsServer from './testAssets/mockHttpsServer'; -import TestZip from './testAssets/testZip'; -import { createTestFile } from './testAssets/testFile'; -import { PlatformInformation } from '../../../src/shared/platform'; -import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader'; -import NetworkSettings from '../../../src/networkSettings'; -import { EventStream } from '../../../src/eventStream'; -import { testPackageJSON } from './testAssets/testAssets'; -import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../createTmpAsset'; +import { OmnisharpManager } from '../../../src/omnisharp/omnisharpManager.ts'; +import MockHttpsServer from './testAssets/mockHttpsServer.ts'; +import TestZip from './testAssets/testZip.ts'; +import { createTestFile } from './testAssets/testFile.ts'; +import { PlatformInformation } from '../../../src/shared/platform.ts'; +import { OmnisharpDownloader } from '../../../src/omnisharp/omnisharpDownloader.ts'; +import NetworkSettings from '../../../src/networkSettings.ts'; +import { EventStream } from '../../../src/eventStream.ts'; +import { testPackageJSON } from './testAssets/testAssets.ts'; +import { TmpAsset, CreateTmpDir, CreateTmpFile } from '../../createTmpAsset.ts'; import * as path from 'path'; -import * as util from '../../../src/common'; -import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator'; +import * as util from '../../../src/common.ts'; +import { modernNetVersion } from '../../../src/omnisharp/omnisharpPackageCreator.ts'; describe(OmnisharpManager.name, () => { let server: MockHttpsServer; diff --git a/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts b/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts index 68425752c9..fbad9c3a64 100644 --- a/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts +++ b/test/omnisharp/omnisharpUnitTests/omnisharpPackageCreator.test.ts @@ -8,10 +8,10 @@ import { SetBinaryAndGetPackage, GetPackagesFromVersion, modernNetVersion, -} from '../../../src/omnisharp/omnisharpPackageCreator'; -import { Package } from '../../../src/packageManager/package'; -import { testPackageJSON } from './testAssets/testAssets'; -import { isNotNull } from '../testUtil'; +} from '../../../src/omnisharp/omnisharpPackageCreator.ts'; +import { Package } from '../../../src/packageManager/package.ts'; +import { testPackageJSON } from './testAssets/testAssets.ts'; +import { isNotNull } from '../testUtil.ts'; describe('GetOmnisharpPackage : Output package depends on the input package and other input parameters like serverUrl', () => { let serverUrl: string; diff --git a/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts b/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts index 29af13fbf2..d286dce6f1 100644 --- a/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts +++ b/test/omnisharp/omnisharpUnitTests/optionChangeObserver.test.ts @@ -5,11 +5,11 @@ import { timeout } from 'rxjs/operators'; import { from as observableFrom, Subject, BehaviorSubject } from 'rxjs'; -import { registerOmnisharpOptionChanges } from '../../../src/omnisharp/omnisharpOptionChanges'; +import { registerOmnisharpOptionChanges } from '../../../src/omnisharp/omnisharpOptionChanges.ts'; import { describe, beforeEach, test, expect } from '@jest/globals'; import * as vscode from 'vscode'; -import { getVSCodeWithConfig, updateConfig } from '../../fakes'; +import { getVSCodeWithConfig, updateConfig } from '../../fakes.ts'; describe('OmniSharpConfigChangeObserver', () => { let doClickOk: () => void; diff --git a/test/omnisharp/omnisharpUnitTests/optionStream.test.ts b/test/omnisharp/omnisharpUnitTests/optionStream.test.ts index 6817977ef3..be42a3f3fe 100644 --- a/test/omnisharp/omnisharpUnitTests/optionStream.test.ts +++ b/test/omnisharp/omnisharpUnitTests/optionStream.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import { Observable } from 'rxjs'; -import createOptionStream from '../../../src/shared/observables/createOptionStream'; -import Disposable from '../../../src/disposable'; +import createOptionStream from '../../../src/shared/observables/createOptionStream.ts'; +import Disposable from '../../../src/disposable.ts'; describe('OptionStream', () => { let listenerFunction: Array<(e: vscode.ConfigurationChangeEvent) => any>; diff --git a/test/omnisharp/omnisharpUnitTests/options.test.ts b/test/omnisharp/omnisharpUnitTests/options.test.ts index e69d912fc4..7d29c708a1 100644 --- a/test/omnisharp/omnisharpUnitTests/options.test.ts +++ b/test/omnisharp/omnisharpUnitTests/options.test.ts @@ -6,8 +6,8 @@ import * as vscode from 'vscode'; import { jest, describe, test, expect, beforeEach } from '@jest/globals'; import * as path from 'path'; -import { commonOptions, omnisharpOptions } from '../../../src/shared/options'; -import { getWorkspaceConfiguration } from '../../fakes'; +import { commonOptions, omnisharpOptions } from '../../../src/shared/options.ts'; +import { getWorkspaceConfiguration } from '../../fakes.ts'; describe('Options tests', () => { beforeEach(() => { diff --git a/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts b/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts index 9d8854a2bf..a66244a543 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/downloadAndInstallPackages.test.ts @@ -5,12 +5,12 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import * as path from 'path'; -import * as util from '../../../../src/common'; -import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset'; -import TestZip from '../testAssets/testZip'; -import { downloadAndInstallPackages } from '../../../../src/packageManager/downloadAndInstallPackages'; -import NetworkSettings from '../../../../src/networkSettings'; -import { EventStream } from '../../../../src/eventStream'; +import * as util from '../../../../src/common.ts'; +import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset.ts'; +import TestZip from '../testAssets/testZip.ts'; +import { downloadAndInstallPackages } from '../../../../src/packageManager/downloadAndInstallPackages.ts'; +import NetworkSettings from '../../../../src/networkSettings.ts'; +import { EventStream } from '../../../../src/eventStream.ts'; import { DownloadStart, DownloadSizeObtained, @@ -21,13 +21,13 @@ import { IntegrityCheckFailure, DownloadFailure, InstallationFailure, -} from '../../../../src/shared/loggingEvents'; -import MockHttpsServer from '../testAssets/mockHttpsServer'; -import { createTestFile } from '../testAssets/testFile'; -import TestEventBus from '../testAssets/testEventBus'; -import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage'; -import { AbsolutePath } from '../../../../src/packageManager/absolutePath'; -import { DownloadValidator } from '../../../../src/packageManager/isValidDownload'; +} from '../../../../src/shared/loggingEvents.ts'; +import MockHttpsServer from '../testAssets/mockHttpsServer.ts'; +import { createTestFile } from '../testAssets/testFile.ts'; +import TestEventBus from '../testAssets/testEventBus.ts'; +import { AbsolutePathPackage } from '../../../../src/packageManager/absolutePathPackage.ts'; +import { AbsolutePath } from '../../../../src/packageManager/absolutePath.ts'; +import { DownloadValidator } from '../../../../src/packageManager/isValidDownload.ts'; describe(`${downloadAndInstallPackages.name}`, () => { let tmpInstallDir: TmpAsset; diff --git a/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts b/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts index 5775793899..5a7c8c2032 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/fileDownloader.test.ts @@ -4,9 +4,9 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; -import { EventStream } from '../../../../src/eventStream'; -import { DownloadFile } from '../../../../src/packageManager/fileDownloader'; -import NetworkSettings from '../../../../src/networkSettings'; +import { EventStream } from '../../../../src/eventStream.ts'; +import { DownloadFile } from '../../../../src/packageManager/fileDownloader.ts'; +import NetworkSettings from '../../../../src/networkSettings.ts'; import { DownloadStart, DownloadSizeObtained, @@ -14,9 +14,9 @@ import { DownloadSuccess, DownloadFallBack, DownloadFailure, -} from '../../../../src/shared/loggingEvents'; -import MockHttpsServer from '../testAssets/mockHttpsServer'; -import TestEventBus from '../testAssets/testEventBus'; +} from '../../../../src/shared/loggingEvents.ts'; +import MockHttpsServer from '../testAssets/mockHttpsServer.ts'; +import TestEventBus from '../testAssets/testEventBus.ts'; describe('FileDownloader', () => { const fileDescription = 'Test file'; diff --git a/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts b/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts index c53f7f1923..ab1b5d402a 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/isValidDownload.test.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { isValidDownload } from '../../../../src/packageManager/isValidDownload'; -import { EventStream } from '../../../../src/eventStream'; +import { isValidDownload } from '../../../../src/packageManager/isValidDownload.ts'; +import { EventStream } from '../../../../src/eventStream.ts'; describe(`${isValidDownload.name}`, () => { const sampleBuffer = Buffer.from('sampleBuffer'); diff --git a/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts b/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts index e2d9b2aac2..63dc208127 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/packageFilterer.test.ts @@ -3,8 +3,8 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeEach, jest } from '@jest/globals'; -import { Package } from '../../../../src/packageManager/package'; -import type { AbsolutePathPackage as AbsolutePathPackageType } from '../../../../src/packageManager/absolutePathPackage'; +import { Package } from '../../../../src/packageManager/package.ts'; +import type { AbsolutePathPackage as AbsolutePathPackageType } from '../../../../src/packageManager/absolutePathPackage.ts'; import { MockedFunction } from 'jest-mock'; import type * as fs from 'fs'; import { join } from 'path'; @@ -16,9 +16,9 @@ jest.unstable_mockModule('fs', async () => ({ ...(await import('node:fs')), stat: mockStat, })); -const { PlatformInformation } = await import('../../../../src/shared/platform'); -const { getNotInstalledPackagesForPlatform } = await import('../../../../src/packageManager/packageFilterer'); -const { AbsolutePathPackage } = await import('../../../../src/packageManager/absolutePathPackage'); +const { PlatformInformation } = await import('../../../../src/shared/platform.ts'); +const { getNotInstalledPackagesForPlatform } = await import('../../../../src/packageManager/packageFilterer.ts'); +const { AbsolutePathPackage } = await import('../../../../src/packageManager/absolutePathPackage.ts'); describe(`${getNotInstalledPackagesForPlatform.name}`, () => { let absolutePathPackages: AbsolutePathPackageType[]; diff --git a/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts b/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts index 4badabccc1..430d20460f 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/proxy.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect, beforeAll, afterAll, beforeEach } from '@jest/globals'; -import { getProxyAgent } from '../../../../src/packageManager/proxy'; +import { getProxyAgent } from '../../../../src/packageManager/proxy.ts'; import url from 'url'; describe(`${getProxyAgent.name}`, () => { diff --git a/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts b/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts index 7130110a4a..fac2d3481d 100644 --- a/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts +++ b/test/omnisharp/omnisharpUnitTests/packages/zipInstaller.test.ts @@ -6,16 +6,16 @@ import { describe, test, expect, beforeEach, afterEach } from '@jest/globals'; import fs from 'fs-extra'; import * as path from 'path'; -import * as util from '../../../../src/common'; -import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset'; -import { InstallZip } from '../../../../src/packageManager/zipInstaller'; -import { EventStream } from '../../../../src/eventStream'; -import { PlatformInformation } from '../../../../src/shared/platform'; -import { BaseEvent, InstallationStart, ZipError } from '../../../../src/shared/loggingEvents'; -import { createTestFile } from '../testAssets/testFile'; -import TestZip from '../testAssets/testZip'; -import TestEventBus from '../testAssets/testEventBus'; -import { AbsolutePath } from '../../../../src/packageManager/absolutePath'; +import * as util from '../../../../src/common.ts'; +import { CreateTmpDir, TmpAsset } from '../../../createTmpAsset.ts'; +import { InstallZip } from '../../../../src/packageManager/zipInstaller.ts'; +import { EventStream } from '../../../../src/eventStream.ts'; +import { PlatformInformation } from '../../../../src/shared/platform.ts'; +import { BaseEvent, InstallationStart, ZipError } from '../../../../src/shared/loggingEvents.ts'; +import { createTestFile } from '../testAssets/testFile.ts'; +import TestZip from '../testAssets/testZip.ts'; +import TestEventBus from '../testAssets/testEventBus.ts'; +import { AbsolutePath } from '../../../../src/packageManager/absolutePath.ts'; describe('ZipInstaller', () => { const binaries = [createTestFile('binary1', 'binary1.txt'), createTestFile('binary2', 'binary2.txt')]; diff --git a/test/omnisharp/omnisharpUnitTests/platform.test.ts b/test/omnisharp/omnisharpUnitTests/platform.test.ts index 4d332c22dd..c67e872f0d 100644 --- a/test/omnisharp/omnisharpUnitTests/platform.test.ts +++ b/test/omnisharp/omnisharpUnitTests/platform.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { LinuxDistribution } from '../../../src/shared/platform'; +import { LinuxDistribution } from '../../../src/shared/platform.ts'; describe('Platform', () => { test('Retrieve correct information for Ubuntu 14.04', () => { diff --git a/test/omnisharp/omnisharpUnitTests/processPicker.test.ts b/test/omnisharp/omnisharpUnitTests/processPicker.test.ts index 1f9f7f2381..dcb9c37d30 100644 --- a/test/omnisharp/omnisharpUnitTests/processPicker.test.ts +++ b/test/omnisharp/omnisharpUnitTests/processPicker.test.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, test, expect } from '@jest/globals'; -import { RemoteAttachPicker, Process, CimProcessParser } from '../../../src/shared/processPicker'; +import { RemoteAttachPicker, Process, CimProcessParser } from '../../../src/shared/processPicker.ts'; describe('Remote Process Picker: Validate quoting arguments.', () => { test('Argument with no spaces', () => { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts b/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts index 47a8db2c84..3c1c5d2519 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/getConfigChangeEvent.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ConfigurationChangeEvent } from '../../../../src/vscodeAdapter'; +import { ConfigurationChangeEvent } from '../../../../src/vscodeAdapter.ts'; export function GetConfigChangeEvent(changingConfig: string): ConfigurationChangeEvent { return { diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts b/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts index 5370d02e07..42d8702cc3 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/testEventBus.ts @@ -3,9 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { EventStream } from '../../../../src/eventStream'; -import { BaseEvent } from '../../../../src/shared/loggingEvents'; -import Disposable, { IDisposable } from '../../../../src/disposable'; +import { EventStream } from '../../../../src/eventStream.ts'; +import { BaseEvent } from '../../../../src/shared/loggingEvents.ts'; +import Disposable, { IDisposable } from '../../../../src/disposable.ts'; export default class TestEventBus { private eventBus: Array; diff --git a/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts b/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts index 45d109b9a0..7de47f82ea 100644 --- a/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts +++ b/test/omnisharp/omnisharpUnitTests/testAssets/testZip.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import archiver from 'archiver'; -import { TestFile } from './testFile'; +import { TestFile } from './testFile.ts'; export default class TestZip { constructor( diff --git a/test/razor/razorIntegrationTests/completion.integration.test.ts b/test/razor/razorIntegrationTests/completion.integration.test.ts index 76444b5011..a34ac65740 100644 --- a/test/razor/razorIntegrationTests/completion.integration.test.ts +++ b/test/razor/razorIntegrationTests/completion.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.ts'; describe(`Razor Hover ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/formatting.integration.test.ts b/test/razor/razorIntegrationTests/formatting.integration.test.ts index 8f31b37e02..fbf54f1e69 100644 --- a/test/razor/razorIntegrationTests/formatting.integration.test.ts +++ b/test/razor/razorIntegrationTests/formatting.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.ts'; describe(`Razor Formatting ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/hover.integration.test.ts b/test/razor/razorIntegrationTests/hover.integration.test.ts index 1ef66f6fb6..cdabeae3d7 100644 --- a/test/razor/razorIntegrationTests/hover.integration.test.ts +++ b/test/razor/razorIntegrationTests/hover.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.ts'; describe(`Razor Hover ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/index.ts b/test/razor/razorIntegrationTests/index.ts index 5cbd0a82c6..a229e0117e 100644 --- a/test/razor/razorIntegrationTests/index.ts +++ b/test/razor/razorIntegrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests.js'; +import { runIntegrationTests } from '../../runIntegrationTests.ts'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/razor/razorIntegrationTests/reference.integration.test.ts b/test/razor/razorIntegrationTests/reference.integration.test.ts index db16443eb2..e0312fde98 100644 --- a/test/razor/razorIntegrationTests/reference.integration.test.ts +++ b/test/razor/razorIntegrationTests/reference.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.ts'; describe(`Razor References ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/rename.integration.test.ts b/test/razor/razorIntegrationTests/rename.integration.test.ts index cfcf51c37f..cf38114253 100644 --- a/test/razor/razorIntegrationTests/rename.integration.test.ts +++ b/test/razor/razorIntegrationTests/rename.integration.test.ts @@ -6,8 +6,8 @@ import * as path from 'path'; import * as vscode from 'vscode'; import { beforeAll, afterAll, test, expect, beforeEach, describe } from '@jest/globals'; -import testAssetWorkspace from './testAssets/testAssetWorkspace'; -import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers'; +import testAssetWorkspace from './testAssets/testAssetWorkspace.ts'; +import * as integrationHelpers from '../../lsptoolshost/integrationTests/integrationHelpers.ts'; describe(`Razor Rename ${testAssetWorkspace.description}`, function () { beforeAll(async function () { diff --git a/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts b/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts index 8fdef79f25..2492b91a71 100644 --- a/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts +++ b/test/razor/razorIntegrationTests/testAssets/testAssetWorkspace.ts @@ -3,7 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITestAssetWorkspace, TestAssetWorkspace } from '../../../lsptoolshost/integrationTests/testAssets/testAssets'; +import { + ITestAssetWorkspace, + TestAssetWorkspace, +} from '../../../lsptoolshost/integrationTests/testAssets/testAssets.ts'; const workspace: ITestAssetWorkspace = { description: 'Basic Razor app', diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts index 6ddf2220ac..2cc0495898 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/addTagHelperDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts index cff873f625..ec3bf8cf3e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/attributeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts index 5acec8d531..e70d3cf983 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts index 26671f7d54..5bf21d7ea3 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/codeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts index f04db7eb76..256263d640 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/doStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts index 0bda9a4f81..1db5bc8a04 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/elsePart.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts index cc714c4dca..40d5f46e9e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressionInAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts index 2b8722132f..9dabaa0864 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/explicitExpressions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts index d800857605..51c55e2b3f 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/forStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts index 68e6c8342a..d1c6a2e8d0 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/foreachStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts index 37cb1d37dc..fd579c74e1 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/functionsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts index dff265a4ab..3ac368c467 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/grammarTests.test.ts @@ -4,45 +4,45 @@ *--------------------------------------------------------------------------------------------*/ import { describe } from '@jest/globals'; -import { RunAddTagHelperDirectiveSuite } from './addTagHelperDirective'; -import { RunAttributeDirectiveSuite } from './attributeDirective'; -import { RunCodeBlockSuite } from './codeBlock'; -import { RunCodeDirectiveSuite } from './codeDirective'; -import { RunDoStatementSuite } from './doStatement'; -import { RunElsePartSuite } from './elsePart'; -import { RunExplicitExpressionInAttributeSuite } from './explicitExpressionInAttribute'; -import { RunExplicitExpressionSuite } from './explicitExpressions'; -import { RunForeachStatementSuite } from './foreachStatement'; -import { RunForStatementSuite } from './forStatement'; -import { RunFunctionsDirectiveSuite } from './functionsDirective'; -import { RunIfStatementSuite } from './ifStatement'; -import { RunImplementsDirectiveSuite } from './implementsDirective'; -import { RunImplicitExpressionInAttributeSuite } from './implicitExpressionInAttribute'; -import { RunImplicitExpressionSuite } from './implicitExpressions'; -import { RunInheritsDirectiveSuite } from './inheritsDirective'; -import { RunInjectDirectiveSuite } from './injectDirective'; -import { RunLayoutDirectiveSuite } from './layoutDirective'; -import { RunLockStatementSuite } from './lockStatement'; -import { RunModelDirectiveSuite } from './modelDirective'; -import { RunNamespaceDirectiveSuite } from './namespaceDirective'; -import { RunPageDirectiveSuite } from './pageDirective'; -import { RunRazorCommentSuite } from './razorComment'; -import { RunRazorTemplateSuite } from './razorTemplate'; -import { RunRemoveTagHelperDirectiveSuite } from './removeTagHelperDirective'; -import { RunScriptBlockSuite } from './scriptBlock'; -import { RunSectionDirectiveSuite } from './sectionDirective'; -import { RunStyleBlockSuite } from './styleBlock'; -import { RunSwitchStatementSuite } from './switchStatement'; -import { RunTagHelperPrefixDirectiveSuite } from './tagHelperPrefixDirective'; -import { RunTransitionsSuite } from './transitions'; -import { RunTryStatementSuite } from './tryStatement'; -import { RunUsingDirectiveSuite } from './usingDirective'; -import { RunUsingStatementSuite } from './usingStatement'; -import { RunWhileStatementSuite } from './whileStatement'; -import { RunRendermodeDirectiveSuite } from './rendermodeDirective'; -import { RunPreservewhitespaceDirectiveSuite } from './preservewhitespaceDirective'; -import { RunTypeparamDirectiveSuite } from './typeparamDirective'; -import { RunHTMLDynamicAttributeSuite } from './htmlDynamicAttribute'; +import { RunAddTagHelperDirectiveSuite } from './addTagHelperDirective.ts'; +import { RunAttributeDirectiveSuite } from './attributeDirective.ts'; +import { RunCodeBlockSuite } from './codeBlock.ts'; +import { RunCodeDirectiveSuite } from './codeDirective.ts'; +import { RunDoStatementSuite } from './doStatement.ts'; +import { RunElsePartSuite } from './elsePart.ts'; +import { RunExplicitExpressionInAttributeSuite } from './explicitExpressionInAttribute.ts'; +import { RunExplicitExpressionSuite } from './explicitExpressions.ts'; +import { RunForeachStatementSuite } from './foreachStatement.ts'; +import { RunForStatementSuite } from './forStatement.ts'; +import { RunFunctionsDirectiveSuite } from './functionsDirective.ts'; +import { RunIfStatementSuite } from './ifStatement.ts'; +import { RunImplementsDirectiveSuite } from './implementsDirective.ts'; +import { RunImplicitExpressionInAttributeSuite } from './implicitExpressionInAttribute.ts'; +import { RunImplicitExpressionSuite } from './implicitExpressions.ts'; +import { RunInheritsDirectiveSuite } from './inheritsDirective.ts'; +import { RunInjectDirectiveSuite } from './injectDirective.ts'; +import { RunLayoutDirectiveSuite } from './layoutDirective.ts'; +import { RunLockStatementSuite } from './lockStatement.ts'; +import { RunModelDirectiveSuite } from './modelDirective.ts'; +import { RunNamespaceDirectiveSuite } from './namespaceDirective.ts'; +import { RunPageDirectiveSuite } from './pageDirective.ts'; +import { RunRazorCommentSuite } from './razorComment.ts'; +import { RunRazorTemplateSuite } from './razorTemplate.ts'; +import { RunRemoveTagHelperDirectiveSuite } from './removeTagHelperDirective.ts'; +import { RunScriptBlockSuite } from './scriptBlock.ts'; +import { RunSectionDirectiveSuite } from './sectionDirective.ts'; +import { RunStyleBlockSuite } from './styleBlock.ts'; +import { RunSwitchStatementSuite } from './switchStatement.ts'; +import { RunTagHelperPrefixDirectiveSuite } from './tagHelperPrefixDirective.ts'; +import { RunTransitionsSuite } from './transitions.ts'; +import { RunTryStatementSuite } from './tryStatement.ts'; +import { RunUsingDirectiveSuite } from './usingDirective.ts'; +import { RunUsingStatementSuite } from './usingStatement.ts'; +import { RunWhileStatementSuite } from './whileStatement.ts'; +import { RunRendermodeDirectiveSuite } from './rendermodeDirective.ts'; +import { RunPreservewhitespaceDirectiveSuite } from './preservewhitespaceDirective.ts'; +import { RunTypeparamDirectiveSuite } from './typeparamDirective.ts'; +import { RunHTMLDynamicAttributeSuite } from './htmlDynamicAttribute.ts'; // We bring together all test suites and wrap them in one here. The reason behind this is that // modules get reloaded per test suite and the vscode-textmate library doesn't support the way diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts index 3a86ebec48..02ec0f4ed0 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/htmlDynamicAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts index 0c46756f4c..dcdd5d2dbe 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/ifStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts index 7a14291168..8c222b5186 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implementsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts index 60a32935d4..5292180b1e 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressionInAttribute.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts index 788a66cd49..414b3148ff 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/implicitExpressions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts index 7e09070506..65af772317 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/snapshotFactory.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { ITokenizedContent } from './ITokenizedContent'; +import { ITokenizedContent } from './ITokenizedContent.ts'; export function createSnapshot(tokenizedContent: ITokenizedContent): string { const snapshotLines: string[] = []; diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts index 36acf8d37b..879aaaa21f 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts @@ -4,8 +4,8 @@ *--------------------------------------------------------------------------------------------*/ import { expect } from '@jest/globals'; -import { createSnapshot } from './snapshotFactory'; -import { tokenize } from './tokenizedContentProvider'; +import { createSnapshot } from './snapshotFactory.ts'; +import { tokenize } from './tokenizedContentProvider.ts'; export async function assertMatchesSnapshot(content: string) { const tokenizedContent = await tokenize(content); diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts index 9f92f7f9fd..8fb41c639c 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/tokenizedContentProvider.ts @@ -9,7 +9,7 @@ import { fileURLToPath } from 'url'; import oniguruma from 'vscode-oniguruma'; import vscodeTextmate from 'vscode-textmate'; import type { IGrammar, IRawGrammar, ITokenizeLineResult } from 'vscode-textmate'; -import { ITokenizedContent } from './ITokenizedContent'; +import { ITokenizedContent } from './ITokenizedContent.ts'; const { INITIAL, parseRawGrammar, Registry } = vscodeTextmate; let razorGrammarCache: IGrammar | undefined; diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts index b3a29d0204..01d7462ac4 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/inheritsDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts index 7dfbdcada2..0c4f6dc320 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/injectDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts index 0b1ae02425..7135a680c4 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/layoutDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts index c2c0542270..56a6af3330 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/lockStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts index 6764132696..2ff488a45f 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/modelDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts index 39f5c5cc4e..cffe1c1609 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/namespaceDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts index 03294fecd7..2f0ed753b3 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/pageDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts index c81b59d014..c86e2f3aad 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/preservewhitespaceDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts index 45db85a3eb..1322096e7a 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorComment.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts index 00f384c295..f3940049da 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/razorTemplate.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts index bf7aaf493e..6663648ed7 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/removeTagHelperDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts index 9da60b4e5b..a9c64b0f57 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/rendermodeDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts index 49a55f3a41..9ab24238dd 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/scriptBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts index 7c3ad559a5..5c02642b64 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/sectionDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts index 741e7a392b..29fbbb3917 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/styleBlock.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts index 736624bd27..fbbbc088bf 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/switchStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts index befb4f29a0..64ef1c7a96 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tagHelperPrefixDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts index 7a4f6831ef..a12c3f7055 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/transitions.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts index bc85c2719b..b3cb0d4577 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/tryStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts index 8930205497..f3dd04895d 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/typeparamDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts index cd77473a5e..89f2a44dea 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingDirective.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts index 6d65b804d6..4dcb741b84 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/usingStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts index 2a57cfd265..ab81559027 100644 --- a/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts +++ b/test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/whileStatement.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { describe, it } from '@jest/globals'; -import { assertMatchesSnapshot } from './infrastructure/testUtilities'; +import { assertMatchesSnapshot } from './infrastructure/testUtilities.ts'; // See GrammarTests.test.ts for details on exporting this test suite instead of running in place. diff --git a/test/tasks/versionHelper.test.ts b/test/tasks/versionHelper.test.ts index 2ba42ef180..679cf316a7 100644 --- a/test/tasks/versionHelper.test.ts +++ b/test/tasks/versionHelper.test.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { getNextReleaseVersion } from '../../tasks/snap/snapTasks'; +import { getNextReleaseVersion } from '../../tasks/snap/snapTasks.ts'; import { describe, test, expect } from '@jest/globals'; describe('getNextReleaseVersion', () => { diff --git a/test/untrustedWorkspace/integrationTests/index.ts b/test/untrustedWorkspace/integrationTests/index.ts index ae4e386a8d..09032c55de 100644 --- a/test/untrustedWorkspace/integrationTests/index.ts +++ b/test/untrustedWorkspace/integrationTests/index.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { runIntegrationTests } from '../../runIntegrationTests.js'; +import { runIntegrationTests } from '../../runIntegrationTests.ts'; import { jestProjectNames } from '../../jestProjectNames.mjs'; export async function run() { diff --git a/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts b/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts index 2068e1dfd4..019b594e3c 100644 --- a/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts +++ b/test/untrustedWorkspace/integrationTests/untrustedWorkspace.integration.test.ts @@ -5,7 +5,7 @@ import { describe, expect, jest, test } from '@jest/globals'; import * as vscode from 'vscode'; -import { CSharpExtensionExports, LimitedExtensionExports } from '../../../src/csharpExtensionExports'; +import { CSharpExtensionExports, LimitedExtensionExports } from '../../../src/csharpExtensionExports.ts'; describe(`Untrusted Workspace`, () => { test(`Limited activation in untrusted workspace`, async () => { diff --git a/test/vsCodeUnitFramework.ts b/test/vsCodeUnitFramework.ts index f8ffdf9e71..2d44262306 100644 --- a/test/vsCodeUnitFramework.ts +++ b/test/vsCodeUnitFramework.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { jest } from '@jest/globals'; -import * as mockVsCode from '../__mocks__/vscode'; +import * as mockVsCode from '../__mocks__/vscode.ts'; jest.mock('vscode', () => mockVsCode, { virtual: true }); jest.unstable_mockModule('vscode', () => mockVsCode, { virtual: true }); diff --git a/test/vscodeLauncher.ts b/test/vscodeLauncher.ts index 639925b8d3..03c2f16cd3 100644 --- a/test/vscodeLauncher.ts +++ b/test/vscodeLauncher.ts @@ -6,7 +6,7 @@ import * as cp from 'child_process'; import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; -import { execChildProcess } from '../src/common'; +import { execChildProcess } from '../src/common.ts'; export async function prepareVSCodeAndExecuteTests( extensionDevelopmentPath: string, diff --git a/tsconfig.integration.json b/tsconfig.integration.json deleted file mode 100644 index be5c5fdc76..0000000000 --- a/tsconfig.integration.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "NodeNext", - "moduleResolution": "NodeNext", - "noEmit": false, - "rootDir": ".", - "outDir": "out" - }, - "include": [ - "test/runIntegrationTests.ts", - "test/lsptoolshost/integrationTests/index.ts", - "test/omnisharp/omnisharpIntegrationTests/index.ts", - "test/razor/razorIntegrationTests/index.ts", - "test/untrustedWorkspace/integrationTests/index.ts" - ] -} diff --git a/tsconfig.json b/tsconfig.json index f3c1de24e9..37f1f3b38e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "esModuleInterop": true, "target": "ES2022", - "module": "Preserve", + "module": "NodeNext", "outDir": "out", "lib": [ "ES2021" @@ -27,9 +27,9 @@ "vscode-jsonrpc/node": ["./node_modules/vscode-jsonrpc/lib/node/main"], }, "sourceMap": true, - "moduleResolution": "Bundler", + "moduleResolution": "NodeNext", "moduleDetection": "force", - "noEmit": true, + "rewriteRelativeImportExtensions": true, "isolatedModules": true, "strict": true, "forceConsistentCasingInFileNames": true,