Skip to content

Commit d7d23b1

Browse files
committed
Merge remote-tracking branch 'upstream/main' into project_load_telemetry
2 parents 86a448d + b5f8db1 commit d7d23b1

File tree

62 files changed

+21256
-13686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+21256
-13686
lines changed

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"recommendations": [
33
"dbaeumer.vscode-eslint",
4-
"esbenp.prettier-vscode"
4+
"esbenp.prettier-vscode",
5+
"orta.vscode-jest"
56
]
67
}

.vscode/launch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@
286286
"updatePackageDependencies"
287287
],
288288
"env": {
289-
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/8c9c1628f3f28e5f64f372f626a439e2/razorlanguageserver-linux-arm64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/6b6cbece19bb5ad0b600204331a198f4/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/2fb0c50bc18dd700f701038729819cdb/razorlanguageserver-linux-musl-x64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/73fd71513d102f55a73a58cd0d4687a0/razorlanguageserver-linux-x64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/17ec15d73d72e0422c25b24160790430/razorlanguageserver-osx-arm64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/7c2ae5db88ce4bf2497cea5594309f00/razorlanguageserver-osx-x64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/63f3cd0e2ceaa4e686657c7519a39a1f/razorlanguageserver-win-arm64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/e3907604c19170097ba390f61c2cecfe/razorlanguageserver-win-x64-7.0.0-preview.23421.4.zip,https://download.visualstudio.microsoft.com/download/pr/881c5617-50b5-49fa-9075-2eadb1bb4a20/10de878742e068fda1f4c6afa05d023b/razorlanguageserver-win-x86-7.0.0-preview.23421.4.zip",
290-
"NEW_DEPS_VERSION": "7.0.0-preview.23421.4",
289+
"NEW_DEPS_URLS": "https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/4aca138f5c6299422e240dcc50689a67/razorlanguageserver-linux-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/eee386c129c18ba1705fe411cb981a20/razorlanguageserver-linux-musl-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/7d1e4e0bf72de43dc272d22de2486633/razorlanguageserver-linux-musl-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/b9653cb6c40f965986266f70ae7dab25/razorlanguageserver-linux-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/679c6fe63c016298914264c33326f2ea/razorlanguageserver-osx-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/74f8a06bc496f54b37466c382c6744ee/razorlanguageserver-osx-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/695b332017bfa81af74787904979fde8/razorlanguageserver-win-arm64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/a48c3e83b44a34ddb295099c55e31e7e/razorlanguageserver-win-x64-7.0.0-preview.23423.3.zip,https://download.visualstudio.microsoft.com/download/pr/0b0d800b-570c-446a-8e29-4130bd68c63b/e188fa3cbd9a5601701d0f8de0705496/razorlanguageserver-win-x86-7.0.0-preview.23423.3.zip",
290+
"NEW_DEPS_VERSION": "7.0.0-preview.23423.3",
291291
"NEW_DEPS_ID": "Razor"
292292
},
293293
"cwd": "${workspaceFolder}"

__mocks__/vscode.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import * as vscodeAdapter from '../src/vscodeAdapter';
7+
import { getFakeVsCode } from '../test/unitTests/fakes';
8+
9+
// This module creates a manual mock for the vscode module for running in unit tests.
10+
// Jest will automatically pick this up as it is in the __mocks__ directory next to node_modules.
11+
12+
// We can consider switching to an actual jest mock (instead of this manual fake) once we entirely
13+
// remove the old test framework (mocha/chai).
14+
const vscode: vscodeAdapter.vscode = getFakeVsCode();
15+
module.exports = vscode;

azure-pipelines.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,25 @@ stages:
3939
matrix:
4040
linux:
4141
demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
42+
windows:
43+
demandsName: ImageOverride -equals 1es-windows-2022-open
4244
pool:
4345
name: NetCore-Public
4446
demands: $(demandsName)
4547
steps:
4648
- template: azure-pipelines/test.yml
49+
50+
- stage: Test_Omnisharp
51+
displayName: Test Omnisharp
52+
dependsOn: []
53+
jobs:
54+
- job: Test
55+
strategy:
56+
matrix:
57+
linux:
58+
demandsName: ImageOverride -equals Build.Ubuntu.2204.Amd64.Open
59+
pool:
60+
name: NetCore-Public
61+
demands: $(demandsName)
62+
steps:
63+
- template: azure-pipelines/test-omnisharp.yml

