From df3b6f90c0182fd41c304d0a85f7f8f4a3572d6f Mon Sep 17 00:00:00 2001 From: Philippe Chabot Date: Sun, 14 Aug 2022 16:36:00 -0400 Subject: [PATCH] Apply eslint (#41) * Lint the project --- .eslintignore | 1 + .eslintrc.json | 33 +- .prettierrc.json | 5 + .vscode/settings.json | 3 +- CHANGELOG.md | 4 + client/src/extension.ts | 4 +- package.json | 16 +- server/scripts/GenerateLibDefinitions.ts | 1 + server/src/Documents/Document.ts | 15 +- server/src/Documents/DocumentsCollection.ts | 20 +- server/src/Documents/DocumentsIndexer.ts | 4 +- server/src/Providers/Builders/Builder.ts | 4 +- .../Builders/CompletionItemBuilder.ts | 4 +- .../Providers/Builders/HoverContentBuilder.ts | 6 +- .../Builders/SignatureHelpBuilder.ts | 6 +- .../src/Providers/CompletionItemsProvider.ts | 15 +- server/src/Providers/ConfigurationProvider.ts | 18 +- server/src/Providers/DiagnosticsProvider.ts | 55 +- .../Providers/DocumentFormattingProvider.ts | 5 +- .../DocumentRangeFormattingProvider.ts | 4 +- .../Providers/Formatters/ClangFormatter.ts | 36 +- server/src/Providers/Formatters/Formatter.ts | 18 +- .../src/Providers/GotoDefinitionProvider.ts | 19 +- server/src/Providers/HoverContentProvider.ts | 17 +- server/src/Providers/Provider.ts | 8 +- server/src/Providers/SignatureHelpProvider.ts | 15 +- .../src/ServerManager/CapabilitiesHandler.ts | 18 +- server/src/ServerManager/ServerManager.ts | 53 +- server/src/Tokenizer/Tokenizer.ts | 58 +- server/src/Utils/Dictionnary.ts | 2 +- .../WorkspaceFilesSystem.ts | 36 +- server/src/onigLib.ts | 4 +- server/src/server.ts | 49 +- server/test/tokenization_test.ts | 4 +- server/tsconfig.eslint.json | 17 + yarn.lock | 709 ++++++++++++++++-- 36 files changed, 953 insertions(+), 333 deletions(-) create mode 100644 .eslintignore create mode 100644 .prettierrc.json create mode 100644 server/tsconfig.eslint.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..f84c843 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +webpack.config.js \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json index 5dfecab..bbf364d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,17 +2,40 @@ "root": true, "parser": "@typescript-eslint/parser", "parserOptions": { - "ecmaVersion": 6, - "sourceType": "module" + "ecmaVersion": "latest", + "sourceType": "module", + "project": ["./client/tsconfig.json", "./server/tsconfig.json", "./server/tsconfig.eslint.json"] }, "plugins": ["@typescript-eslint"], + "extends": ["standard-with-typescript", "plugin:prettier/recommended"], "rules": { + "@typescript-eslint/quotes": ["error", "double"], + "@typescript-eslint/consistent-type-definitions": ["error", "type"], "@typescript-eslint/naming-convention": "warn", - "@typescript-eslint/semi": "warn", + "@typescript-eslint/no-non-null-assertion": "warn", + "@typescript-eslint/no-floating-promises": "warn", + "@typescript-eslint/semi": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/space-before-function-paren": "off", + "@typescript-eslint/array-type": "off", + "@typescript-eslint/strict-boolean-expressions": "off", + "@typescript-eslint/prefer-nullish-coalescing": "off", + "@typescript-eslint/consistent-type-assertions": "off", + "@typescript-eslint/no-extraneous-class": "off", "curly": "warn", "eqeqeq": "warn", + "no-unsafe-finally": "warn", "no-throw-literal": "warn", - "semi": "off" + "space-before-function-paren": "off", + "semi": "off", + "quotes": "off", + "no-extra-boolean-cast": "off", + "prettier/prettier": [ + "error", + { + "endOfLine": "auto" + } + ] }, - "ignorePatterns": ["out", "dist", "**/*.d.ts"] + "ignorePatterns": ["out", "**/*.d.ts"] } diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..c8b83bc --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,5 @@ +{ + "printWidth": 130, + "trailingComma": "all", + "singleQuote": false +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 3f131cf..8c96fbd 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,6 +2,5 @@ "editor.formatOnSave": true, "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - }, - "prettier.printWidth": 130 + } } diff --git a/CHANGELOG.md b/CHANGELOG.md index d481f63..0ccd011 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,3 +39,7 @@ All notable changes to the "nwscript-ee-language-server" extension will be docum ## [1.5.0] - The extension size has been lowered from 14.7 to 4.8 MB. + +## [1.5.1] + +- Eslint has been configured along with prettier and the project will be linted from now on. diff --git a/client/src/extension.ts b/client/src/extension.ts index 5f84744..148f7f3 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -25,6 +25,6 @@ export function activate(context: ExtensionContext) { client.start(); } -export function deactivate() { - return client?.stop(); +export async function deactivate() { + return await client?.stop(); } diff --git a/package.json b/package.json index f0db679..7ea9934 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "url": "https://github.com/PhilippeChab/nwscript-ee-language-server" }, "license": "MIT", - "version": "1.5.0", + "version": "1.5.1", "author": { "name": "Philippe Chabot" }, @@ -148,14 +148,20 @@ }, "devDependencies": { "@types/node": "14.x", - "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/eslint-plugin": "^5.33.0", "@typescript-eslint/parser": "^5.21.0", - "eslint": "^8.14.0", + "eslint": "^8.0.1", + "eslint-config-prettier": "^8.5.0", + "eslint-config-standard-with-typescript": "^22.0.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0", + "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-promise": "^6.0.0", "merge-options": "^3.0.4", - "prettier": "^2.6.2", + "prettier": "^2.7.1", "rimraf": "^3.0.2", "ts-loader": "^9.3.1", - "typescript": "^4.6.4", + "typescript": "*", "webpack": "^5.74.0", "webpack-cli": "^4.10.0" } diff --git a/server/scripts/GenerateLibDefinitions.ts b/server/scripts/GenerateLibDefinitions.ts index 642fa03..4971a32 100644 --- a/server/scripts/GenerateLibDefinitions.ts +++ b/server/scripts/GenerateLibDefinitions.ts @@ -1,5 +1,6 @@ import { writeFileSync, readFileSync } from "fs"; import { normalize, join } from "path"; + import { Tokenizer } from "../src/Tokenizer"; import { TokenizedScope } from "../src/Tokenizer/Tokenizer"; diff --git a/server/src/Documents/Document.ts b/server/src/Documents/Document.ts index ff832ce..2c2fdff 100644 --- a/server/src/Documents/Document.ts +++ b/server/src/Documents/Document.ts @@ -1,4 +1,3 @@ -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import type { ComplexToken, StructComplexToken } from "../Tokenizer/types"; import type DocumentsCollection from "./DocumentsCollection"; @@ -11,11 +10,11 @@ export default class Document { readonly children: string[], readonly complexTokens: ComplexToken[], readonly structComplexTokens: StructComplexToken[], - private readonly collection: DocumentsCollection + private readonly collection: DocumentsCollection, ) {} public getKey() { - return WorkspaceFilesSystem.getFileBasename(this.path); + return this.collection.getKey(this.path); } public getChildren(computedChildren: string[] = []): string[] { @@ -35,7 +34,7 @@ export default class Document { } return childDocument.getChildren(computedChildren); - }) + }), ); } @@ -56,7 +55,7 @@ export default class Document { } return childDocument.getGlobalComplexTokensWithRef(computedChildren); - }) + }), ); } @@ -77,7 +76,7 @@ export default class Document { } return childDocument.getGlobalComplexTokens(computedChildren); - }) + }), ); } @@ -98,7 +97,7 @@ export default class Document { } return childDocument.getGlobalStructComplexTokensWithRef(computedChildren); - }) + }), ); } @@ -119,7 +118,7 @@ export default class Document { } return childDocument.getGlobalStructComplexTokens(computedChildren); - }) + }), ); } } diff --git a/server/src/Documents/DocumentsCollection.ts b/server/src/Documents/DocumentsCollection.ts index 5056fe1..93dac69 100644 --- a/server/src/Documents/DocumentsCollection.ts +++ b/server/src/Documents/DocumentsCollection.ts @@ -1,12 +1,14 @@ -import { join } from "path"; +import { basename, join } from "path"; +import { fileURLToPath } from "url"; +import { readFileSync } from "fs"; +import { TextDocument } from "vscode-languageserver-textdocument"; import type { Tokenizer } from "../Tokenizer"; import type { ComplexToken } from "../Tokenizer/types"; import { GlobalScopeTokenizationResult, TokenizedScope } from "../Tokenizer/Tokenizer"; import { Dictionnary } from "../Utils"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import Document from "./Document"; -import { TextDocument } from "vscode-languageserver-textdocument"; +import { FILES_EXTENSION } from "../WorkspaceFilesSystem/WorkspaceFilesSystem"; export default class DocumentsCollection extends Dictionnary { public readonly standardLibComplexTokens: ComplexToken[] = []; @@ -15,7 +17,7 @@ export default class DocumentsCollection extends Dictionnary { super(); this.standardLibComplexTokens = JSON.parse( - WorkspaceFilesSystem.readFileSync(join(__dirname, "..", "resources", "standardLibDefinitions.json")).toString() + readFileSync(join(__dirname, "..", "resources", "standardLibDefinitions.json")).toString(), ).complexTokens as ComplexToken[]; } @@ -31,12 +33,20 @@ export default class DocumentsCollection extends Dictionnary { return new Document(filePath, globalScope.children, globalScope.complexTokens, globalScope.structComplexTokens, this); } + public getKey(path: string) { + return basename(path, FILES_EXTENSION).slice(0, -1); + } + + public getFromPath(path: string) { + return this.get(this.getKey(path)); + } + public createDocument(filePath: string, globalScope: GlobalScopeTokenizationResult) { this.addDocument(this.initializeDocument(filePath, globalScope)); } public updateDocument(document: TextDocument, tokenizer: Tokenizer) { - const filePath = WorkspaceFilesSystem.fileUriToPath(document.uri); + const filePath = fileURLToPath(document.uri); const globalScope = tokenizer.tokenizeContent(document.getText(), TokenizedScope.global); this.overwriteDocument(this.initializeDocument(filePath, globalScope)); diff --git a/server/src/Documents/DocumentsIndexer.ts b/server/src/Documents/DocumentsIndexer.ts index 4cec968..2f8b362 100644 --- a/server/src/Documents/DocumentsIndexer.ts +++ b/server/src/Documents/DocumentsIndexer.ts @@ -1,8 +1,8 @@ +import { readFileSync } from "fs"; import { exit } from "process"; import { Tokenizer } from "../Tokenizer"; import { TokenizedScope } from "../Tokenizer/Tokenizer"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; const generateTokens = async (filesPath: string[]) => { if (filesPath.length === 1 && !Boolean(filesPath[0])) { @@ -17,7 +17,7 @@ const generateTokens = async (filesPath: string[]) => { continue; } - const fileContent = WorkspaceFilesSystem.readFileSync(filePath).toString(); + const fileContent = readFileSync(filePath).toString(); const globalScope = tokenizer.tokenizeContent(fileContent, TokenizedScope.global); process?.send!(JSON.stringify({ filePath, globalScope })); diff --git a/server/src/Providers/Builders/Builder.ts b/server/src/Providers/Builders/Builder.ts index 2e01a22..b7bd9f2 100644 --- a/server/src/Providers/Builders/Builder.ts +++ b/server/src/Providers/Builders/Builder.ts @@ -24,11 +24,11 @@ export default abstract class Builder { return token.tokenType === CompletionItemKind.Constant; } - protected static isVariable(token: ComplexToken): token is VariableComplexToken { + protected static isVariableToken(token: ComplexToken): token is VariableComplexToken { return token.tokenType === CompletionItemKind.Variable; } - protected static isFunctionParameter(token: ComplexToken): token is FunctionParamComplexToken { + protected static isFunctionParameterToken(token: ComplexToken): token is FunctionParamComplexToken { return token.tokenType === CompletionItemKind.TypeParameter; } diff --git a/server/src/Providers/Builders/CompletionItemBuilder.ts b/server/src/Providers/Builders/CompletionItemBuilder.ts index eef78d4..901cbf0 100644 --- a/server/src/Providers/Builders/CompletionItemBuilder.ts +++ b/server/src/Providers/Builders/CompletionItemBuilder.ts @@ -34,9 +34,9 @@ export default class CompletionItemBuilder extends Builder { public static buildItem(token: ComplexToken): CompletionItem { if (this.isConstantToken(token)) { return this.buildConstantItem(token); - } else if (this.isVariable(token)) { + } else if (this.isVariableToken(token)) { return this.buildVariableItem(token); - } else if (this.isFunctionParameter(token)) { + } else if (this.isFunctionParameterToken(token)) { return this.buildFunctionParamItem(token); } else if (this.isFunctionToken(token)) { return this.buildFunctionItem(token); diff --git a/server/src/Providers/Builders/HoverContentBuilder.ts b/server/src/Providers/Builders/HoverContentBuilder.ts index a2c24a9..c780ff9 100644 --- a/server/src/Providers/Builders/HoverContentBuilder.ts +++ b/server/src/Providers/Builders/HoverContentBuilder.ts @@ -16,9 +16,9 @@ export default class HoverContentBuilder extends Builder { public static buildItem(token: ComplexToken, serverConfig: ServerConfiguration): MarkupContent { if (this.isConstantToken(token)) { return this.buildConstantItem(token); - } else if (this.isVariable(token)) { + } else if (this.isVariableToken(token)) { return this.buildVariableItem(token); - } else if (this.isFunctionParameter(token)) { + } else if (this.isFunctionParameterToken(token)) { return this.buildFunctionParamItem(token); } else if (this.isFunctionToken(token)) { return this.buildFunctionItem(token, serverConfig); @@ -53,7 +53,7 @@ export default class HoverContentBuilder extends Builder { }, "")})`, ], serverConfig.includeCommentsInFunctionsHover ? ["```nwscript", ...token.comments, "```"] : [], - [] + [], ); } diff --git a/server/src/Providers/Builders/SignatureHelpBuilder.ts b/server/src/Providers/Builders/SignatureHelpBuilder.ts index 09799aa..798396d 100644 --- a/server/src/Providers/Builders/SignatureHelpBuilder.ts +++ b/server/src/Providers/Builders/SignatureHelpBuilder.ts @@ -14,9 +14,9 @@ export default class SignatureHelpBuilder extends Builder { }`; }, "")})`, undefined, - ...(token as FunctionComplexToken).params.map((param) => - ParameterInformation.create(`${param.valueType} ${param.identifier}`) - ) + ...token.params.map((param) => + ParameterInformation.create(`${param.valueType} ${param.identifier}`), + ), ), ], activeSignature: 0, diff --git a/server/src/Providers/CompletionItemsProvider.ts b/server/src/Providers/CompletionItemsProvider.ts index 30dbb00..9445c7a 100644 --- a/server/src/Providers/CompletionItemsProvider.ts +++ b/server/src/Providers/CompletionItemsProvider.ts @@ -1,7 +1,7 @@ +import { fileURLToPath } from "url"; import { CompletionParams } from "vscode-languageserver"; import type { ServerManager } from "../ServerManager"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import { CompletionItemBuilder } from "./Builders"; import { LocalScopeTokenizationResult, TokenizedScope } from "../Tokenizer/Tokenizer"; import { TriggerCharacters } from "."; @@ -15,7 +15,7 @@ export default class CompletionItemsProvider extends Provider { this.server.connection.onCompletion((params) => this.exceptionsWrapper(this.providerHandler(params))); this.server.connection.onCompletionResolve((item) => - this.exceptionsWrapper(() => CompletionItemBuilder.buildResolvedItem(item, this.server.config), item) + this.exceptionsWrapper(() => CompletionItemBuilder.buildResolvedItem(item, this.server.config), item), ); } @@ -27,9 +27,8 @@ export default class CompletionItemsProvider extends Provider { } = params; const liveDocument = this.server.liveDocumentsManager.get(uri); - const path = WorkspaceFilesSystem.fileUriToPath(uri); - const documentKey = WorkspaceFilesSystem.getFileBasename(path); - const document = this.server.documentsCollection?.get(documentKey); + const path = fileURLToPath(uri); + const document = this.server.documentsCollection.getFromPath(path); if (liveDocument) { const localScope = this.server.tokenizer?.tokenizeContent(liveDocument.getText(), TokenizedScope.local, 0, position.line); @@ -40,11 +39,11 @@ export default class CompletionItemsProvider extends Provider { const structVariableIdentifier = this.server.tokenizer?.findLineIdentiferFromPositionAt( liveDocument.getText(), position, - -2 + -2, ); const structIdentifer = localScope.functionVariablesComplexTokens.find( - (token) => token.identifier === structVariableIdentifier + (token) => token.identifier === structVariableIdentifier, )?.valueType; return document @@ -73,7 +72,7 @@ export default class CompletionItemsProvider extends Provider { private getLocalScopeCompletionItems(localScope: LocalScopeTokenizationResult) { const functionVariablesCompletionItems = localScope.functionVariablesComplexTokens.map((token) => - CompletionItemBuilder.buildItem(token) + CompletionItemBuilder.buildItem(token), ); const functionsCompletionItems = localScope.functionsComplexTokens.map((token) => CompletionItemBuilder.buildItem(token)); diff --git a/server/src/Providers/ConfigurationProvider.ts b/server/src/Providers/ConfigurationProvider.ts index f6266b5..57d35f3 100644 --- a/server/src/Providers/ConfigurationProvider.ts +++ b/server/src/Providers/ConfigurationProvider.ts @@ -4,17 +4,23 @@ import { ServerManager } from "../ServerManager"; type ConfigCallback = () => void; export default class ConfigurationProvider { - public static register(server: ServerManager, configChangeCallback: ConfigCallback) { - return new this(server, configChangeCallback); - } - constructor(private readonly server: ServerManager, private readonly configChangeCallback: ConfigCallback) { - this.server.connection.client.register(DidChangeConfigurationNotification.type); this.server.connection.onDidChangeConfiguration(this.handleDidChangeConfiguration); } + private async registerCallback() { + await this.server.connection.client.register(DidChangeConfigurationNotification.type); + } + // This needs to be an arrow function to keep the context - private handleDidChangeConfiguration = (_: DidChangeConfigurationParams) => { + private readonly handleDidChangeConfiguration = (_: DidChangeConfigurationParams) => { this.configChangeCallback(); }; + + public static async register(server: ServerManager, configChangeCallback: ConfigCallback) { + const provider = new this(server, configChangeCallback); + await provider.registerCallback(); + + return provider; + } } diff --git a/server/src/Providers/DiagnosticsProvider.ts b/server/src/Providers/DiagnosticsProvider.ts index 7253702..c9d1837 100644 --- a/server/src/Providers/DiagnosticsProvider.ts +++ b/server/src/Providers/DiagnosticsProvider.ts @@ -1,14 +1,15 @@ import { spawn } from "child_process"; import { type } from "os"; import { join, dirname, basename } from "path"; +import { fileURLToPath, pathToFileURL } from "url"; import { Diagnostic, DiagnosticSeverity } from "vscode-languageserver"; + import { ServerManager } from "../ServerManager"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import Provider from "./Provider"; const lineNumber = /\(([^)]+)\)/; const lineMessage = /Error:(.*)/; -const lineFilename = /^[^\(]+/; +const lineFilename = /^[^(]+/; enum OS { linux = "Linux", @@ -21,8 +22,12 @@ export default class DiagnoticsProvider extends Provider { constructor(server: ServerManager) { super(server); - this.server.liveDocumentsManager.onDidSave((event) => this.asyncExceptionsWrapper(this.publish(event.document.uri))); - this.server.liveDocumentsManager.onDidOpen((event) => this.asyncExceptionsWrapper(this.publish(event.document.uri))); + this.server.liveDocumentsManager.onDidSave( + async (event) => await this.asyncExceptionsWrapper(this.publish(event.document.uri)), + ); + this.server.liveDocumentsManager.onDidOpen( + async (event) => await this.asyncExceptionsWrapper(this.publish(event.document.uri)), + ); } private sendDiagnostics(uri: string, diagnostics: Diagnostic[]) { @@ -34,10 +39,10 @@ export default class DiagnoticsProvider extends Provider { const path = paths.find((path) => basename(path) === lineFilename.exec(line)![0]); if (path) { - const fileUri = WorkspaceFilesSystem.filePathToUri(path).toString(); + const fileUri = pathToFileURL(path).toString(); const linePosition = Number(lineNumber.exec(line)![1]) - 1; const diagnostic = { - severity: severity, + severity, range: { start: { line: linePosition, character: 0 }, end: { line: linePosition, character: Number.MAX_VALUE }, @@ -69,20 +74,20 @@ export default class DiagnoticsProvider extends Provider { private publish(uri: string) { return async () => { - return new Promise((resolve, reject) => { + return await new Promise((resolve, reject) => { const { enabled, nwnHome, nwnInstallation, verbose } = this.server.config.compiler; if (!enabled) { - return reject(); + return resolve(true); } if (!this.hasSupportedOS()) { - this.server.logger.error("Unsupported OS. Cannot provide diagnostics."); - return reject(); + const errorMessage = "Unsupported OS. Cannot provide diagnostics."; + this.server.logger.error(errorMessage); + return reject(new Error(errorMessage)); } - const path = WorkspaceFilesSystem.fileUriToPath(uri); - const documentKey = WorkspaceFilesSystem.getFileBasename(path); - const document = this.server.documentsCollection?.get(documentKey); + const path = fileURLToPath(uri); + const document = this.server.documentsCollection.getFromPath(path); if (!this.server.hasIndexedDocuments || !document) { if (!this.server.documentsWaitingForPublish.includes(uri)) { @@ -92,12 +97,12 @@ export default class DiagnoticsProvider extends Provider { } const children = document.getChildren(); - const files: FilesDiagnostics = { [WorkspaceFilesSystem.filePathToUri(document.path).toString()]: [] }; + const files: FilesDiagnostics = { [pathToFileURL(document.path).toString()]: [] }; const paths: string[] = []; children.forEach((child) => { const filePath = this.server.documentsCollection?.get(child)?.path; if (filePath) { - files[WorkspaceFilesSystem.filePathToUri(filePath).toString()] = []; + files[pathToFileURL(filePath).toString()] = []; paths.push(filePath); } }); @@ -137,12 +142,12 @@ export default class DiagnoticsProvider extends Provider { const child = spawn(join(__dirname, this.getExecutablePath()), args, { shell: true }); - child.stdout.on("data", (chunk) => (stdout += chunk)); - child.stderr.on("data", (chunk) => (stderr += chunk)); + child.stdout.on("data", (chunk: string) => (stdout += chunk)); + child.stderr.on("data", (chunk: string) => (stderr += chunk)); child.on("error", (e: any) => { this.server.logger.error(e.message); - reject(); + reject(e); }); child.on("close", (_) => { @@ -170,22 +175,22 @@ export default class DiagnoticsProvider extends Provider { // Actual errors if (line.includes("NOTFOUND")) { return this.server.logger.error( - "Unable to resolve nwscript.nss. Are your Neverwinter Nights home and/or installation directories valid?" + "Unable to resolve nwscript.nss. Are your Neverwinter Nights home and/or installation directories valid?", ); } if (line.includes("Failed to open .key archive")) { return this.server.logger.error( - "Unable to open nwn_base.key Is your Neverwinter Nights installation directory valid?" + "Unable to open nwn_base.key Is your Neverwinter Nights installation directory valid?", ); } if (line.includes("Unable to read input file")) { if (Boolean(nwnHome) || Boolean(nwnInstallation)) { return this.server.logger.error( - "Unable to resolve provided Neverwinter Nights home and/or installation directories. Ensure the paths are valid in the extension settings." + "Unable to resolve provided Neverwinter Nights home and/or installation directories. Ensure the paths are valid in the extension settings.", ); } else { return this.server.logger.error( - "Unable to automatically resolve Neverwinter Nights home and/or installation directories." + "Unable to automatically resolve Neverwinter Nights home and/or installation directories.", ); } } @@ -205,7 +210,7 @@ export default class DiagnoticsProvider extends Provider { resolve(true); } catch (e: any) { this.server.logger.error(e.message); - reject(); + reject(e); } }); }); @@ -213,6 +218,8 @@ export default class DiagnoticsProvider extends Provider { } public async processDocumentsWaitingForPublish() { - return Promise.all(this.server.documentsWaitingForPublish.map((uri) => this.asyncExceptionsWrapper(this.publish(uri)))); + return await Promise.all( + this.server.documentsWaitingForPublish.map(async (uri) => await this.asyncExceptionsWrapper(this.publish(uri))), + ); } } diff --git a/server/src/Providers/DocumentFormattingProvider.ts b/server/src/Providers/DocumentFormattingProvider.ts index 1befe94..3520744 100644 --- a/server/src/Providers/DocumentFormattingProvider.ts +++ b/server/src/Providers/DocumentFormattingProvider.ts @@ -8,9 +8,8 @@ export default class DocumentFormattingProvider extends Provider { constructor(server: ServerManager) { super(server); - this.server.connection.onDocumentOnTypeFormatting; this.server.connection.onDocumentFormatting( - async (params) => await this.asyncExceptionsWrapper(this.providerHandler(params)) + async (params) => await this.asyncExceptionsWrapper(this.providerHandler(params)), ); } @@ -25,7 +24,7 @@ export default class DocumentFormattingProvider extends Provider { ignoredGlobs, executable, style, - this.server.logger + this.server.logger, ); if (!enabled || clangFormatter.isIgnoredFile(uri)) { diff --git a/server/src/Providers/DocumentRangeFormattingProvider.ts b/server/src/Providers/DocumentRangeFormattingProvider.ts index be9e702..f0db53c 100644 --- a/server/src/Providers/DocumentRangeFormattingProvider.ts +++ b/server/src/Providers/DocumentRangeFormattingProvider.ts @@ -9,7 +9,7 @@ export default class DocumentRangeFormattingProvider extends Provider { super(server); this.server.connection.onDocumentRangeFormatting( - async (params) => await this.asyncExceptionsWrapper(this.providerHandler(params)) + async (params) => await this.asyncExceptionsWrapper(this.providerHandler(params)), ); } @@ -25,7 +25,7 @@ export default class DocumentRangeFormattingProvider extends Provider { ignoredGlobs, executable, style, - this.server.logger + this.server.logger, ); if (!enabled || clangFormatter.isIgnoredFile(uri)) { diff --git a/server/src/Providers/Formatters/ClangFormatter.ts b/server/src/Providers/Formatters/ClangFormatter.ts index f1a9014..ed1f062 100644 --- a/server/src/Providers/Formatters/ClangFormatter.ts +++ b/server/src/Providers/Formatters/ClangFormatter.ts @@ -1,23 +1,11 @@ import { spawn } from "child_process"; -import { parser } from "sax"; +import { parser, Tag } from "sax"; import { Range } from "vscode-languageserver"; import { TextDocument, TextEdit } from "vscode-languageserver-textdocument"; -import { Logger } from "../../Logger"; -import { WorkspaceFilesSystem } from "../../WorkspaceFilesSystem"; import Formatter from "./Formatter"; export default class ClangFormatter extends Formatter { - constructor( - workspaceFilesSystem: WorkspaceFilesSystem, - ignoredGlobs: string[], - executable: string, - style: { [index: string]: any }, - logger: Logger - ) { - super(workspaceFilesSystem, ignoredGlobs, executable, style, logger); - } - private getEdits(document: TextDocument, xml: string, codeContent: string) { const saxParser = parser(true, { trim: false, @@ -31,7 +19,7 @@ export default class ClangFormatter extends Formatter { throw err; }; - saxParser.onopentag = (tag) => { + saxParser.onopentag = (tag: Tag) => { if (currentEdit) { throw new Error("Malformed output."); } @@ -42,8 +30,8 @@ export default class ClangFormatter extends Formatter { case "replacement": currentEdit = { - length: parseInt(tag.attributes["length"].toString()), - offset: parseInt(tag.attributes["offset"].toString()), + length: parseInt(tag.attributes.length.toString()), + offset: parseInt(tag.attributes.offset.toString()), text: "", }; this.byteToOffset(codeContent, currentEdit); @@ -80,8 +68,8 @@ export default class ClangFormatter extends Formatter { return edits; } - public formatDocument(document: TextDocument, range: Range | null): Promise { - return new Promise((resolve, reject) => { + public async formatDocument(document: TextDocument, range: Range | null): Promise { + return await new Promise((resolve, reject) => { const formatCommandBinPath = this.getExecutablePath(); const codeContent = document.getText(); @@ -101,18 +89,18 @@ export default class ClangFormatter extends Formatter { }); child.stdin.end(codeContent); - child.stdout.on("data", (chunk) => (stdout += chunk)); - child.stderr.on("data", (chunk) => (stderr += chunk)); + child.stdout.on("data", (chunk: string) => (stdout += chunk)); + child.stderr.on("data", (chunk: string) => (stderr += chunk)); child.on("error", (e: any) => { if (e && e.code === "ENOENT") { this.logger.error( - `The ${formatCommandBinPath} command is not available. Please check your executable setting and ensure clang executable is installed.` + `The ${formatCommandBinPath} command is not available. Please check your executable setting and ensure clang executable is installed.`, ); reject(e); } else { this.logger.error(e.message); - reject(); + reject(e); } }); @@ -120,13 +108,13 @@ export default class ClangFormatter extends Formatter { try { if (code !== 0 || stderr.length !== 0) { this.logger.error(stderr); - reject(); + reject(new Error(stderr)); } resolve(this.getEdits(document, stdout, codeContent)); } catch (e: any) { this.logger.error(e.message); - reject(); + reject(e); } }); }); diff --git a/server/src/Providers/Formatters/Formatter.ts b/server/src/Providers/Formatters/Formatter.ts index 950d76c..1146108 100644 --- a/server/src/Providers/Formatters/Formatter.ts +++ b/server/src/Providers/Formatters/Formatter.ts @@ -1,7 +1,9 @@ -import { WorkspaceFilesSystem } from "../../WorkspaceFilesSystem"; -import { Logger } from "../../Logger"; import { delimiter, join } from "path"; +import { fileURLToPath } from "url"; +import { existsSync } from "fs"; +import { WorkspaceFilesSystem } from "../../WorkspaceFilesSystem"; +import { Logger } from "../../Logger"; const codeByteOffsetCache = { byte: 0, offset: 0 }; const binPathCache: { [bin: string]: string } = {}; @@ -19,7 +21,7 @@ export default class Formatter { protected readonly ignoredGlobs: string[], protected readonly executable: string, protected readonly style: { [index: string]: any }, - protected readonly logger: Logger + protected readonly logger: Logger, ) {} protected byteToOffset(codeContent: string, editInfo: { length: number; offset: number }) { @@ -51,18 +53,18 @@ export default class Formatter { } for (const binNameToSearch of platformBinName(binName)) { - if (WorkspaceFilesSystem.existsSync(binNameToSearch)) { + if (existsSync(binNameToSearch)) { binPathCache[binName] = binNameToSearch; return binNameToSearch; } - if (process.env["PATH"]) { - const pathParts = process.env["PATH"].split(delimiter); + if (process.env.PATH) { + const pathParts = process.env.PATH.split(delimiter); for (let i = 0; i < pathParts.length; i++) { const binPath = join(pathParts[i], binNameToSearch); - if (WorkspaceFilesSystem.existsSync(binPath)) { + if (existsSync(binPath)) { binPathCache[binName] = binPath; return binPath; } @@ -75,7 +77,7 @@ export default class Formatter { } public isIgnoredFile(documentUri: string) { - const documentPath = WorkspaceFilesSystem.fileUriToPath(documentUri); + const documentPath = fileURLToPath(documentUri); return this.ignoredGlobs.some((glob) => { return this.workspaceFilesSystem.getGlobPaths(glob).some((path) => path === documentPath); diff --git a/server/src/Providers/GotoDefinitionProvider.ts b/server/src/Providers/GotoDefinitionProvider.ts index 72f801d..eef98bc 100644 --- a/server/src/Providers/GotoDefinitionProvider.ts +++ b/server/src/Providers/GotoDefinitionProvider.ts @@ -1,10 +1,10 @@ +import { fileURLToPath, pathToFileURL } from "url"; import { CompletionItemKind, DefinitionParams } from "vscode-languageserver"; import type { OwnedComplexTokens, OwnedStructComplexTokens } from "../Documents/Document"; import type { ServerManager } from "../ServerManager"; import type { ComplexToken } from "../Tokenizer/types"; import { TokenizedScope } from "../Tokenizer/Tokenizer"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import Provider from "./Provider"; export default class GotoDefinitionProvider extends Provider { @@ -22,17 +22,16 @@ export default class GotoDefinitionProvider extends Provider { } = params; const liveDocument = this.server.liveDocumentsManager.get(uri); - const path = WorkspaceFilesSystem.fileUriToPath(uri); - const documentKey = WorkspaceFilesSystem.getFileBasename(path); - const document = this.server.documentsCollection?.get(documentKey); + const path = fileURLToPath(uri); + const document = this.server.documentsCollection.getFromPath(path); - if (liveDocument) { + if (liveDocument && this.server.tokenizer) { let token: ComplexToken | undefined; let ref: OwnedComplexTokens | OwnedStructComplexTokens | undefined; - const { tokenType, structVariableIdentifier, identifier } = this.server.tokenizer?.findActionTargetAtPosition( + const { tokenType, structVariableIdentifier, identifier } = this.server.tokenizer.findActionTargetAtPosition( liveDocument.getText(), - position - )!; + position, + ); const localScope = this.server.tokenizer?.tokenizeContent(liveDocument.getText(), TokenizedScope.local, 0, position.line); @@ -47,7 +46,7 @@ export default class GotoDefinitionProvider extends Provider { if (document) { if (tokenType === CompletionItemKind.Property && structVariableIdentifier) { const structIdentifer = localScope?.functionVariablesComplexTokens.find( - (token) => token.identifier === structVariableIdentifier + (token) => token.identifier === structVariableIdentifier, )?.valueType; const tokensWithRef = document.getGlobalStructComplexTokensWithRef(); @@ -91,7 +90,7 @@ export default class GotoDefinitionProvider extends Provider { if (token) { return { - uri: ref ? WorkspaceFilesSystem.filePathToUri(ref.owner).toString() : uri, + uri: ref ? pathToFileURL(ref.owner).toString() : uri, range: { start: { line: token.position.line, character: token.position.character }, end: { line: token.position.line, character: token.position.character }, diff --git a/server/src/Providers/HoverContentProvider.ts b/server/src/Providers/HoverContentProvider.ts index 1bbc02d..973f350 100644 --- a/server/src/Providers/HoverContentProvider.ts +++ b/server/src/Providers/HoverContentProvider.ts @@ -1,9 +1,9 @@ +import { fileURLToPath } from "url"; import { CompletionItemKind, HoverParams } from "vscode-languageserver"; import type { ServerManager } from "../ServerManager"; import type { ComplexToken } from "../Tokenizer/types"; import { TokenizedScope } from "../Tokenizer/Tokenizer"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import { HoverContentBuilder } from "./Builders"; import Provider from "./Provider"; @@ -22,16 +22,15 @@ export default class HoverContentProvider extends Provider { } = params; const liveDocument = this.server.liveDocumentsManager.get(uri); - const path = WorkspaceFilesSystem.fileUriToPath(uri); - const documentKey = WorkspaceFilesSystem.getFileBasename(path); - const document = this.server.documentsCollection?.get(documentKey); + const path = fileURLToPath(uri); + const document = this.server.documentsCollection.getFromPath(path); - if (liveDocument) { + if (liveDocument && this.server.tokenizer) { let token: ComplexToken | undefined; - const { tokenType, structVariableIdentifier, identifier } = this.server.tokenizer?.findActionTargetAtPosition( + const { tokenType, structVariableIdentifier, identifier } = this.server.tokenizer.findActionTargetAtPosition( liveDocument.getText(), - position - )!; + position, + ); const localScope = this.server.tokenizer?.tokenizeContent(liveDocument.getText(), TokenizedScope.local, 0, position.line); @@ -46,7 +45,7 @@ export default class HoverContentProvider extends Provider { if (document) { if (tokenType === CompletionItemKind.Property && structVariableIdentifier) { const structIdentifer = localScope?.functionVariablesComplexTokens.find( - (token) => token.identifier === structVariableIdentifier + (token) => token.identifier === structVariableIdentifier, )?.valueType; token = document diff --git a/server/src/Providers/Provider.ts b/server/src/Providers/Provider.ts index 612261f..ea03379 100644 --- a/server/src/Providers/Provider.ts +++ b/server/src/Providers/Provider.ts @@ -1,10 +1,6 @@ import type { ServerManager } from "../ServerManager"; export default class Provider { - public static register(server: ServerManager) { - return new this(server); - } - constructor(protected readonly server: ServerManager) {} protected getStandardLibComplexTokens() { @@ -50,4 +46,8 @@ export default class Provider { return result || defaultResult; } } + + public static register(server: ServerManager) { + return new this(server); + } } diff --git a/server/src/Providers/SignatureHelpProvider.ts b/server/src/Providers/SignatureHelpProvider.ts index 056bb94..b1ab421 100644 --- a/server/src/Providers/SignatureHelpProvider.ts +++ b/server/src/Providers/SignatureHelpProvider.ts @@ -1,10 +1,10 @@ +import { fileURLToPath } from "url"; import { SignatureHelpParams } from "vscode-languageserver/node"; import type { ServerManager } from "../ServerManager"; import type { ComplexToken, FunctionComplexToken } from "../Tokenizer/types"; import { LanguageScopes } from "../Tokenizer/constants"; import { TokenizedScope } from "../Tokenizer/Tokenizer"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import { SignatureHelpBuilder } from "./Builders"; import Provider from "./Provider"; @@ -24,16 +24,15 @@ export default class SignatureHelpProvider extends Provider { } = params; const liveDocument = this.server.liveDocumentsManager.get(uri); - const path = WorkspaceFilesSystem.fileUriToPath(uri); - const documentKey = WorkspaceFilesSystem.getFileBasename(path); - const document = this.server.documentsCollection?.get(documentKey); + const path = fileURLToPath(uri); + const document = this.server.documentsCollection.getFromPath(path); let functionComplexToken: ComplexToken | undefined; if (liveDocument) { const tokenizedResult = this.server.tokenizer?.isInLanguageScope( liveDocument.getText(), position, - LanguageScopes.functionCall + LanguageScopes.functionCall, ); if (!tokenizedResult) { return undefined; @@ -43,13 +42,13 @@ export default class SignatureHelpProvider extends Provider { tokenizedResult.line, tokenizedResult.tokensArray, position, - [LanguageScopes.functionCall, LanguageScopes.functionIdentifier] + [LanguageScopes.functionCall, LanguageScopes.functionIdentifier], ); const activeParameter = this.server.tokenizer?.getLanguageScopeOccurencesFromPositionWithDelimiter( tokenizedResult.tokensArray, position, LanguageScopes.separatorStatement, - LanguageScopes.leftArgumentsRoundBracket + LanguageScopes.leftArgumentsRoundBracket, ); if (context?.isRetrigger && context.activeSignatureHelp) { @@ -60,7 +59,7 @@ export default class SignatureHelpProvider extends Provider { functionIdentifier === this.server.tokenizer?.findFirstIdentiferForLanguageScope( signatures[activeSignature].label, - LanguageScopes.functionIdentifier + LanguageScopes.functionIdentifier, ) ) { return { diff --git a/server/src/ServerManager/CapabilitiesHandler.ts b/server/src/ServerManager/CapabilitiesHandler.ts index 2775bec..7610735 100644 --- a/server/src/ServerManager/CapabilitiesHandler.ts +++ b/server/src/ServerManager/CapabilitiesHandler.ts @@ -9,14 +9,6 @@ export default class CapabilitiesHandler { this.capabilities = this.initializeServerCapabilities(); } - public get supportsWorkspaceFolders(): boolean { - return (this.clientCapabilities.workspace && !!this.clientCapabilities.workspace.workspaceFolders) || false; - } - - public get supportsWorkspaceConfiguration(): boolean { - return (this.clientCapabilities.workspace && !!this.clientCapabilities.workspace.configuration) || false; - } - private initializeServerCapabilities(): ServerCapabilities { const capabilities: ServerCapabilities = { textDocumentSync: { @@ -38,7 +30,7 @@ export default class CapabilitiesHandler { }, }; - if (this.clientCapabilities.workspace && this.clientCapabilities.workspace.workspaceFolders) { + if (this.clientCapabilities.workspace?.workspaceFolders) { capabilities.workspace = { workspaceFolders: { supported: true, @@ -49,4 +41,12 @@ export default class CapabilitiesHandler { return capabilities; } + + public getSupportsWorkspaceFolders(): boolean { + return (this.clientCapabilities.workspace && !!this.clientCapabilities.workspace.workspaceFolders) || false; + } + + public getSupportsWorkspaceConfiguration(): boolean { + return (this.clientCapabilities.workspace && !!this.clientCapabilities.workspace.configuration) || false; + } } diff --git a/server/src/ServerManager/ServerManager.ts b/server/src/ServerManager/ServerManager.ts index 79b05d1..7b70469 100644 --- a/server/src/ServerManager/ServerManager.ts +++ b/server/src/ServerManager/ServerManager.ts @@ -1,4 +1,7 @@ import type { Connection, InitializeParams } from "vscode-languageserver"; +import { cpus } from "os"; +import { join } from "path"; +import * as clustering from "cluster"; import { CompletionItemsProvider, @@ -21,15 +24,14 @@ import CapabilitiesHandler from "./CapabilitiesHandler"; export default class ServerManger { public connection: Connection; public logger: Logger; + public config = defaultServerConfiguration; public capabilitiesHandler: CapabilitiesHandler; public workspaceFilesSystem: WorkspaceFilesSystem; public liveDocumentsManager: LiveDocumentsManager; - public config = defaultServerConfiguration; + public documentsCollection: DocumentsCollection; public tokenizer: Tokenizer | null = null; - public documentsCollection: DocumentsCollection | null = null; - public hasIndexedDocuments: boolean = false; + public hasIndexedDocuments = false; public documentsWaitingForPublish: string[] = []; - public diagnosticsProvider: DiagnosticsProvider | null = null; constructor(connection: Connection, params: InitializeParams) { this.connection = connection; @@ -37,13 +39,13 @@ export default class ServerManger { this.capabilitiesHandler = new CapabilitiesHandler(params.capabilities); this.workspaceFilesSystem = new WorkspaceFilesSystem(params.rootPath!, params.workspaceFolders!); this.liveDocumentsManager = new LiveDocumentsManager(); + this.documentsCollection = new DocumentsCollection(); this.liveDocumentsManager.listen(this.connection); } public async initialize() { this.tokenizer = await new Tokenizer().loadGrammar(); - this.documentsCollection = new DocumentsCollection(); this.registerProviders(); this.registerLiveDocumentsEvents(); @@ -59,13 +61,48 @@ export default class ServerManger { public async up() { WorkspaceProvider.register(this); - if (this.capabilitiesHandler.supportsWorkspaceConfiguration) { - ConfigurationProvider.register(this, () => { + if (this.capabilitiesHandler.getSupportsWorkspaceConfiguration()) { + await ConfigurationProvider.register(this, () => { this.loadConfig(); }); } await this.loadConfig(); + + const diagnosticsProvider = DiagnosticsProvider.register(this) as DiagnosticsProvider; + const numCPUs = cpus().length; + const cluster = clustering.default; + if (cluster.isPrimary) { + cluster.setupPrimary({ + exec: join(__dirname, "indexer.js"), + }); + } + + let filesIndexedCount = 0; + const filesPath = this.workspaceFilesSystem.getAllFilesPath(); + const progressReporter = await this.connection.window.createWorkDoneProgress(); + const filesCount = filesPath.length; + + progressReporter.begin("Indexing files for NWScript: EE LSP ...", 0); + const partCount = filesCount / numCPUs; + for (let i = 0; i < Math.min(numCPUs, filesCount); i++) { + const worker = cluster.fork(); + worker.send(filesPath.slice(i * partCount, Math.min((i + 1) * partCount, filesCount - 1)).join(",")); + worker.on("message", (message: string) => { + const { filePath, globalScope } = JSON.parse(message); + this.documentsCollection?.createDocument(filePath, globalScope); + filesIndexedCount++; + progressReporter?.report(filesIndexedCount / filesCount); + }); + } + + cluster.on("exit", () => { + if (Object.keys(cluster.workers || {}).length === 0) { + progressReporter?.done(); + this.hasIndexedDocuments = true; + diagnosticsProvider?.processDocumentsWaitingForPublish(); + } + }); } public down() {} @@ -77,8 +114,6 @@ export default class ServerManger { SignatureHelpProvider.register(this); DocumentFormatingProvider.register(this); DocumentRangeFormattingProvider.register(this); - - this.diagnosticsProvider = DiagnosticsProvider.register(this) as DiagnosticsProvider; } private registerLiveDocumentsEvents() { diff --git a/server/src/Tokenizer/Tokenizer.ts b/server/src/Tokenizer/Tokenizer.ts index aff0637..85e6dfa 100644 --- a/server/src/Tokenizer/Tokenizer.ts +++ b/server/src/Tokenizer/Tokenizer.ts @@ -1,8 +1,10 @@ +import { join } from "path"; +import { readFileSync } from "fs"; + import type { IGrammar } from "vscode-textmate"; import type { Position } from "vscode-languageserver-textdocument"; import { Registry, INITIAL, parseRawGrammar, IToken } from "vscode-textmate"; import { CompletionItemKind } from "vscode-languageserver"; -import { join } from "path"; import type { ComplexToken, @@ -11,7 +13,6 @@ import type { StructComplexToken, VariableComplexToken, } from "./types"; -import { WorkspaceFilesSystem } from "../WorkspaceFilesSystem"; import { LanguageTypes, LanguageScopes } from "./constants"; import onigLib from "../onigLib"; @@ -39,22 +40,24 @@ export default class Tokenizer { constructor(localPath = false) { this.registry = new Registry({ onigLib, - loadGrammar: (scopeName) => { - return new Promise((resolve, reject) => { + loadGrammar: async (scopeName) => { + return await new Promise((resolve, reject) => { if (scopeName === "source.nss") { - return WorkspaceFilesSystem.readFileAsync( - join(__dirname, "..", "..", localPath ? ".." : "", "syntaxes", "nwscript-ee.tmLanguage") - ).then((data) => resolve(parseRawGrammar((data as Buffer).toString()))); + const grammar = readFileSync( + join(__dirname, "..", "..", localPath ? ".." : "", "syntaxes", "nwscript-ee.tmLanguage"), + ); + + return resolve(parseRawGrammar(grammar.toString())); } - reject(`Unknown scope name: ${scopeName}`); + reject(new Error(`Unknown scope name: ${scopeName}`)); }); }, }); } private getTokenIndexAtPosition(tokensArray: IToken[], position: Position) { - return tokensArray.findIndex((token) => token.startIndex <= position.character && token.endIndex >= position.character)!; + return tokensArray.findIndex((token) => token.startIndex <= position.character && token.endIndex >= position.character); } private getTokenAtPosition(tokensArray: IToken[], position: Position) { @@ -107,7 +110,7 @@ export default class Tokenizer { private getInlineFunctionParams(line: string, lineIndex: number, tokensArray: IToken[]) { const functionParamTokens = tokensArray.filter( (token) => - token.scopes.includes(LanguageScopes.functionParameter) || token.scopes.includes(LanguageScopes.variableIdentifer) + token.scopes.includes(LanguageScopes.functionParameter) || token.scopes.includes(LanguageScopes.variableIdentifer), ); return functionParamTokens.map((token) => { @@ -146,7 +149,7 @@ export default class Tokenizer { tokensLines[errorSafeIndex] ?.at(0) ?.scopes.find( - (scope) => scope === LanguageScopes.commentStatement || scope === LanguageScopes.documentationCommentStatement + (scope) => scope === LanguageScopes.commentStatement || scope === LanguageScopes.documentationCommentStatement, ) ) { comments.unshift(lines[errorSafeIndex]); @@ -224,11 +227,9 @@ export default class Tokenizer { } // CHILD - { - if (token.scopes.includes(LanguageScopes.includeDeclaration)) { - scope.children.push(this.getRawTokenContent(line, tokensArray.at(-2)!)); - break; - } + if (token.scopes.includes(LanguageScopes.includeDeclaration)) { + scope.children.push(this.getRawTokenContent(line, tokensArray.at(-2)!)); + break; } // CONSTANT @@ -416,13 +417,13 @@ export default class Tokenizer { content: string, scope: TokenizedScope.global, startIndex?: number, - stopIndex?: number + stopIndex?: number, ): GlobalScopeTokenizationResult; public tokenizeContent( content: string, scope: TokenizedScope.local, startIndex?: number, - stopIndex?: number + stopIndex?: number, ): LocalScopeTokenizationResult; public tokenizeContent(content: string, scope: TokenizedScope, startIndex: number = 0, stopIndex: number = -1) { if (scope === TokenizedScope.global) { @@ -461,7 +462,7 @@ export default class Tokenizer { line: string, tokensArray: IToken[], position: Position, - languageScopes: LanguageScopes[] + languageScopes: LanguageScopes[], ) { let identifier: string | undefined; const tokenIndex = this.getTokenIndexAtPosition(tokensArray, position); @@ -480,7 +481,7 @@ export default class Tokenizer { tokensArray: IToken[], position: Position, occurencesTarget: LanguageScopes, - delimiter: LanguageScopes + delimiter: LanguageScopes, ) { let occurences = 0; @@ -497,18 +498,23 @@ export default class Tokenizer { } public findLineIdentiferFromPositionAt(content: string, position: Position, index: number) { - let ruleStack = INITIAL; + const ruleStack = INITIAL; const lines = content.split(/\r?\n/); const line = lines[position.line]; const tokensArray = this.grammar?.tokenizeLine(line, ruleStack)?.tokens; - const arrayLength = tokensArray?.length || 0; + if (!tokensArray) { + return undefined; + } + + const arrayLength = tokensArray?.length || 0; if ((index > 0 && Math.abs(index) >= arrayLength) || (index < 0 && Math.abs(index) > arrayLength)) { return undefined; } - return this.getRawTokenContent(line, tokensArray?.at(index)!); + const token = tokensArray.at(index); + return token ? this.getRawTokenContent(line, token) : undefined; } public findFirstIdentiferForLanguageScope(line: string, languageScope: LanguageScopes) { @@ -524,10 +530,10 @@ export default class Tokenizer { } public findActionTargetAtPosition(content: string, position: Position) { - let ruleStack = INITIAL; + const ruleStack = INITIAL; - let tokenType = undefined; - let structVariableIdentifier = undefined; + let tokenType; + let structVariableIdentifier; const lines = content.split(/\r?\n/); const line = lines[position.line]; const tokensArray = this.grammar?.tokenizeLine(line, ruleStack)?.tokens; diff --git a/server/src/Utils/Dictionnary.ts b/server/src/Utils/Dictionnary.ts index d80731c..f5f1797 100644 --- a/server/src/Utils/Dictionnary.ts +++ b/server/src/Utils/Dictionnary.ts @@ -15,7 +15,7 @@ export default class Dictionnary { this._dict[key] = value; } - public get(key: K) { + public get(key: K): V | undefined { return this._dict[key]; } diff --git a/server/src/WorkspaceFilesSystem/WorkspaceFilesSystem.ts b/server/src/WorkspaceFilesSystem/WorkspaceFilesSystem.ts index e1a8ce5..ead441f 100644 --- a/server/src/WorkspaceFilesSystem/WorkspaceFilesSystem.ts +++ b/server/src/WorkspaceFilesSystem/WorkspaceFilesSystem.ts @@ -1,8 +1,6 @@ -import { WorkspaceFolder } from "vscode-languageserver"; -import { readFileSync, readFile, existsSync } from "fs"; -import { fileURLToPath, pathToFileURL } from "url"; -import { basename, join, normalize } from "path"; +import { join, normalize } from "path"; import { GlobSync } from "glob"; +import { WorkspaceFolder } from "vscode-languageserver"; export const FILES_EXTENSION = "nss"; @@ -21,37 +19,7 @@ export default class WorkspaceFilesSystem { return new GlobSync(glob).found.map((filename) => this.normalizedAbsolutePath(filename)); } - public getExecutablePath(executable: string) { - return normalize(executable); - } - public getWorkspaceRootPath() { return this.rootPath; } - - public static fileUriToPath(uri: string) { - return fileURLToPath(uri); - } - - public static filePathToUri(path: string) { - return pathToFileURL(path); - } - - public static existsSync(path: string) { - return existsSync(path); - } - - public static readFileSync(filePath: string) { - return readFileSync(filePath); - } - - public static async readFileAsync(filePath: string): Promise { - return new Promise((resolve, reject) => { - readFile(filePath, (error, data) => (error ? reject(error) : resolve(data))); - }); - } - - public static getFileBasename(filePath: string) { - return basename(filePath, FILES_EXTENSION).slice(0, -1); - } } diff --git a/server/src/onigLib.ts b/server/src/onigLib.ts index 59664e4..86d6d26 100644 --- a/server/src/onigLib.ts +++ b/server/src/onigLib.ts @@ -1,8 +1,8 @@ +import { readFileSync } from "fs"; import { join } from "path"; import { loadWASM, OnigScanner, OnigString } from "vscode-oniguruma"; -import { WorkspaceFilesSystem } from "./WorkspaceFilesSystem"; -const wasmBin = WorkspaceFilesSystem.readFileSync(join(__dirname, "..", "resources", "onig.wasm")).buffer; +const wasmBin = readFileSync(join(__dirname, "..", "resources", "onig.wasm")).buffer; export default loadWASM(wasmBin).then(() => { return { diff --git a/server/src/server.ts b/server/src/server.ts index a31aa9e..77da547 100644 --- a/server/src/server.ts +++ b/server/src/server.ts @@ -1,58 +1,17 @@ -import { createConnection, ProposedFeatures, InitializeParams, WorkDoneProgressServerReporter } from "vscode-languageserver/node"; -import { join } from "path"; -import { cpus } from "os"; -import * as clustering from "cluster"; +import { createConnection, ProposedFeatures, InitializeParams } from "vscode-languageserver/node"; import { ServerManager } from "./ServerManager"; const connection = createConnection(ProposedFeatures.all); -const numCPUs = cpus().length; -const cluster = clustering.default; -if (cluster.isPrimary) { - cluster.setupPrimary({ - exec: join(__dirname, "indexer.js"), - }); -} - let server: ServerManager; -let progressReporter: WorkDoneProgressServerReporter; -let filesCount: number; -let filesIndexedCount = 0; connection.onInitialize(async (params: InitializeParams) => { server = new ServerManager(connection, params); - await server.initialize(); - - return server.getCapabilities(); + return (await server.initialize()).getCapabilities(); }); -connection.onInitialized(async () => { - await server.up(); - - const filesPath = server.workspaceFilesSystem.getAllFilesPath(); - filesCount = filesPath.length; - - progressReporter = await server.connection.window.createWorkDoneProgress(); - progressReporter.begin("Indexing files for NWScript: EE LSP ...", 0); - const partCount = filesCount / numCPUs; - for (let i = 0; i < Math.min(numCPUs, filesCount); i++) { - const worker = cluster.fork(); - worker.send(filesPath.slice(i * partCount, Math.min((i + 1) * partCount, filesCount - 1)).join(",")); - worker.on("message", (message: string) => { - const { filePath, globalScope } = JSON.parse(message); - server.documentsCollection?.createDocument(filePath, globalScope); - filesIndexedCount++; - progressReporter?.report(filesIndexedCount / filesCount!); - }); - } - - cluster.on("exit", async () => { - if (Object.keys(cluster.workers || {}).length === 0) { - progressReporter?.done(); - server.hasIndexedDocuments = true; - await server.diagnosticsProvider?.processDocumentsWaitingForPublish(); - } - }); +connection.onInitialized(() => { + server.up(); }); connection.onShutdown(() => server.down()); diff --git a/server/test/tokenization_test.ts b/server/test/tokenization_test.ts index 8c4f437..a7904eb 100644 --- a/server/test/tokenization_test.ts +++ b/server/test/tokenization_test.ts @@ -20,10 +20,10 @@ describe("Tokenization", () => { tokenizer = await new Tokenizer(true).loadGrammar(); staticCode = readFileSync(normalize(join(__dirname, "./static/test.nss"))).toString(); staticGlobalTokens = JSON.parse( - readFileSync(normalize(join(__dirname, "./static/globalScopeTokens.json"))).toString() + readFileSync(normalize(join(__dirname, "./static/globalScopeTokens.json"))).toString(), ) as GlobalScopeTokenizationResult; staticLocalTokens = JSON.parse( - readFileSync(normalize(join(__dirname, "./static/localScopeTokens.json"))).toString() + readFileSync(normalize(join(__dirname, "./static/localScopeTokens.json"))).toString(), ) as LocalScopeTokenizationResult; }); diff --git a/server/tsconfig.eslint.json b/server/tsconfig.eslint.json new file mode 100644 index 0000000..7535b76 --- /dev/null +++ b/server/tsconfig.eslint.json @@ -0,0 +1,17 @@ + +{ + "compilerOptions": { + "module": "commonjs", + "target": "ES2020", + "lib": ["ES2020"], + "types": ["@types/node"], + "noEmit": true, + "strict": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true + }, + "include": [ + "scripts", + "test" + ] +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 24dea0e..db50d59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,30 +7,35 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@eslint/eslintrc@^1.2.3": - version "1.2.3" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.3.tgz" - integrity sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.3.2" - globals "^13.9.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.9.2": - version "0.9.5" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz" - integrity sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw== +"@humanwhocodes/config-array@^0.10.4": + version "0.10.4" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.10.4.tgz#01e7366e57d2ad104feea63e72248f22015c520c" + integrity sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw== dependencies: "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" minimatch "^3.0.4" +"@humanwhocodes/gitignore-to-minimatch@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz#316b0a63b91c10e53f242efb4ace5c3b34e8728d" + integrity sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA== + "@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" @@ -128,6 +133,11 @@ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/node@*": version "18.7.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-18.7.2.tgz#22306626110c459aedd2cdf131c749ec781e3b34" @@ -138,21 +148,31 @@ resolved "https://registry.npmjs.org/@types/node/-/node-14.18.16.tgz" integrity sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q== -"@typescript-eslint/eslint-plugin@^5.21.0": - version "5.22.0" - resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.22.0.tgz" - integrity sha512-YCiy5PUzpAeOPGQ7VSGDEY2NeYUV1B0swde2e0HzokRsHBYjSdF6DZ51OuRZxVPHx0032lXGLvOMls91D8FXlg== +"@typescript-eslint/eslint-plugin@^5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.0.tgz#059798888720ec52ffa96c5f868e31a8f70fa3ec" + integrity sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg== dependencies: - "@typescript-eslint/scope-manager" "5.22.0" - "@typescript-eslint/type-utils" "5.22.0" - "@typescript-eslint/utils" "5.22.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.33.0" + "@typescript-eslint/type-utils" "5.33.0" + "@typescript-eslint/utils" "5.33.0" + debug "^4.3.4" functional-red-black-tree "^1.0.1" - ignore "^5.1.8" + ignore "^5.2.0" regexpp "^3.2.0" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" +"@typescript-eslint/parser@^5.0.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.33.0.tgz#26ec3235b74f0667414613727cb98f9b69dc5383" + integrity sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w== + dependencies: + "@typescript-eslint/scope-manager" "5.33.0" + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/typescript-estree" "5.33.0" + debug "^4.3.4" + "@typescript-eslint/parser@^5.21.0": version "5.22.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.22.0.tgz" @@ -171,13 +191,21 @@ "@typescript-eslint/types" "5.22.0" "@typescript-eslint/visitor-keys" "5.22.0" -"@typescript-eslint/type-utils@5.22.0": - version "5.22.0" - resolved "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.22.0.tgz" - integrity sha512-iqfLZIsZhK2OEJ4cQ01xOq3NaCuG5FQRKyHicA3xhZxMgaxQazLUHbH/B2k9y5i7l3+o+B5ND9Mf1AWETeMISA== +"@typescript-eslint/scope-manager@5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.33.0.tgz#509d7fa540a2c58f66bdcfcf278a3fa79002e18d" + integrity sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw== dependencies: - "@typescript-eslint/utils" "5.22.0" - debug "^4.3.2" + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/visitor-keys" "5.33.0" + +"@typescript-eslint/type-utils@5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.33.0.tgz#92ad1fba973c078d23767ce2d8d5a601baaa9338" + integrity sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA== + dependencies: + "@typescript-eslint/utils" "5.33.0" + debug "^4.3.4" tsutils "^3.21.0" "@typescript-eslint/types@5.22.0": @@ -185,6 +213,11 @@ resolved "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.22.0.tgz" integrity sha512-T7owcXW4l0v7NTijmjGWwWf/1JqdlWiBzPqzAWhobxft0SiEvMJB56QXmeCQjrPuM8zEfGUKyPQr/L8+cFUBLw== +"@typescript-eslint/types@5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.33.0.tgz#d41c584831805554b063791338b0220b613a275b" + integrity sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw== + "@typescript-eslint/typescript-estree@5.22.0": version "5.22.0" resolved "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.22.0.tgz" @@ -198,15 +231,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.22.0": - version "5.22.0" - resolved "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.22.0.tgz" - integrity sha512-HodsGb037iobrWSUMS7QH6Hl1kppikjA1ELiJlNSTYf/UdMEwzgj0WIp+lBNb6WZ3zTwb0tEz51j0Wee3iJ3wQ== +"@typescript-eslint/typescript-estree@5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.0.tgz#02d9c9ade6f4897c09e3508c27de53ad6bfa54cf" + integrity sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ== + dependencies: + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/visitor-keys" "5.33.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.33.0.tgz#46797461ce3146e21c095d79518cc0f8ec574038" + integrity sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.22.0" - "@typescript-eslint/types" "5.22.0" - "@typescript-eslint/typescript-estree" "5.22.0" + "@typescript-eslint/scope-manager" "5.33.0" + "@typescript-eslint/types" "5.33.0" + "@typescript-eslint/typescript-estree" "5.33.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -218,6 +264,14 @@ "@typescript-eslint/types" "5.22.0" eslint-visitor-keys "^3.0.0" +"@typescript-eslint/visitor-keys@5.33.0": + version "5.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.0.tgz#fbcbb074e460c11046e067bc3384b5d66b555484" + integrity sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw== + dependencies: + "@typescript-eslint/types" "5.33.0" + eslint-visitor-keys "^3.3.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -376,7 +430,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn@^8.5.0: +acorn@^8.5.0, acorn@^8.8.0: version "8.8.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== @@ -418,11 +472,32 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-includes@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" @@ -458,6 +533,21 @@ buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== +builtins@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" @@ -531,7 +621,21 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -debug@^4.1.1, debug@^4.3.2: +debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -543,6 +647,14 @@ deep-is@^0.1.3: resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +define-properties@^1.1.3, define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -550,6 +662,13 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz" @@ -575,11 +694,56 @@ envinfo@^7.7.3: resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -590,6 +754,92 @@ escape-string-regexp@^4.0.0: resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== +eslint-config-prettier@^8.5.0: + version "8.5.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" + integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== + +eslint-config-standard-with-typescript@^22.0.0: + version "22.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-22.0.0.tgz#5b91941797da779e17fcb3ba418e3a3ab31fdb2f" + integrity sha512-VA36U7UlFpwULvkdnh6MQj5GAV2Q+tT68ALLAwJP0ZuNXU2m0wX07uxX4qyLRdHgSzH4QJ73CveKBuSOYvh7vQ== + dependencies: + "@typescript-eslint/parser" "^5.0.0" + eslint-config-standard "17.0.0" + +eslint-config-standard@17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.0.0.tgz#fd5b6cf1dcf6ba8d29f200c461de2e19069888cf" + integrity sha512-/2ks1GKyqSOkH7JFvXJicu0iMpoojkwB+f5Du/1SC0PtBL+s8v30k9njRZ21pm2drKYm2342jFnGWzttxPmZVg== + +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + +eslint-module-utils@^2.7.3: + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== + dependencies: + debug "^3.2.7" + +eslint-plugin-es@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz#f0822f0c18a535a97c3e714e89f88586a7641ec9" + integrity sha512-GILhQTnjYE2WorX5Jyi5i4dz5ALWxBIdQECVQavL6s7cI76IZTDWleTHkxz/QT3kvcs2QlGHvKLYsSlPOlPXnQ== + dependencies: + eslint-utils "^2.0.0" + regexpp "^3.0.0" + +eslint-plugin-import@^2.25.2: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + +eslint-plugin-n@^15.0.0: + version "15.2.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-n/-/eslint-plugin-n-15.2.4.tgz#d62021a0821ae650701ed459756aaf478a9b6056" + integrity sha512-tjnVMv2fiXYMnuiIFI8QMtyUFI42SckEEWvi8h68SWGWshfqO6SSCASy24dGMGAiy7NUk6DZt90DM0iNUsmQ5w== + dependencies: + builtins "^5.0.1" + eslint-plugin-es "^4.1.0" + eslint-utils "^3.0.0" + ignore "^5.1.1" + is-core-module "^2.9.0" + minimatch "^3.1.2" + resolve "^1.10.1" + semver "^7.3.7" + +eslint-plugin-prettier@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" + integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-plugin-promise@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-6.0.0.tgz#017652c07c9816413a41e11c30adc42c3d55ff18" + integrity sha512-7GPezalm5Bfi/E22PnQxDWH2iW9GTvAlUNTztemeHb6c1BniSyoeTrM87JkC0wYdi6aQrZX9p2qEiAno8aTcbw== + eslint-scope@5.1.1, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" @@ -606,6 +856,13 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-utils@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" @@ -613,6 +870,11 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" +eslint-visitor-keys@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" @@ -623,13 +885,14 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.14.0: - version "8.15.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.15.0.tgz" - integrity sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA== +eslint@^8.0.1: + version "8.22.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.22.0.tgz#78fcb044196dfa7eef30a9d65944f6f980402c48" + integrity sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA== dependencies: - "@eslint/eslintrc" "^1.2.3" - "@humanwhocodes/config-array" "^0.9.2" + "@eslint/eslintrc" "^1.3.0" + "@humanwhocodes/config-array" "^0.10.4" + "@humanwhocodes/gitignore-to-minimatch" "^1.0.2" ajv "^6.10.0" chalk "^4.0.0" cross-spawn "^7.0.2" @@ -639,14 +902,17 @@ eslint@^8.14.0: eslint-scope "^7.1.1" eslint-utils "^3.0.0" eslint-visitor-keys "^3.3.0" - espree "^9.3.2" + espree "^9.3.3" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" + find-up "^5.0.0" functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" - globals "^13.6.0" + globals "^13.15.0" + globby "^11.1.0" + grapheme-splitter "^1.0.4" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -673,6 +939,15 @@ espree@^9.3.2: acorn-jsx "^5.3.2" eslint-visitor-keys "^3.3.0" +espree@^9.3.3: + version "9.3.3" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.3.tgz#2dd37c4162bb05f433ad3c1a52ddf8a49dc08e9d" + integrity sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng== + dependencies: + acorn "^8.8.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.3.0" + esquery@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" @@ -712,6 +987,11 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz" @@ -767,6 +1047,14 @@ find-up@^4.0.0: locate-path "^5.0.0" path-exists "^4.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" @@ -790,11 +1078,43 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.2.tgz#336975123e05ad0b7ba41f152ee4aadbea6cf598" + integrity sha512-Jfm3OyCxHh9DJyc28qGk+JmfkpO41A4XkneDSujN9MDXrm4oDKdHvndhZ2dN94+ERNfkYJWDclW6k2L/ZGHjXA== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.3" + +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" @@ -826,14 +1146,14 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^13.6.0, globals@^13.9.0: - version "13.13.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz" - integrity sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A== +globals@^13.15.0: + version "13.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== dependencies: type-fest "^0.20.2" -globby@^11.0.4: +globby@^11.0.4, globby@^11.1.0: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -850,11 +1170,40 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== +grapheme-splitter@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" + integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== + +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" @@ -862,7 +1211,7 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -ignore@^5.1.8, ignore@^5.2.0: +ignore@^5.1.1, ignore@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== @@ -901,18 +1250,54 @@ inherits@2: resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9" integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== -is-core-module@^2.9.0: +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-callable@^1.1.4, is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.10.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" @@ -925,6 +1310,18 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: dependencies: is-extglob "^2.1.1" +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" @@ -942,6 +1339,42 @@ is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" @@ -983,6 +1416,13 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= +json5@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" + integrity sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== + dependencies: + minimist "^1.2.0" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" @@ -1008,6 +1448,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" @@ -1064,11 +1511,26 @@ minimatch@^3.0.4, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== + ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" @@ -1084,6 +1546,35 @@ node-releases@^2.0.6: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== +object-inspect@^1.12.0, object-inspect@^1.9.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@^4.1.2: + version "4.1.3" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.3.tgz#d36b7700ddf0019abb6b1df1bb13f6445f79051f" + integrity sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + once@^1.3.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" @@ -1110,6 +1601,13 @@ p-limit@^2.2.0: dependencies: p-try "^2.0.0" +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -1117,6 +1615,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -1176,10 +1681,17 @@ prelude-ls@^1.2.1: resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^2.6.2: - version "2.6.2" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz" - integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@^2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== punycode@^2.1.0: version "2.1.1" @@ -1205,7 +1717,16 @@ rechoir@^0.7.0: dependencies: resolve "^1.9.0" -regexpp@^3.2.0: +regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + +regexpp@^3.0.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -1227,7 +1748,7 @@ resolve-from@^5.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== -resolve@^1.9.0: +resolve@^1.10.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -1269,7 +1790,7 @@ schema-utils@^3.1.0, schema-utils@^3.1.1: ajv "^6.12.5" ajv-keywords "^3.5.2" -semver@^7.3.4, semver@^7.3.5: +semver@^7.0.0, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -1302,6 +1823,15 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + slash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" @@ -1320,6 +1850,24 @@ source-map@^0.6.0: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -1327,6 +1875,11 @@ strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== + strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" @@ -1399,6 +1952,16 @@ ts-loader@^9.3.1: micromatch "^4.0.0" semver "^7.3.4" +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + tslib@^1.8.1: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" @@ -1423,10 +1986,20 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typescript@^4.6.4: - version "4.6.4" - resolved "https://registry.npmjs.org/typescript/-/typescript-4.6.4.tgz" - integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg== +typescript@*: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" update-browserslist-db@^1.0.5: version "1.0.5" @@ -1517,6 +2090,17 @@ webpack@^5.74.0: watchpack "^2.4.0" webpack-sources "^3.2.3" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + which@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" @@ -1543,3 +2127,8 @@ yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==