diff --git a/.gitignore b/.gitignore index db4e5649..0e373567 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,9 @@ node_modules *.vsix scripts/* *.js -*.cjs *.js.map *.tsbuildinfo -**/dist/**/*.d.ts \ No newline at end of file +**/dist/**/*.d.ts + +# Vitest +coverage \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index e8bc4a40..2e589f88 100644 --- a/.prettierignore +++ b/.prettierignore @@ -9,7 +9,7 @@ scripts/* server/expr_parser/* client/src/browserClientMain.ts -client/src/extension.cts +client/src/extension.ts client/src/test/utils.ts server/src/ahkProvider.ts server/src/browserServerMain.ts diff --git a/.vscode-test.mjs b/.vscode-test.mjs new file mode 100644 index 00000000..11029cf2 --- /dev/null +++ b/.vscode-test.mjs @@ -0,0 +1,19 @@ +// https://github.com/microsoft/vscode-test-cli +import { defineConfig } from '@vscode/test-cli'; +import { execSync } from 'child_process'; + +let vscode_path = undefined; +try { + const m = execSync( + 'chcp 65001 && reg query HKCR\\vscode\\shell\\open\\command', + { encoding: 'utf8' }, + ).match(/REG_SZ\s+("([^"]+)"|\S+)/); + vscode_path = m[2] || m[1]; +} catch {} + +export default defineConfig({ + files: 'client/dist/test/**/*.e2e.js', + useInstallation: vscode_path && { + fromPath: vscode_path, + }, +}); diff --git a/.vscode/extensions.json b/.vscode/extensions.json index e22fcc88..bb3324e2 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,6 +2,7 @@ "recommendations": [ "aaron-bond.better-comments", "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode" + "esbenp.prettier-vscode", + "vitest.explorer" ] } diff --git a/.vscode/launch.json b/.vscode/launch.json index aaee596a..7aae83be 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -34,7 +34,7 @@ "runtimeExecutable": "${execPath}", "args": ["--extensionDevelopmentPath=${workspaceFolder}"], "env": { - "VSCODE_AHK_SERVER_PATH": "server/dist/server.cjs", + "VSCODE_AHK_SERVER_PATH": "server/dist/server.js", "SYNTAXES_PATH": "syntaxes" }, "outFiles": ["${workspaceFolder}/client/dist/**/*.js"], diff --git a/.vscode/snippets.code-snippets b/.vscode/snippets.code-snippets new file mode 100644 index 00000000..3b6b41e3 --- /dev/null +++ b/.vscode/snippets.code-snippets @@ -0,0 +1,40 @@ +{ + // Place your ahk2 workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and + // description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope + // is left empty or omitted, the snippet gets applied to all languages. The prefix is what is + // used to trigger the snippet and the body will be expanded and inserted. Possible variables are: + // $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. + // Placeholders with the same ids are connected. + // Example: + // "Print to console": { + // "scope": "javascript,typescript", + // "prefix": "log", + // "body": [ + // "console.log('$1');", + // "$2" + // ], + // "description": "Log output to console" + // } + + "Add unit test": { + "scope": "typescript", + "prefix": "describe", + "body": [ + "describe('$1', () => {", + "\ttest.concurrent.each<", + "\t[", + "\t\tname: string,", + "\t\t\targs: Parameters,", + "\t\t\texpected: ReturnType,", + "\t\t]", + "\t>([", + "\t['$2', [$3], $4],", + "\t])('%s', (_name, args, expected) => {", + "\t\tconst result = $1(...args);", + "\t\texpect(result).toBe(expected);", + "\t});", + "});", + ], + "description": "Add Vitest test.concurrent.each in a describe block", + }, +} diff --git a/build.mjs b/build.mjs index d6bc0ddc..0cd27f44 100644 --- a/build.mjs +++ b/build.mjs @@ -14,7 +14,7 @@ console.log( build({ entryPoints: [path.join('./server/src/server.ts')], bundle: true, - outfile: path.join('./server/dist/server.cjs'), + outfile: path.join('./server/dist/server.js'), external: ['vscode'], format: 'cjs', platform: 'node', @@ -25,9 +25,9 @@ build({ // Node client (not necessary for AHK++, but super fast) // https://esbuild.github.io/api build({ - entryPoints: [path.join('./client/src/extension.cts')], + entryPoints: [path.join('./client/src/extension.ts')], bundle: true, - outfile: path.join('./client/dist/extension.cjs'), + outfile: path.join('./client/dist/extension.js'), external: ['vscode'], format: 'cjs', platform: 'node', diff --git a/client/package.json b/client/package.json index e33d84ed..4c7e43a8 100644 --- a/client/package.json +++ b/client/package.json @@ -3,10 +3,6 @@ "description": "VSCode part of a language server", "license": "MIT", "version": "0.0.1", - "type": "module", - "scripts": { - "compile-ts": "tsc" - }, "engines": { "vscode": "^1.43.0" } diff --git a/client/src/browserClientMain.ts b/client/src/browserClientMain.ts new file mode 100644 index 00000000..5e8e4267 --- /dev/null +++ b/client/src/browserClientMain.ts @@ -0,0 +1,127 @@ +//* ⚠️ Not currently used in AHK++ + +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +import { commands, ExtensionContext, languages, Range, RelativePattern, SnippetString, Uri, window, workspace, WorkspaceEdit } from 'vscode'; +import { LanguageClient } from 'vscode-languageclient/browser'; + +let client: LanguageClient; + +// this method is called when vs code is activated +export function activate(context: ExtensionContext) { + const serverMain = Uri.joinPath(context.extensionUri, 'server/dist/browserServerMain.js'); + /* eslint-disable-next-line */ + const request_handlers: Record any> = { + 'ahk2.getActiveTextEditorUriAndPosition': () => { + const editor = window.activeTextEditor; + if (!editor) return; + const uri = editor.document.uri.toString(), position = editor.selection.end; + return { uri, position }; + }, + 'ahk2.insertSnippet': async (params: [string, Range?]) => { + const editor = window.activeTextEditor; + if (!editor) return; + if (params[1]) { + const { start, end } = params[1]; + await editor.insertSnippet(new SnippetString(params[0]), new Range(start.line, start.character, end.line, end.character)); + } else + editor.insertSnippet(new SnippetString(params[0])); + }, + 'ahk2.setTextDocumentLanguage': async (params: [string, string?]) => { + const lang = params[1] || 'ahk'; + if (!(await languages.getLanguages()).includes(lang)) { + window.showErrorMessage(`Unknown language id: ${lang}`); + return; + } + const uri = params[0], it = workspace.textDocuments.find(it => it.uri.toString() === uri); + it && languages.setTextDocumentLanguage(it, lang); + }, + 'ahk2.getWorkspaceFiles': async (params: string[]) => { + const all = !params.length; + if (workspace.workspaceFolders) { + if (all) + return (await workspace.findFiles('**/*.{ahk,ah2,ahk2}')).forEach(it => it.toString()); + else { + const files: string[] = []; + for (const folder of workspace.workspaceFolders) + if (params.includes(folder.uri.toString().toLowerCase())) + files.push(...(await workspace.findFiles(new RelativePattern(folder, '*.{ahk,ah2,ahk2}'))).map(it => it.toString())); + return files; + } + } + }, + 'ahk2.getWorkspaceFileContent': async (params: string[]) => (await workspace.openTextDocument(Uri.parse(params[0]))).getText() + }; + + client = new LanguageClient('AutoHotkey2', 'AutoHotkey2', { + documentSelector: [{ language: 'ahk2' }], + markdown: { isTrusted: true, supportHtml: true }, + initializationOptions: { + extensionUri: context.extensionUri.toString(), + commands: Object.keys(request_handlers), + ...JSON.parse(JSON.stringify(workspace.getConfiguration('AutoHotkey2'))) + } + }, new Worker(serverMain.toString())); + + context.subscriptions.push( + commands.registerTextEditorCommand('ahk2.update.versioninfo', async textEditor => { + const infos: { content: string, uri: string, range: Range, single: boolean }[] | null = await client.sendRequest('ahk2.getVersionInfo', textEditor.document.uri.toString()); + if (!infos?.length) { + await textEditor.insertSnippet(new SnippetString([ + "/************************************************************************", + " * @description ${1:}", + " * @author ${2:}", + " * @date ${3:$CURRENT_YEAR/$CURRENT_MONTH/$CURRENT_DATE}", + " * @version ${4:0.0.0}", + " ***********************************************************************/", + "", "" + ].join('\n')), new Range(0, 0, 0, 0)); + } else { + const d = new Date; + let contents: string[] = [], value: string | undefined; + for (const info of infos) { + if (info.single) + contents.push(info.content.replace( + /(?<=^;\s*@ahk2exe-setversion\s+)(\S+|(?=[\r\n]))/i, + s => (value ||= s, '\0'))); + else contents.push(info.content.replace( + /(?<=^\s*[;*]?\s*@date[:\s]\s*)(\S+|(?=[\r\n]))/im, + date => [d.getFullYear(), d.getMonth() + 1, d.getDate()].map( + n => n.toString().padStart(2, '0')).join(date.includes('.') ? '.' : '/') + ).replace(/(?<=^\s*[;*]?\s*@version[:\s]\s*)(\S+|(?=[\r\n]))/im, s => (value ||= s, '\0'))); + } + if (value !== undefined) { + value = await window.showInputBox({ + value, prompt: 'Enter version info' + }); + if (!value) + return; + contents = contents.map(s => s.replace('\0', value!)); + } + const ed = new WorkspaceEdit(), uri = textEditor.document.uri; + infos.forEach(it => it.content !== (value = contents.shift()) && + ed.replace(uri, it.range, value!)); + ed.size && workspace.applyEdit(ed); + } + }), + commands.registerTextEditorCommand('ahk2.switch', textEditor => { + const doc = textEditor.document; + languages.setTextDocumentLanguage(doc, doc.languageId === 'ahk2' ? 'ahk' : 'ahk2'); + }), + workspace.onDidCloseTextDocument(e => { + client.sendNotification('onDidCloseTextDocument', e.isClosed ? + { uri: '', id: '' } : { uri: e.uri.toString(), id: e.languageId }); + }) + ); + + client.start().then(() => { + Object.entries(request_handlers).forEach(handler => client.onRequest(...handler)); + }); +} + +export function deactivate() { + return client?.stop(); +} \ No newline at end of file diff --git a/client/src/config.cts b/client/src/config.ts similarity index 100% rename from client/src/config.cts rename to client/src/config.ts diff --git a/client/src/extension.e2e.ts b/client/src/extension.e2e.ts new file mode 100644 index 00000000..38393599 --- /dev/null +++ b/client/src/extension.e2e.ts @@ -0,0 +1,234 @@ +import * as assert from 'assert'; +import * as vscode from 'vscode'; +import { resolve } from 'path'; +import { + LanguageClient, + CompletionRequest, + CompletionParams, + CompletionItem, + DocumentSymbolRequest, + DocumentSymbolParams, + SymbolInformation, + DefinitionRequest, + DefinitionParams, + LocationLink, + DocumentFormattingRequest, + DocumentFormattingParams, + TextEdit, + FoldingRangeRequest, + FoldingRangeParams, + FoldingRange, + HoverRequest, + HoverParams, + Hover, + PrepareRenameRequest, + PrepareRenameParams, + ReferencesRequest, + ReferenceParams, + Location, + RenameRequest, + RenameParams, + WorkspaceEdit, + SignatureHelpRequest, + SignatureHelpParams, + SignatureHelp, + SemanticTokensRequest, + SemanticTokensParams, + SemanticTokens, + WorkspaceSymbolRequest, + WorkspaceSymbolParams, + ExecuteCommandRequest, + ExecuteCommandParams, +} from 'vscode-languageclient/node'; + +suite('Start ahk language server', () => { + test('should be running', async () => { + await vscode.commands.executeCommand( + 'workbench.action.closeAllEditors', + ); + const client: LanguageClient = await vscode.extensions + .getExtension('thqby.vscode-autohotkey2-lsp') + ?.activate(); + assert.equal(client?.isRunning(), true); + + suite('Open ahk file', () => { + test('should be opened', async () => { + const path = resolve( + __dirname, + '../../../server/dist/ahkProvider.ahk', + ); + let document = ( + await vscode.window.showTextDocument( + await vscode.workspace.openTextDocument(path), + ) + ).document; + const uri = document.uri.toString(); + if (document.languageId !== 'ahk2') + document = await vscode.languages.setTextDocumentLanguage( + document, + 'ahk2', + ); + const content = (await client!.sendRequest( + 'ahk2.getContent', + uri, + )) as string; + assert.equal(document.getText() === content, true); + + suite('Test language server features', () => { + const textDocument = { uri }; + const position = { line: 10, character: 5 }; + + test(CompletionRequest.method, async function () { + const params: CompletionParams = { + textDocument, + position, + }; + const result: CompletionItem[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(DefinitionRequest.method, async function () { + const params: DefinitionParams = { + textDocument, + position, + }; + const result: LocationLink[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(DocumentFormattingRequest.method, async function () { + const params: DocumentFormattingParams = { + textDocument, + options: { insertSpaces: false, tabSize: 4 }, + }; + const result: TextEdit[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(DocumentSymbolRequest.method, async function () { + const params: DocumentSymbolParams = { textDocument }; + const result: SymbolInformation[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(FoldingRangeRequest.method, async function () { + const params: FoldingRangeParams = { textDocument }; + const result: FoldingRange[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(HoverRequest.method, async function () { + const params: HoverParams = { textDocument, position }; + const result: Hover | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.contents); + }); + + test(PrepareRenameRequest.method, async function () { + const params: PrepareRenameParams = { + textDocument, + position, + }; + const result: unknown | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result); + }); + + test(ReferencesRequest.method, async function () { + const params: ReferenceParams = { + textDocument, + position, + context: { includeDeclaration: true }, + }; + const result: Location[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(RenameRequest.method, async function () { + const params: RenameParams = { + textDocument, + position, + newName: '', + }; + const result: WorkspaceEdit | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.changes); + }); + + test(SignatureHelpRequest.method, async function () { + const params: SignatureHelpParams = { + textDocument, + position: { line: 8, character: 36 }, + }; + const result: SignatureHelp | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.signatures); + }); + + test(ExecuteCommandRequest.method, async function () { + const params: ExecuteCommandParams = { + command: 'ahk2.diagnose.all', + }; + await client.sendRequest(this.runnable().title, params); + }); + + test(WorkspaceSymbolRequest.method, async function () { + const params: WorkspaceSymbolParams = { query: 'msg' }; + const result: SymbolInformation[] | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.length); + }); + + test(SemanticTokensRequest.method, async function () { + const params: SemanticTokensParams = { textDocument }; + const result: SemanticTokens | undefined = + await client.sendRequest( + this.runnable().title, + params, + ); + assert.ok(result?.data); + }); + }); + }); + }); + }); +}); diff --git a/client/src/extension.cts b/client/src/extension.ts similarity index 95% rename from client/src/extension.cts rename to client/src/extension.ts index df10cbc5..112d1ade 100644 --- a/client/src/extension.cts +++ b/client/src/extension.ts @@ -29,17 +29,17 @@ import { LanguageClientOptions, ServerOptions, TransportKind -} from 'vscode-languageclient/node.js'; +} from 'vscode-languageclient/node'; import { resolve } from 'path'; import { ChildProcess, execSync, spawn } from 'child_process'; import { readdirSync, readFileSync, lstatSync, readlinkSync, unlinkSync, writeFileSync } from 'fs'; -import { CfgKey, getAhkppConfig, getCfg, ShowOutput } from './config.cjs'; +import { CfgKey, getAhkppConfig, getCfg, ShowOutput } from './config'; +import { resolvePath } from './utils'; let client: LanguageClient, outputchannel: OutputChannel, ahkStatusBarItem: StatusBarItem; const ahkprocesses = new Map(); let v2Interpreter = getCfg(CfgKey.InterpreterPathV2), server_is_ready = false const textdecoders: TextDecoder[] = [new TextDecoder('utf8', { fatal: true }), new TextDecoder('utf-16le', { fatal: true })]; -const isWindows = process.platform === 'win32'; let extlist: string[] = [], debugexts: Record = {}, langs: string[] = []; const loadedCollection = { 'ahk2.browse': 'Browse your file system to find AutoHotkey2 interpreter', @@ -61,11 +61,8 @@ const loadedCollection = { }; export function activate(context: ExtensionContext): Promise { - // when debugging, this goes into the Debug Console (Ctrl + Shift + Y) - console.log('Activating AHK v2 language server'); - /** Absolute path to `server.js` */ - const defaultServerModule = context.asAbsolutePath(`ahk2/server/dist/server.cjs`); + const defaultServerModule = context.asAbsolutePath(`ahk2/server/dist/server.js`); const serverModule = process.env.VSCODE_AHK_SERVER_PATH ? context.asAbsolutePath(process.env.VSCODE_AHK_SERVER_PATH) : defaultServerModule; // If the extension is launched in debug mode then the debug server options are used @@ -626,34 +623,6 @@ async function onDidChangegetInterpreter() { } } -/** - * Returns the provided path as an absolute path. - * Resolves the provided path against the provided workspace. - * Resolves symbolic links by default. - * Returns empty string if resolution fails. - */ -export function resolvePath(path: string | undefined, workspace?: string, resolveSymbolicLink = true): string { - if (!path) - return ''; - const paths: string[] = []; - // If the path does not contain a colon, resolve it relative to the workspace - if (!path.includes(':')) - paths.push(resolve(workspace ?? '', path)); - // If there are no slashes or backslashes in the path and the platform is Windows - if (!/[\\/]/.test(path) && isWindows) - paths.push(execSync(`where ${path}`, { encoding: 'utf-8' }).trim()); - paths.push(path); - for (let path of paths) { - if (!path) continue; - try { - if (lstatSync(path).isSymbolicLink() && resolveSymbolicLink) - path = resolve(path, '..', readlinkSync(path)); - return path; - } catch { } - } - return ''; -} - /** * Returns whether the given path exists. * Only returns false if lstatSync give an ENOENT error. diff --git a/client/src/utils.test.ts b/client/src/utils.test.ts new file mode 100644 index 00000000..b40f75ba --- /dev/null +++ b/client/src/utils.test.ts @@ -0,0 +1,29 @@ +import { expect, test, describe, vi, beforeAll, afterAll } from 'vitest'; +import { resolvePath } from './utils'; + +describe('resolvePath', () => { + beforeAll(() => { + // Mock the behavior of fs.lstatSync + vi.mock('fs', () => ({ + lstatSync: (_path: string) => ({ isSymbolicLink: () => false }), + })); + }); + + afterAll(() => { + vi.restoreAllMocks(); + }); + + test.concurrent.each< + [ + name: string, + args: Parameters, + expected: ReturnType, + ] + >([ + ['empty string', [''], ''], + ['absolute path at drive root', ['C:/out.txt'], 'C:/out.txt'], + ])('%s', (_name, args, expected) => { + const result = resolvePath(...args); + expect(result).toBe(expected); + }); +}); diff --git a/client/src/utils.ts b/client/src/utils.ts new file mode 100644 index 00000000..96242b26 --- /dev/null +++ b/client/src/utils.ts @@ -0,0 +1,33 @@ +import { execSync } from 'child_process'; +import { lstatSync, readlinkSync } from 'fs'; +import { resolve } from 'path'; + +/** + * Returns the provided path as an absolute path. + * Resolves the provided path against the provided workspace. + * Resolves symbolic links by default. + * Returns empty string if resolution fails. + */ +export function resolvePath( + path: string | undefined, + workspace?: string, + resolveSymbolicLink = true, +): string { + if (!path) return ''; + const paths: string[] = []; + // If the path does not contain a colon, resolve it relative to the workspace + if (!path.includes(':')) paths.push(resolve(workspace ?? '', path)); + // If there are no slashes or backslashes in the path and the platform is Windows + if (!/[\\/]/.test(path) && process.platform === 'win32') + paths.push(execSync(`where ${path}`, { encoding: 'utf-8' }).trim()); + paths.push(path); + for (let path of paths) { + if (!path) continue; + try { + if (lstatSync(path).isSymbolicLink() && resolveSymbolicLink) + path = resolve(path, '..', readlinkSync(path)); + return path; + } catch {} + } + return ''; +} diff --git a/client/tsconfig.json b/client/tsconfig.json index 0691600f..5f41caf1 100644 --- a/client/tsconfig.json +++ b/client/tsconfig.json @@ -2,11 +2,12 @@ "compilerOptions": { "target": "ES2022", "lib": ["ES2022", "WebWorker"], - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "commonjs", + "moduleResolution": "node", "sourceMap": true, "strict": true, "outDir": "dist", + "rootDirs": ["src", "../server/src"], "composite": true }, "include": ["src"], diff --git a/package-lock.json b/package-lock.json index 3d0f8aaf..efc81e67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "@types/node": "^20.16.0", "@types/sinon": "^17.0.3", "@types/vscode": "^1.82.0", + "@vitest/coverage-v8": "^2.1.1", "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "^2.4.1", "@vscode/test-web": "^0.0.56", @@ -33,6 +34,7 @@ "ts-loader": "^9.4.0", "typescript": "^5.3.2", "typescript-eslint": "^7.12.0", + "vitest": "^2.1.1", "vscode-tmgrammar-test": "^0.1.3", "webpack": "^5.74.0", "webpack-cli": "^4.10.0" @@ -41,6 +43,20 @@ "vscode": "^1.82.0" } }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmmirror.com/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -55,6 +71,16 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.8", + "resolved": "https://registry.npmmirror.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/helper-validator-identifier": { "version": "7.24.7", "resolved": "https://registry.npmmirror.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", @@ -81,6 +107,37 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/parser": { + "version": "7.25.6", + "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.25.6" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/types": { + "version": "7.25.6", + "resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmmirror.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -762,9 +819,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true, "license": "MIT" }, @@ -872,6 +929,230 @@ "node": ">=18" } }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@sinonjs/commons": { "version": "3.0.1", "resolved": "https://registry.npmmirror.com/@sinonjs/commons/-/commons-3.0.1.tgz", @@ -1137,30 +1418,40 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/@vscode/test-cli": { - "version": "0.0.10", - "resolved": "https://registry.npmmirror.com/@vscode/test-cli/-/test-cli-0.0.10.tgz", - "integrity": "sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==", + "node_modules/@vitest/coverage-v8": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/coverage-v8/-/coverage-v8-2.1.1.tgz", + "integrity": "sha512-md/A7A3c42oTT8JUHSqjP5uKTWJejzUW4jalpvs+rZ27gsURsMU8DEb+8Jf8C6Kj2gwfSHJqobDNBuoqlm0cFw==", "dev": true, + "license": "MIT", "dependencies": { - "@types/mocha": "^10.0.2", - "c8": "^9.1.0", - "chokidar": "^3.5.3", - "enhanced-resolve": "^5.15.0", - "glob": "^10.3.10", - "minimatch": "^9.0.3", - "mocha": "^10.2.0", - "supports-color": "^9.4.0", - "yargs": "^17.7.2" + "@ampproject/remapping": "^2.3.0", + "@bcoe/v8-coverage": "^0.2.3", + "debug": "^4.3.6", + "istanbul-lib-coverage": "^3.2.2", + "istanbul-lib-report": "^3.0.1", + "istanbul-lib-source-maps": "^5.0.6", + "istanbul-reports": "^3.1.7", + "magic-string": "^0.30.11", + "magicast": "^0.3.4", + "std-env": "^3.7.0", + "test-exclude": "^7.0.1", + "tinyrainbow": "^1.2.0" }, - "bin": { - "vscode-test": "out/bin.mjs" + "funding": { + "url": "https://opencollective.com/vitest" }, - "engines": { - "node": ">=18" + "peerDependencies": { + "@vitest/browser": "2.1.1", + "vitest": "2.1.1" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } } }, - "node_modules/@vscode/test-cli/node_modules/brace-expansion": { + "node_modules/@vitest/coverage-v8/node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", @@ -1170,7 +1461,7 @@ "balanced-match": "^1.0.0" } }, - "node_modules/@vscode/test-cli/node_modules/glob": { + "node_modules/@vitest/coverage-v8/node_modules/glob": { "version": "10.4.5", "resolved": "https://registry.npmmirror.com/glob/-/glob-10.4.5.tgz", "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", @@ -1191,7 +1482,7 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@vscode/test-cli/node_modules/minimatch": { + "node_modules/@vitest/coverage-v8/node_modules/minimatch": { "version": "9.0.5", "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", @@ -1207,53 +1498,252 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@vscode/test-cli/node_modules/supports-color": { - "version": "9.4.0", - "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-9.4.0.tgz", - "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "node_modules/@vitest/coverage-v8/node_modules/test-exclude": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/test-exclude/-/test-exclude-7.0.1.tgz", + "integrity": "sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==", "dev": true, - "license": "MIT", - "engines": { - "node": ">=12" + "license": "ISC", + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^9.0.4" }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" + "engines": { + "node": ">=18" } }, - "node_modules/@vscode/test-electron": { - "version": "2.4.1", - "resolved": "https://registry.npmmirror.com/@vscode/test-electron/-/test-electron-2.4.1.tgz", - "integrity": "sha512-Gc6EdaLANdktQ1t+zozoBVRynfIsMKMc94Svu1QreOBC8y76x4tvaK32TljrLi1LI2+PK58sDVbL7ALdqf3VRQ==", + "node_modules/@vitest/expect": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/expect/-/expect-2.1.1.tgz", + "integrity": "sha512-YeueunS0HiHiQxk+KEOnq/QMzlUuOzbU1Go+PgAsHvvv3tUkJPm9xWt+6ITNTlzsMXUjmgm5T+U7KBPK2qQV6w==", "dev": true, + "license": "MIT", "dependencies": { - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.5", - "jszip": "^3.10.1", - "ora": "^7.0.1", - "semver": "^7.6.2" + "@vitest/spy": "2.1.1", + "@vitest/utils": "2.1.1", + "chai": "^5.1.1", + "tinyrainbow": "^1.2.0" }, - "engines": { - "node": ">=16" + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/@vscode/test-web": { - "version": "0.0.56", - "resolved": "https://registry.npmmirror.com/@vscode/test-web/-/test-web-0.0.56.tgz", - "integrity": "sha512-lR688n+D6A9odw+IZ5cU8CYr2YXLB61bGgyZpPVJe/sJy4/DYX5CAxPb7Wj9ZMYL41CTvWq5DeXtfCjlabPcYA==", + "node_modules/@vitest/mocker": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/mocker/-/mocker-2.1.1.tgz", + "integrity": "sha512-LNN5VwOEdJqCmJ/2XJBywB11DLlkbY0ooDJW3uRX5cZyYCrc4PI/ePX0iQhE3BiEGiQmK4GE7Q/PqCkkaiPnrA==", "dev": true, "license": "MIT", "dependencies": { - "@koa/cors": "^5.0.0", - "@koa/router": "^12.0.1", - "@playwright/browser-chromium": "^1.45.0", - "glob": "^10.4.2", - "gunzip-maybe": "^1.4.2", - "http-proxy-agent": "^7.0.2", - "https-proxy-agent": "^7.0.4", - "koa": "^2.15.3", - "koa-morgan": "^1.0.1", - "koa-mount": "^4.0.0", - "koa-static": "^5.0.0", + "@vitest/spy": "^2.1.0-beta.1", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.11" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/spy": "2.1.1", + "msw": "^2.3.5", + "vite": "^5.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/pretty-format/-/pretty-format-2.1.1.tgz", + "integrity": "sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/runner/-/runner-2.1.1.tgz", + "integrity": "sha512-uTPuY6PWOYitIkLPidaY5L3t0JJITdGTSwBtwMjKzo5O6RCOEncz9PUN+0pDidX8kTHYjO0EwUIvhlGpnGpxmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "2.1.1", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/snapshot/-/snapshot-2.1.1.tgz", + "integrity": "sha512-BnSku1WFy7r4mm96ha2FzN99AZJgpZOWrAhtQfoxjUU5YMRpq1zmHRq7a5K9/NjqonebO7iVDla+VvZS8BOWMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.1.1", + "magic-string": "^0.30.11", + "pathe": "^1.1.2" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/spy/-/spy-2.1.1.tgz", + "integrity": "sha512-ZM39BnZ9t/xZ/nF4UwRH5il0Sw93QnZXd9NAZGRpIgj0yvVwPpLd702s/Cx955rGaMlyBQkZJ2Ir7qyY48VZ+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/@vitest/utils/-/utils-2.1.1.tgz", + "integrity": "sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "2.1.1", + "loupe": "^3.1.1", + "tinyrainbow": "^1.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vscode/test-cli": { + "version": "0.0.10", + "resolved": "https://registry.npmmirror.com/@vscode/test-cli/-/test-cli-0.0.10.tgz", + "integrity": "sha512-B0mMH4ia+MOOtwNiLi79XhA+MLmUItIC8FckEuKrVAVriIuSWjt7vv4+bF8qVFiNFe4QRfzPaIZk39FZGWEwHA==", + "dev": true, + "dependencies": { + "@types/mocha": "^10.0.2", + "c8": "^9.1.0", + "chokidar": "^3.5.3", + "enhanced-resolve": "^5.15.0", + "glob": "^10.3.10", + "minimatch": "^9.0.3", + "mocha": "^10.2.0", + "supports-color": "^9.4.0", + "yargs": "^17.7.2" + }, + "bin": { + "vscode-test": "out/bin.mjs" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@vscode/test-cli/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@vscode/test-cli/node_modules/glob": { + "version": "10.4.5", + "resolved": "https://registry.npmmirror.com/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", + "dev": true, + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@vscode/test-cli/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@vscode/test-cli/node_modules/supports-color": { + "version": "9.4.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-9.4.0.tgz", + "integrity": "sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/@vscode/test-electron": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/@vscode/test-electron/-/test-electron-2.4.1.tgz", + "integrity": "sha512-Gc6EdaLANdktQ1t+zozoBVRynfIsMKMc94Svu1QreOBC8y76x4tvaK32TljrLi1LI2+PK58sDVbL7ALdqf3VRQ==", + "dev": true, + "dependencies": { + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.5", + "jszip": "^3.10.1", + "ora": "^7.0.1", + "semver": "^7.6.2" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@vscode/test-web": { + "version": "0.0.56", + "resolved": "https://registry.npmmirror.com/@vscode/test-web/-/test-web-0.0.56.tgz", + "integrity": "sha512-lR688n+D6A9odw+IZ5cU8CYr2YXLB61bGgyZpPVJe/sJy4/DYX5CAxPb7Wj9ZMYL41CTvWq5DeXtfCjlabPcYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@koa/cors": "^5.0.0", + "@koa/router": "^12.0.1", + "@playwright/browser-chromium": "^1.45.0", + "glob": "^10.4.2", + "gunzip-maybe": "^1.4.2", + "http-proxy-agent": "^7.0.2", + "https-proxy-agent": "^7.0.4", + "koa": "^2.15.3", + "koa-morgan": "^1.0.1", + "koa-mount": "^4.0.0", + "koa-static": "^5.0.0", "minimist": "^1.2.8", "playwright": "^1.45.0", "tar-fs": "^3.0.6", @@ -1732,6 +2222,16 @@ "node": ">=0.10.0" } }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, "node_modules/b4a": { "version": "1.6.6", "resolved": "https://registry.npmmirror.com/b4a/-/b4a-1.6.6.tgz", @@ -2029,6 +2529,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cache-content-type": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/cache-content-type/-/cache-content-type-1.0.1.tgz", @@ -2106,6 +2616,23 @@ ], "license": "CC-BY-4.0" }, + "node_modules/chai": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/chai/-/chai-5.1.1.tgz", + "integrity": "sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmmirror.com/chalk/-/chalk-2.4.2.tgz", @@ -2121,6 +2648,16 @@ "node": ">=4" } }, + "node_modules/check-error": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/check-error/-/check-error-2.1.1.tgz", + "integrity": "sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", @@ -2439,13 +2976,13 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.7", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2506,6 +3043,16 @@ "node": ">=0.10.0" } }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmmirror.com/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, "node_modules/deep-equal": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.0.1.tgz", @@ -3223,6 +3770,16 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmmirror.com/esutils/-/esutils-2.0.3.tgz", @@ -3461,6 +4018,16 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, "node_modules/get-stdin": { "version": "9.0.0", "resolved": "https://registry.npmmirror.com/get-stdin/-/get-stdin-9.0.0.tgz", @@ -4167,6 +4734,21 @@ "node": ">=8" } }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmmirror.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/istanbul-reports": { "version": "3.1.7", "resolved": "https://registry.npmmirror.com/istanbul-reports/-/istanbul-reports-3.1.7.tgz", @@ -4728,6 +5310,16 @@ "node": ">=8" } }, + "node_modules/loupe": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/loupe/-/loupe-3.1.1.tgz", + "integrity": "sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-func-name": "^2.0.1" + } + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4741,6 +5333,28 @@ "node": ">=10" } }, + "node_modules/magic-string": { + "version": "0.30.11", + "resolved": "https://registry.npmmirror.com/magic-string/-/magic-string-0.30.11.tgz", + "integrity": "sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/magicast": { + "version": "0.3.5", + "resolved": "https://registry.npmmirror.com/magicast/-/magicast-0.3.5.tgz", + "integrity": "sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.25.4", + "@babel/types": "^7.25.4", + "source-map-js": "^1.2.0" + } + }, "node_modules/make-dir": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-4.0.0.tgz", @@ -5162,13 +5776,6 @@ "node": ">=10" } }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true, - "license": "MIT" - }, "node_modules/mocha/node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-3.1.0.tgz", @@ -5340,16 +5947,35 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, "license": "MIT" }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, "license": "MIT" }, @@ -5791,6 +6417,23 @@ "node": ">=8" } }, + "node_modules/pathe": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/pathe/-/pathe-1.1.2.tgz", + "integrity": "sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/pathval/-/pathval-2.0.0.tgz", + "integrity": "sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, "node_modules/peek-stream": { "version": "1.1.3", "resolved": "https://registry.npmmirror.com/peek-stream/-/peek-stream-1.1.3.tgz", @@ -5804,9 +6447,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true, "license": "ISC" }, @@ -5868,6 +6511,35 @@ "node": ">=18" } }, + "node_modules/postcss": { + "version": "8.4.47", + "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmmirror.com/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6320,6 +6992,42 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/rollup": { + "version": "4.22.4", + "resolved": "https://registry.npmmirror.com/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6455,6 +7163,13 @@ "node": ">=8" } }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, "node_modules/signal-exit": { "version": "4.1.0", "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-4.1.0.tgz", @@ -6603,6 +7318,16 @@ "node": ">= 8" } }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmmirror.com/source-map-support/-/source-map-support-0.5.21.tgz", @@ -6660,6 +7385,13 @@ "dev": true, "license": "CC0-1.0" }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmmirror.com/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.1.tgz", @@ -6670,6 +7402,13 @@ "node": ">= 0.8" } }, + "node_modules/std-env": { + "version": "3.7.0", + "resolved": "https://registry.npmmirror.com/std-env/-/std-env-3.7.0.tgz", + "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "dev": true, + "license": "MIT" + }, "node_modules/stdin-discarder": { "version": "0.1.0", "resolved": "https://registry.npmmirror.com/stdin-discarder/-/stdin-discarder-0.1.0.tgz", @@ -7038,6 +7777,60 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmmirror.com/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/tinyexec/-/tinyexec-0.3.0.tgz", + "integrity": "sha512-tVGE0mVJPGb0chKhqmsoosjsS+qUnJVGJpZgsHYQcGoPlG3B51R3PouqTgEGH2Dc9jjFyOqOpix6ZHNMXp1FZg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinypool": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/tinypool/-/tinypool-1.0.1.tgz", + "integrity": "sha512-URZYihUbRPcGv95En+sz6MfghfIc2OJ1sv/RmhWZLouPY0/8Vo80viwPvg3dlaS9fuq7fQMEfgRRK7BBZThBEA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/tinyrainbow/-/tinyrainbow-1.2.0.tgz", + "integrity": "sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/tinyspy/-/tinyspy-3.0.2.tgz", + "integrity": "sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7490,95 +8283,687 @@ "node": ">= 0.8" } }, - "node_modules/vscode-jsonrpc": { - "version": "8.2.0", - "resolved": "https://registry.npmmirror.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", - "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "node_modules/vite": { + "version": "5.4.8", + "resolved": "https://registry.npmmirror.com/vite/-/vite-5.4.8.tgz", + "integrity": "sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==", + "dev": true, "license": "MIT", + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.43", + "rollup": "^4.20.0" + }, + "bin": { + "vite": "bin/vite.js" + }, "engines": { - "node": ">=14.0.0" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } } }, - "node_modules/vscode-languageclient": { - "version": "9.0.1", - "resolved": "https://registry.npmmirror.com/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", - "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", + "node_modules/vite-node": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/vite-node/-/vite-node-2.1.1.tgz", + "integrity": "sha512-N/mGckI1suG/5wQI35XeR9rsMsPqKXzq1CdUndzVstBj/HvyxxGctwnK6WX43NGt5L3Z5tcRf83g4TITKJhPrA==", + "dev": true, "license": "MIT", "dependencies": { - "minimatch": "^5.1.0", - "semver": "^7.3.7", - "vscode-languageserver-protocol": "3.17.5" + "cac": "^6.7.14", + "debug": "^4.3.6", + "pathe": "^1.1.2", + "vite": "^5.0.0" + }, + "bin": { + "vite-node": "vite-node.mjs" }, "engines": { - "vscode": "^1.82.0" + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" } }, - "node_modules/vscode-languageclient/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "node_modules/vite/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" } }, - "node_modules/vscode-languageclient/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, + "node_modules/vite/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], "engines": { - "node": ">=10" + "node": ">=12" } }, - "node_modules/vscode-languageserver": { - "version": "9.0.1", - "resolved": "https://registry.npmmirror.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", - "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "node_modules/vite/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "vscode-languageserver-protocol": "3.17.5" - }, - "bin": { - "installServerIntoExtension": "bin/installServerIntoExtension" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/vscode-languageserver-protocol": { - "version": "3.17.5", - "resolved": "https://registry.npmmirror.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", - "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "node_modules/vite/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, "license": "MIT", - "dependencies": { - "vscode-jsonrpc": "8.2.0", - "vscode-languageserver-types": "3.17.5" + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" } }, - "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.11", - "resolved": "https://registry.npmmirror.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", - "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", - "license": "MIT" - }, - "node_modules/vscode-languageserver-types": { - "version": "3.17.5", - "resolved": "https://registry.npmmirror.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", - "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", - "license": "MIT" - }, - "node_modules/vscode-oniguruma": { - "version": "1.7.0", - "resolved": "https://registry.npmmirror.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "node_modules/vite/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "MIT" - }, - "node_modules/vscode-textmate": { - "version": "7.0.4", - "resolved": "https://registry.npmmirror.com/vscode-textmate/-/vscode-textmate-7.0.4.tgz", - "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==", + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/vite/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, + "node_modules/vite/node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/vitest": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/vitest/-/vitest-2.1.1.tgz", + "integrity": "sha512-97We7/VC0e9X5zBVkvt7SGQMGrRtn3KtySFQG5fpaMlS+l62eeXRQO633AYhSTC3z7IMebnPPNjGXVGNRFlxBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "2.1.1", + "@vitest/mocker": "2.1.1", + "@vitest/pretty-format": "^2.1.1", + "@vitest/runner": "2.1.1", + "@vitest/snapshot": "2.1.1", + "@vitest/spy": "2.1.1", + "@vitest/utils": "2.1.1", + "chai": "^5.1.1", + "debug": "^4.3.6", + "magic-string": "^0.30.11", + "pathe": "^1.1.2", + "std-env": "^3.7.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.0", + "tinypool": "^1.0.0", + "tinyrainbow": "^1.2.0", + "vite": "^5.0.0", + "vite-node": "2.1.1", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/node": "^18.0.0 || >=20.0.0", + "@vitest/browser": "2.1.1", + "@vitest/ui": "2.1.1", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/vscode-jsonrpc": { + "version": "8.2.0", + "resolved": "https://registry.npmmirror.com/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/vscode-languageclient": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/vscode-languageclient/-/vscode-languageclient-9.0.1.tgz", + "integrity": "sha512-JZiimVdvimEuHh5olxhxkht09m3JzUGwggb5eRUkzzJhZ2KjCN0nh55VfiED9oez9DyF8/fz1g1iBV3h+0Z2EA==", + "license": "MIT", + "dependencies": { + "minimatch": "^5.1.0", + "semver": "^7.3.7", + "vscode-languageserver-protocol": "3.17.5" + }, + "engines": { + "vscode": "^1.82.0" + } + }, + "node_modules/vscode-languageclient/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/vscode-languageclient/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/vscode-languageserver": { + "version": "9.0.1", + "resolved": "https://registry.npmmirror.com/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", + "license": "MIT", + "dependencies": { + "vscode-languageserver-protocol": "3.17.5" + }, + "bin": { + "installServerIntoExtension": "bin/installServerIntoExtension" + } + }, + "node_modules/vscode-languageserver-protocol": { + "version": "3.17.5", + "resolved": "https://registry.npmmirror.com/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", + "license": "MIT", + "dependencies": { + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" + } + }, + "node_modules/vscode-languageserver-textdocument": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", + "license": "MIT" + }, + "node_modules/vscode-languageserver-types": { + "version": "3.17.5", + "resolved": "https://registry.npmmirror.com/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", + "license": "MIT" + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmmirror.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true, + "license": "MIT" + }, + "node_modules/vscode-textmate": { + "version": "7.0.4", + "resolved": "https://registry.npmmirror.com/vscode-textmate/-/vscode-textmate-7.0.4.tgz", + "integrity": "sha512-9hJp0xL7HW1Q5OgGe03NACo7yiCTMEk3WU/rtKXUbncLtdg6rVVNJnHwD88UhbIYU2KoxY0Dih0x+kIsmUKn2A==", "dev": true, "license": "MIT" }, @@ -7789,6 +9174,23 @@ "node": ">= 8" } }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wildcard": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/wildcard/-/wildcard-2.0.1.tgz", diff --git a/package.json b/package.json index 7dabd667..271be642 100644 --- a/package.json +++ b/package.json @@ -34,10 +34,10 @@ "build:dev": "node build.mjs", "build:old": "webpack", "chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=. ./test-data", - "clean": "del-cli client/dist server/dist/*.js* server/dist/*.cjs", + "clean": "del-cli client/dist server/dist/*.js*", "clean//": "Remove both the compiled extension and compiled test files", "compile-cli": "webpack --config webpack.config.cli.js --mode production --devtool hidden-source-map", - "compile-ts": "cd client && npm run compile-ts && cd ../server && npm run compile-ts", + "compile-ts": "cd client && tsc && cd ../server && tsc", "compile-ts//": "Compile TS files", "compile//": "Compile the extension for packaging and publishing", "eslint": "npm run eslint:files -- client server && echo No ESLint problems", @@ -49,9 +49,17 @@ "lint:fix": "npm run format:fix && npm run eslint:fix && npm run sort-package-json:fix", "sort-package-json": "sort-package-json --check", "sort-package-json:fix": "sort-package-json", - "validate": "npm run lint", - "validate:ci": "npm run lint", - "validate:ci:fix": "npm run lint:fix", + "test": "npm run test:e2e", + "test//": "echo Run e2e tests (open VS Code), not grammar tests", + "test:ci": "npm run test:unit", + "pretest:e2e": "npm run compile-ts", + "test:e2e": "cd client && vscode-test", + "test:e2e//": "echo todo failing for now, will be adding pure unit tests soon", + "test:unit": "vitest --run", + "validate": "npm run lint && npm run test", + "validate:ci": "npm run lint && npm run test:ci", + "validate:ci:fix": "npm run lint:fix && npm run test:ci", + "validate:ci:fix//": "echo Fix validation issues first, then run remaining checks until failure", "watch": "tsc -b -w" }, "prettier": { @@ -82,6 +90,7 @@ "@types/node": "^20.16.0", "@types/sinon": "^17.0.3", "@types/vscode": "^1.82.0", + "@vitest/coverage-v8": "^2.1.1", "@vscode/test-cli": "^0.0.10", "@vscode/test-electron": "^2.4.1", "@vscode/test-web": "^0.0.56", @@ -96,6 +105,7 @@ "ts-loader": "^9.4.0", "typescript": "^5.3.2", "typescript-eslint": "^7.12.0", + "vitest": "^2.1.1", "vscode-tmgrammar-test": "^0.1.3", "webpack": "^5.74.0", "webpack-cli": "^4.10.0" diff --git a/server/cli/cli.ts b/server/cli/cli.ts index c3624475..71a29d2a 100644 --- a/server/cli/cli.ts +++ b/server/cli/cli.ts @@ -1,6 +1,6 @@ -import { openFile } from '../src/common.js'; -import { newFormatterConfig } from '../src/config.js'; -import { Lexer } from '../src/Lexer.js'; +import { openFile } from '../src/common'; +import { newFormatterConfig } from '../src/config'; +import { Lexer } from '../src/Lexer'; function main() { const options: Record = {}; diff --git a/server/package.json b/server/package.json index f3d001a0..403a1a88 100644 --- a/server/package.json +++ b/server/package.json @@ -2,10 +2,6 @@ "name": "vscode-autohotkey2-server", "description": "Autohotkey2 Language Server using vscode-lsp.", "license": "LGPLv3.0", - "type": "module", - "scripts": { - "compile-ts": "tsc" - }, "engines": { "node": "*" }, diff --git a/server/src/Lexer.ts b/server/src/Lexer.ts index 7f1550a2..c0d1b59a 100644 --- a/server/src/Lexer.ts +++ b/server/src/Lexer.ts @@ -18,14 +18,14 @@ import { import { TextDocument } from 'vscode-languageserver-textdocument'; import { URI } from 'vscode-uri'; -import { builtin_ahkv1_commands, builtin_variable, builtin_variable_h } from './constants.js'; -import { action, completionitem, diagnostic, warn } from './localize.js'; +import { builtin_ahkv1_commands, builtin_variable, builtin_variable_h } from './constants'; +import { action, completionitem, diagnostic, warn } from './localize'; import { a_vars, ahk_version, ahkuris, ahkvars, alpha_3, connection, ahkppConfig, hoverCache, isBrowser, isahk2_h, lexers, libdirs, libfuncs, locale, openAndParse, openFile, restorePath, rootdir, setTextDocumentLanguage, symbolProvider, utils, workspaceFolders -} from './common.js'; -import { newFormatterConfig, FormatterConfig, BraceStyle, ActionType, newAhkppConfig, CallWithoutParentheses, getCfg, CfgKey } from './config.js'; +} from './common'; +import { newFormatterConfig, FormatterConfig, BraceStyle, ActionType, newAhkppConfig, CallWithoutParentheses, getCfg, CfgKey } from './config'; export interface ParamInfo { offset: number diff --git a/server/src/ahkProvider.ts b/server/src/ahkProvider.ts index 0958723a..6531fbaa 100644 --- a/server/src/ahkProvider.ts +++ b/server/src/ahkProvider.ts @@ -1,7 +1,7 @@ -import { createClientSocketTransport, createMessageConnection, createServerSocketTransport, MessageConnection } from 'vscode-languageserver/node.js'; +import { createClientSocketTransport, createMessageConnection, createServerSocketTransport, MessageConnection } from 'vscode-languageserver/node'; import { spawn } from 'child_process'; -import { resolvePath } from './scriptrunner.js'; -import { interpreterPathV2, isWindows, rootdir } from './common.js'; +import { resolvePath } from './scriptrunner'; +import { interpreterPathV2, isWindows, rootdir } from './common'; let ahk_server: MessageConnection | undefined | null; async function get_ahkProvider_port(): Promise { diff --git a/server/src/browserServerMain.ts b/server/src/browserServerMain.ts index 32995e3e..c7c9bb29 100644 --- a/server/src/browserServerMain.ts +++ b/server/src/browserServerMain.ts @@ -6,7 +6,7 @@ import { TextDocument } from 'vscode-languageserver-textdocument'; import { createConnection, BrowserMessageReader, BrowserMessageWriter, DidChangeConfigurationNotification, InitializeResult, TextDocuments, TextDocumentSyncKind -} from 'vscode-languageserver/browser.js'; +} from 'vscode-languageserver/browser'; import { chinese_punctuations, colorPresentation, colorProvider, commands, completionProvider, defintionProvider, documentFormatting, enumNames, executeCommandProvider, exportSymbols, getVersionInfo, @@ -14,8 +14,8 @@ import { referenceProvider, renameProvider, SemanticTokenModifiers, semanticTokensOnFull, semanticTokensOnRange, SemanticTokenTypes, set_ahk_h, set_Connection, set_dirname, set_locale, set_version, set_WorkspaceFolders, signatureProvider, symbolProvider, typeFormatting, updateAhkppConfig, workspaceSymbolProvider -} from './common.js'; -import { AhkppConfig } from './config.js'; +} from './common'; +import { AhkppConfig } from './config'; const languageServer = 'ahk2-language-server'; const messageReader = new BrowserMessageReader(self); diff --git a/server/src/codeActionProvider.ts b/server/src/codeActionProvider.ts index bc82986b..602ec3c0 100644 --- a/server/src/codeActionProvider.ts +++ b/server/src/codeActionProvider.ts @@ -1,7 +1,7 @@ import { readdirSync } from 'fs'; import { CancellationToken, CodeAction, CodeActionKind, CodeActionParams, TextEdit } from 'vscode-languageserver'; -import { codeaction, diagnostic } from './localize.js'; -import { Maybe, lexers, restorePath, warn } from './common.js'; +import { codeaction, diagnostic } from './localize'; +import { Maybe, lexers, restorePath, warn } from './common'; export async function codeActionProvider(params: CodeActionParams, token: CancellationToken): Promise> { const uri = params.textDocument.uri, lex = lexers[uri.toLowerCase()], document = lex?.document; diff --git a/server/src/colorProvider.ts b/server/src/colorProvider.ts index d44fa0fe..38177f0b 100644 --- a/server/src/colorProvider.ts +++ b/server/src/colorProvider.ts @@ -1,5 +1,5 @@ import { CancellationToken, ColorInformation, ColorPresentation, ColorPresentationParams, DocumentColorParams } from 'vscode-languageserver'; -import { Maybe, lexers } from './common.js'; +import { Maybe, lexers } from './common'; export async function colorPresentation(params: ColorPresentationParams, token: CancellationToken): Promise> { const { range, color, textDocument: { uri } } = params, text = lexers[uri.toLowerCase()]?.document.getText(range); diff --git a/server/src/commandProvider.ts b/server/src/commandProvider.ts index aeeb167e..1ee3f571 100644 --- a/server/src/commandProvider.ts +++ b/server/src/commandProvider.ts @@ -4,7 +4,7 @@ import { connection, ahkppConfig, find_class, generate_type_annotation, join_types, lexers, parse_include, restorePath, semanticTokensOnFull, traverse_include, update_include_cache -} from './common.js'; +} from './common'; function checkCommand(cmd: string) { if (ahkppConfig.commands?.includes(cmd)) diff --git a/server/src/common.ts b/server/src/common.ts index 51391d0d..b9274c62 100644 --- a/server/src/common.ts +++ b/server/src/common.ts @@ -4,25 +4,25 @@ import { readdirSync, readFileSync, existsSync, statSync, promises as fs } from import { Connection, MessageConnection } from 'vscode-languageserver'; import { TextDocument } from 'vscode-languageserver-textdocument'; import { CompletionItem, CompletionItemKind, Hover, InsertTextFormat, Range, SymbolKind } from 'vscode-languageserver-types'; -import { AhkSymbol, Lexer, setCommentTagRegex } from './Lexer.js'; -import { diagnostic } from './localize.js'; -import { isBrowser, jsDocTagNames } from './constants.js'; -import { AhkppConfig, CfgKey, getCfg, newAhkppConfig } from './config.js'; -export * from './codeActionProvider.js'; -export * from './colorProvider.js'; -export * from './commandProvider.js'; -export * from './completionProvider.js'; -export * from './constants.js'; -export * from './definitionProvider.js'; -export * from './formattingProvider.js'; -export * from './hoverProvider.js'; -export * from './Lexer.js'; -export * from './localize.js'; -export * from './referencesProvider.js'; -export * from './renameProvider.js'; -export * from './semanticTokensProvider.js'; -export * from './signatureProvider.js'; -export * from './symbolProvider.js'; +import { AhkSymbol, Lexer, setCommentTagRegex } from './Lexer'; +import { diagnostic } from './localize'; +import { isBrowser, jsDocTagNames } from './constants'; +import { AhkppConfig, CfgKey, getCfg, newAhkppConfig } from './config'; +export * from './codeActionProvider'; +export * from './colorProvider'; +export * from './commandProvider'; +export * from './completionProvider'; +export * from './constants'; +export * from './definitionProvider'; +export * from './formattingProvider'; +export * from './hoverProvider'; +export * from './Lexer'; +export * from './localize'; +export * from './referencesProvider'; +export * from './renameProvider'; +export * from './semanticTokensProvider'; +export * from './signatureProvider'; +export * from './symbolProvider'; export const winapis: string[] = []; export const lexers: Record = {}; diff --git a/server/src/completionProvider.ts b/server/src/completionProvider.ts index 02863510..3ba3144f 100644 --- a/server/src/completionProvider.ts +++ b/server/src/completionProvider.ts @@ -11,9 +11,9 @@ import { decltype_expr, dllcalltpe, ahkppConfig, find_class, find_symbol, find_symbols, get_detail, generate_fn_comment, get_callinfo, get_class_constructor, get_class_member, get_class_members, isBrowser, lexers, libfuncs, make_search_re, sendAhkRequest, utils, winapis, -} from './common.js'; -import { includeLocalLibrary, includeUserAndStandardLibrary } from './utils.js'; -import { BraceStyle, CompletionCommitCharacters, CfgKey, FormatterConfig, getCfg } from './config.js'; +} from './common'; +import { includeLocalLibrary, includeUserAndStandardLibrary } from './utils'; +import { BraceStyle, CompletionCommitCharacters, CfgKey, FormatterConfig, getCfg } from './config'; export async function completionProvider(params: CompletionParams, _token: CancellationToken): Promise> { let { position, textDocument: { uri } } = params; diff --git a/server/src/definitionProvider.ts b/server/src/definitionProvider.ts index 99f3bfb0..a9af1520 100644 --- a/server/src/definitionProvider.ts +++ b/server/src/definitionProvider.ts @@ -1,5 +1,5 @@ import { DefinitionParams, LocationLink, SymbolKind, Range, CancellationToken } from 'vscode-languageserver'; -import { AhkSymbol, lexers, restorePath, find_symbols, Token } from './common.js'; +import { AhkSymbol, lexers, restorePath, find_symbols, Token } from './common'; import { URI } from 'vscode-uri'; export async function defintionProvider(params: DefinitionParams, token: CancellationToken): Promise { diff --git a/server/src/formattingProvider.ts b/server/src/formattingProvider.ts index f6c50915..1c7fa8ad 100644 --- a/server/src/formattingProvider.ts +++ b/server/src/formattingProvider.ts @@ -1,6 +1,6 @@ import { DocumentFormattingParams, DocumentOnTypeFormattingParams, DocumentRangeFormattingParams, Position, Range, TextEdit } from 'vscode-languageserver'; -import { chinese_punctuations, ahkppConfig, lexers, Token } from './common.js'; -import { FormatterConfig } from './config.js'; +import { chinese_punctuations, ahkppConfig, lexers, Token } from './common'; +import { FormatterConfig } from './config'; export async function documentFormatting(params: DocumentFormattingParams): Promise { const doc = lexers[params.textDocument.uri.toLowerCase()], range = Range.create(0, 0, doc.document.lineCount, 0); diff --git a/server/src/hoverProvider.ts b/server/src/hoverProvider.ts index 731f8c1e..7007ee03 100644 --- a/server/src/hoverProvider.ts +++ b/server/src/hoverProvider.ts @@ -2,7 +2,7 @@ import { CancellationToken, Hover, HoverParams, SymbolKind } from 'vscode-langua import { AhkSymbol, FuncNode, Maybe, SemanticTokenTypes, Variable, get_detail, hoverCache, join_types, lexers, find_symbols -} from './common.js'; +} from './common'; export async function hoverProvider(params: HoverParams, token: CancellationToken): Promise> { if (token.isCancellationRequested) return; diff --git a/server/src/localize.ts b/server/src/localize.ts index 11ba9a6d..b3e95a44 100644 --- a/server/src/localize.ts +++ b/server/src/localize.ts @@ -1,5 +1,5 @@ -import { rootdir, getlocalefile, getwebfile, isBrowser } from './common.js'; -import { CfgKey } from './config.js'; +import { rootdir, getlocalefile, getwebfile, isBrowser } from './common'; +import { CfgKey } from './config'; let loadedCollection: Record = {}; diff --git a/server/src/referencesProvider.ts b/server/src/referencesProvider.ts index a82796aa..506dc15c 100644 --- a/server/src/referencesProvider.ts +++ b/server/src/referencesProvider.ts @@ -2,7 +2,7 @@ import { CancellationToken, Location, Range, ReferenceParams, SymbolKind } from import { AhkSymbol, ClassNode, Context, FuncNode, FuncScope, Lexer, Property, Variable, ahkuris, ahkvars, find_symbol, find_symbols, lexers -} from './common.js'; +} from './common'; export async function referenceProvider(params: ReferenceParams, token: CancellationToken): Promise { const result: Location[] = [], doc = lexers[params.textDocument.uri.toLowerCase()]; diff --git a/server/src/renameProvider.ts b/server/src/renameProvider.ts index 647bc716..aa8d8fde 100644 --- a/server/src/renameProvider.ts +++ b/server/src/renameProvider.ts @@ -1,6 +1,6 @@ import { CancellationToken, PrepareRenameParams, Range, RenameParams, WorkspaceEdit } from 'vscode-languageserver'; import { ResponseError } from 'vscode-jsonrpc'; -import { Maybe, lexers, getAllReferences, response } from './common.js'; +import { Maybe, lexers, getAllReferences, response } from './common'; let renameranges: Record | null | undefined; diff --git a/server/src/scriptrunner.ts b/server/src/scriptrunner.ts index be247232..68900eef 100644 --- a/server/src/scriptrunner.ts +++ b/server/src/scriptrunner.ts @@ -1,5 +1,5 @@ import { execSync, spawnSync } from 'child_process'; -import { interpreterPathV2, isWindows } from './common.js'; +import { interpreterPathV2, isWindows } from './common'; import { lstatSync, readlinkSync } from 'fs'; import { resolve } from 'path'; diff --git a/server/src/semanticTokensProvider.ts b/server/src/semanticTokensProvider.ts index cdb4fa4a..459127a7 100644 --- a/server/src/semanticTokensProvider.ts +++ b/server/src/semanticTokensProvider.ts @@ -2,8 +2,8 @@ import { CancellationToken, DocumentSymbol, Range, SemanticTokens, SemanticToken import { ASSIGN_TYPE, AhkSymbol, ClassNode, FuncNode, Lexer, SemanticToken, SemanticTokenModifiers, SemanticTokenTypes, Token, Variable, checkParams, diagnostic, ahkppConfig, get_class_member, get_class_members, globalsymbolcache, lexers, symbolProvider -} from './common.js'; -import { CfgKey, getCfg } from './config.js'; +} from './common'; +import { CfgKey, getCfg } from './config'; let curclass: ClassNode | undefined; const memscache = new Map>(); diff --git a/server/src/server.ts b/server/src/server.ts index 764aa163..46d3b0f9 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -8,9 +8,9 @@ import { SymbolKind, TextDocuments, TextDocumentSyncKind, -} from 'vscode-languageserver/node.js'; +} from 'vscode-languageserver/node'; import { URI } from 'vscode-uri'; -import { get_ahkProvider } from './ahkProvider.js'; +import { get_ahkProvider } from './ahkProvider'; import { a_vars, interpreterPathV2, @@ -67,12 +67,12 @@ import { getVersionInfo, builtin_variable, builtin_variable_h, -} from './common.js'; -import { PEFile, RESOURCE_TYPE, searchAndOpenPEFile } from './PEFile.js'; -import { resolvePath, runscript } from './scriptrunner.js'; +} from './common'; +import { PEFile, RESOURCE_TYPE, searchAndOpenPEFile } from './PEFile'; +import { resolvePath, runscript } from './scriptrunner'; import { TextDecoder } from 'util'; -import { includeLocalLibrary, includeUserAndStandardLibrary } from './utils.js'; -import { AhkppConfig, CfgKey, getCfg, LibrarySuggestions } from './config.js'; +import { includeLocalLibrary, includeUserAndStandardLibrary } from './utils'; +import { AhkppConfig, CfgKey, getCfg, LibrarySuggestions } from './config'; const languageServer = 'ahk2-language-server'; const documents = new TextDocuments(TextDocument); @@ -86,9 +86,6 @@ commands['ahk++.v2.setIntepreterPath'] = (args: string[]) => setInterpreter(args[0].replace(/^[A-Z]:/, (m) => m.toLowerCase())); connection.onInitialize(async (params) => { - // Shows up in extension development host - // Output > AHK++ - connection.console.log(`Initializing language server`); const capabilities = params.capabilities; hasConfigurationCapability = !!( capabilities.workspace && !!capabilities.workspace.configuration diff --git a/server/src/signatureProvider.ts b/server/src/signatureProvider.ts index fe23e14a..e6980fff 100644 --- a/server/src/signatureProvider.ts +++ b/server/src/signatureProvider.ts @@ -4,7 +4,7 @@ import { ANY, AhkSymbol, ClassNode, FuncNode, Lexer, Maybe, Variable, ahkuris, decltype_expr, decltype_invoke, decltype_returns, get_detail, get_callinfo, get_class_constructor, get_class_member, lexers -} from './common.js'; +} from './common'; let cache: { index?: number, diff --git a/server/src/symbolProvider.ts b/server/src/symbolProvider.ts index cacb259c..4cbb8c8a 100644 --- a/server/src/symbolProvider.ts +++ b/server/src/symbolProvider.ts @@ -10,8 +10,8 @@ import { ahkuris, ahkvars, check_same_name_error, connection, decltype_expr, diagnostic, enum_ahkfiles, ahkppConfig, find_class, get_class_constructor, isBrowser, is_line_continue, lexers, make_same_name_error, openFile, warn, workspaceFolders -} from './common.js'; -import { CfgKey, getCfg } from './config.js'; +} from './common'; +import { CfgKey, getCfg } from './config'; export let globalsymbolcache: Record = {}; diff --git a/server/src/utils.ts b/server/src/utils.ts index 831071ad..30ff2ff0 100644 --- a/server/src/utils.ts +++ b/server/src/utils.ts @@ -1,4 +1,4 @@ -import { LibrarySuggestions } from './config.js'; +import { LibrarySuggestions } from './config'; export function includeUserAndStandardLibrary( librarySuggestions: LibrarySuggestions, diff --git a/server/tsconfig.json b/server/tsconfig.json index f219a5b1..b4758cd2 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -2,11 +2,12 @@ "compilerOptions": { "target": "ES2022", "lib": ["ES2022", "WebWorker"], - "module": "NodeNext", - "moduleResolution": "NodeNext", + "module": "commonjs", + "moduleResolution": "node", "sourceMap": true, "strict": true, - "outDir": "out" + "outDir": "out", + "rootDirs": ["src", "../client/src"] }, "include": ["src"], "exclude": ["node_modules", ".vscode-test", ".vscode-test-web"] diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..f1057913 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES2021", + "lib": ["ES2021"], + "outDir": "out", + "rootDir": "src", + "sourceMap": true, + "composite": true + }, + "include": ["src"], + "exclude": ["node_modules", ".vscode-test"], + "references": [{ "path": "./client" }, { "path": "./server" }] +} diff --git a/vitest.config.mjs b/vitest.config.mjs new file mode 100644 index 00000000..1b0aa0f2 --- /dev/null +++ b/vitest.config.mjs @@ -0,0 +1,13 @@ +import { defineConfig } from 'vitest/config'; + +// https://vitest.dev/config +// https://vitest.dev/guide/improving-performance.html +export default defineConfig({ + test: { + isolate: false, + pool: 'threads', + coverage: { + enabled: true, + }, + }, +});