mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
[css/json/html] adopt latest lsp, update to module: node16 (#230371)
* adopt latest language-server/client * update package-locks * transpiler to support Node16
This commit is contained in:
committed by
GitHub
parent
52b181c2ce
commit
fc6d94b806
@@ -22,7 +22,7 @@ const messageHandler = async (e: any) => {
|
||||
} else {
|
||||
l10nLog.push(`l10n: No bundle configured.`);
|
||||
}
|
||||
await import('./htmlServerMain');
|
||||
await import('./htmlServerMain.js');
|
||||
if (self.onmessage !== messageHandler) {
|
||||
pendingMessages.forEach(msg => self.onmessage?.(msg));
|
||||
pendingMessages.length = 0;
|
||||
|
||||
@@ -22,7 +22,7 @@ function getLanguageServiceHost(scriptKind: ts.ScriptKind) {
|
||||
const compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es2020.full.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic, experimentalDecorators: false };
|
||||
|
||||
let currentTextDocument = TextDocument.create('init', 'javascript', 1, '');
|
||||
const jsLanguageService = import(/* webpackChunkName: "javascriptLibs" */ './javascriptLibs').then(libs => {
|
||||
const jsLanguageService = import(/* webpackChunkName: "javascriptLibs" */ './javascriptLibs.js').then(libs => {
|
||||
const host: ts.LanguageServiceHost = {
|
||||
getCompilationSettings: () => compilerOptions,
|
||||
getScriptFileNames: () => [currentTextDocument.uri, 'jquery'],
|
||||
|
||||
@@ -16,7 +16,7 @@ async function setupMain() {
|
||||
l10nLog.push(`l10n: Problems loading ${i10lLocation.toString()} : ${e}`);
|
||||
}
|
||||
}
|
||||
await import('./htmlServerMain');
|
||||
await import('./htmlServerMain.js');
|
||||
l10nLog.forEach(console.log);
|
||||
}
|
||||
setupMain();
|
||||
|
||||
@@ -24,8 +24,8 @@ suite('HTML Language Configuration', () => {
|
||||
value = value.substr(0, offset) + value.substring(offset + 1);
|
||||
|
||||
const actualRange = words.getWordAtText(value, offset, wordRegex);
|
||||
assert(actualRange.start <= offset);
|
||||
assert(actualRange.start + actualRange.length >= offset);
|
||||
assert.ok(actualRange.start <= offset);
|
||||
assert.ok(actualRange.start + actualRange.length >= offset);
|
||||
assert.strictEqual(value.substr(actualRange.start, actualRange.length), expected);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user