azure-pipelines/test-omnisharp.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
steps:
2+
- checkout: self
3+
clean: true
4+
submodules: true
5+
fetchTags: false
6+
fetchDepth: 1
7+
8+
- template: prereqs.yml
9+
10+
- pwsh: |
11+
if ($IsLinux) {
12+
Write-Host "Activating screen emulation"
13+
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
14+
$env:DISPLAY=':99.0'
15+
Write-Host "Now running tests"
16+
}
17+
18+
npm run omnisharptest
19+
displayName: 🧪 Run unit and integration tests
20+
21+
- task: PublishPipelineArtifact@1
22+
condition: failed()
23+
displayName: 'Upload integration test logs'
24+
inputs:
25+
targetPath: '$(Build.SourcesDirectory)/.vscode-test/user-data/logs'
26+
artifactName: 'VSCode Test Logs ($(Agent.JobName)-$(System.JobAttempt))'

azure-pipelines/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ steps:
1515
Write-Host "Now running tests"
1616
}
1717
18-
npm run omnisharptest
18+
npm run test
1919
displayName: 🧪 Run unit and integration tests
2020

2121
- task: PublishPipelineArtifact@1

jest.config.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
import type { Config } from 'jest';
6+
7+
const config: Config = {
8+
verbose: true,
9+
preset: 'ts-jest',
10+
testEnvironment: 'node',
11+
transformIgnorePatterns: ['/dist/.+\\.js'],
12+
// We need to explicity ignore the out directory for modules - otherwise we'll get duplicate vscode module,
13+
// the TS version from the __mocks__ directory and the compiled js version from the out directory.
14+
modulePathIgnorePatterns: ['out'],
15+
// Specify jest to only run tests in jest folders.
16+
// We also have to include the __mocks__ folder. That folder must be next to node_modules so we can't move it,
17+
// but if we specify roots, jest won't automatically pick it up. So we have to specify it here.
18+
roots: ['<rootDir>/test/unitTests', '<rootDir>/omnisharptest/omnisharpJestTests', '<rootDir>/__mocks__'],
19+
};
20+
21+
export default config;

l10n/bundle.l10n.cs.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.": "Při instalaci ladicího programu .NET došlo k chybě. Rozšíření C# může být nutné přeinstalovat.",
77
"Author": "Autor",
88
"Bug": "Chyba",
9+
"C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "C# configuration has changed. Would you like to relaunch the Language Server with your changes?",
10+
"C# configuration has changed. Would you like to reload the window to apply your changes?": "C# configuration has changed. Would you like to reload the window to apply your changes?",
911
"Can't parse envFile {0} because of {1}": "Nelze analyzovat envFile {0} z důvodu {1}",
1012
"Cancel": "Zrušit",
1113
"Cannot create .NET debug configurations. No workspace folder was selected.": "Nelze vytvořit konfigurace ladění .NET. Nebyla vybrána žádná složka pracovního prostoru.",
@@ -90,6 +92,7 @@
9092
"Razor issue data collection started. Reproduce the issue then press \"Stop\"": "Spustilo se shromažďování dat o problému Razor. Reprodukujte problém a stiskněte Zastavit.",
9193
"Razor issue data collection stopped. Copying issue content...": "Shromažďování dat o problému s Razorem se zastavilo. Kopíruje se obsah problému…",
9294
"Razor.VSCode version": "Verze Razor.VSCode",
95+
"Reload Window": "Reload Window",
9396
"Replace existing build and debug assets?": "Nahradit existující prostředky sestavení a ladění?",
9497
"Report Razor Issue": "Nahlásit problém s Razorem",
9598
"Report a Razor issue": "Nahlásit problém s Razorem",
@@ -145,6 +148,7 @@
145148
"[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.": "[CHYBA] Ladicí program nelze nainstalovat. Ladicí program vyžaduje macOS 10.12 (Sierra) nebo novější.",
146149
"[ERROR] The debugger cannot be installed. Unknown platform.": "[CHYBA] Ladicí program nelze nainstalovat. Neznámá platforma.",
147150
"[ERROR]: C# Extension failed to install the debugger package.": "[CHYBA]: Rozšíření jazyka C# se nepodařilo nainstalovat balíček ladicího programu.",
151+
"dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change",
148152
"pipeArgs must be a string or a string array type": "pipeArgs musí být řetězec nebo typ pole řetězců",
149153
"{0} references": "Počet odkazů: {0}",
150154
"{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, vložte obsah problému jako text problému. Nezapomeňte vyplnit všechny podrobnosti, které ještě vyplněné nejsou."

l10n/bundle.l10n.de.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.": "Fehler bei der Installation des .NET-Debuggers. Die C#-Erweiterung muss möglicherweise neu installiert werden.",
77
"Author": "Autor",
88
"Bug": "Fehler",
9+
"C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "C# configuration has changed. Would you like to relaunch the Language Server with your changes?",
10+
"C# configuration has changed. Would you like to reload the window to apply your changes?": "C# configuration has changed. Would you like to reload the window to apply your changes?",
911
"Can't parse envFile {0} because of {1}": "envFile {0} kann aufgrund von {1} nicht analysiert werden.",
1012
"Cancel": "Abbrechen",
1113
"Cannot create .NET debug configurations. No workspace folder was selected.": ".NET-Debugkonfigurationen können nicht erstellt werden. Es wurde kein Arbeitsbereichsordner ausgewählt.",
@@ -90,6 +92,7 @@
9092
"Razor issue data collection started. Reproduce the issue then press \"Stop\"": "Die Sammlung von Razor-Problemdaten wurde gestartet. Reproduzieren Sie das Problem, und drücken Sie dann \"Beenden\".",
9193
"Razor issue data collection stopped. Copying issue content...": "Die Sammlung von Razor-Problemdaten wurde beendet. Probleminhalt wird kopiert...",
9294
"Razor.VSCode version": "Razor.VSCode-Version",
95+
"Reload Window": "Reload Window",
9396
"Replace existing build and debug assets?": "Vorhandene Build- und Debugressourcen ersetzen?",
9497
"Report Razor Issue": "Razor-Problem melden",
9598
"Report a Razor issue": "Razor-Problem melden",
@@ -145,6 +148,7 @@
145148
"[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.": "[FEHLER] Der Debugger kann nicht installiert werden. Der Debugger erfordert macOS 10.12 (Sierra) oder höher.",
146149
"[ERROR] The debugger cannot be installed. Unknown platform.": "[FEHLER] Der Debugger kann nicht installiert werden. Unbekannte Plattform.",
147150
"[ERROR]: C# Extension failed to install the debugger package.": "[FEHLER]: Fehler beim Installieren des Debuggerpakets durch die C#-Erweiterung.",
151+
"dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change",
148152
"pipeArgs must be a string or a string array type": "pipeArgs muss eine Zeichenfolge oder ein Zeichenfolgenarraytyp sein.",
149153
"{0} references": "{0} Verweise",
150154
"{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, fügen Sie den Inhalt des Problems als Textkörper des Problems ein. Vergessen Sie nicht, alle nicht ausgefüllten Details auszufüllen."

l10n/bundle.l10n.es.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"An error occurred during installation of the .NET Debugger. The C# extension may need to be reinstalled.": "Error durante la instalación del depurador de .NET. Es posible que sea necesario reinstalar la extensión de C#.",
77
"Author": "Autor",
88
"Bug": "Error",
9+
"C# configuration has changed. Would you like to relaunch the Language Server with your changes?": "C# configuration has changed. Would you like to relaunch the Language Server with your changes?",
10+
"C# configuration has changed. Would you like to reload the window to apply your changes?": "C# configuration has changed. Would you like to reload the window to apply your changes?",
911
"Can't parse envFile {0} because of {1}": "No se puede analizar envFile {0} debido a {1}",
1012
"Cancel": "Cancelar",
1113
"Cannot create .NET debug configurations. No workspace folder was selected.": "No se pueden crear configuraciones de depuración de .NET. No se seleccionó ninguna carpeta del área de trabajo.",
@@ -90,6 +92,7 @@
9092
"Razor issue data collection started. Reproduce the issue then press \"Stop\"": "Se inició la recopilación de datos de problemas de Razor. Reproduzca el problema y, a continuación, presione \"Detener\".",
9193
"Razor issue data collection stopped. Copying issue content...": "Se detuvo la recopilación de datos de problemas de Razor. Copiando el contenido del problema...",
9294
"Razor.VSCode version": "Versión de Razor.VSCode",
95+
"Reload Window": "Reload Window",
9396
"Replace existing build and debug assets?": "¿Quiere reemplazar los recursos de compilación y depuración existentes?",
9497
"Report Razor Issue": "Notificar problema de Razor",
9598
"Report a Razor issue": "Notificar un problema de Razor",
@@ -145,6 +148,7 @@
145148
"[ERROR] The debugger cannot be installed. The debugger requires macOS 10.12 (Sierra) or newer.": "[ERROR] No se puede instalar el depurador. El depurador requiere macOS 10.12 (Sierra) o posterior.",
146149
"[ERROR] The debugger cannot be installed. Unknown platform.": "[ERROR] No se puede instalar el depurador. Plataforma desconocida.",
147150
"[ERROR]: C# Extension failed to install the debugger package.": "[ERROR]: la extensión de C# no pudo instalar el paquete del depurador.",
151+
"dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change": "dotnet.server.useOmnisharp option has changed. Please reload the window to apply the change",
148152
"pipeArgs must be a string or a string array type": "pipeArgs debe ser una cadena o un tipo de matriz de cadena",
149153
"{0} references": "{0} referencias",
150154
"{0}, paste your issue contents as the body of the issue. Don't forget to fill out any details left unfilled.": "{0}, pegue el contenido del problema como el cuerpo del problema. No olvide rellenar los detalles que no se han rellenado."

0 commit comments

Comments
 (0)