From 5814cfe6294c2a72b76d1b6b536fa35694048553 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Fri, 12 Aug 2022 14:39:11 -0400 Subject: [PATCH 01/14] Read language-server coordinates from smithy-build.json Try reading the coordinates for the language-server from the smithy-build.json, if failed or not found, then it fallback to the previous implementation. --- src/extension.ts | 102 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 69 insertions(+), 33 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 9a85d89..14f841a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -14,6 +14,23 @@ import { TextDocumentIdentifier, } from "vscode-languageclient"; import { getCoursierExecutable } from "./coursier/coursier"; +import { TextDecoder } from "util"; + +type Organization = string; +type Artifact = string; +type Version = string; +type MavenCoordinate = `${Organization}:${Artifact}:${Version}`; + +interface SmithyBuild { + imports?: Array; + mavenRepositories?: Array; //deprecated + mavenDependencies?: Array; //deprecated + maven?: { + dependencies?: Array; + repositories?: Array<{ url: string }>; + }; + languageServer?: MavenCoordinate; +} let client: LanguageClient; @@ -41,40 +58,39 @@ export function activate(context: ExtensionContext) { .getConfiguration("smithyLsp") .get("lspCoordinates", "`"); - return getCoursierExecutable(context.globalStoragePath).then( - (csBinaryPath) => { - console.info(`Resolved coursier's binary at ${csBinaryPath}`); - - const startServer = { - command: csBinaryPath, - args: [ - "launch", - `${lspCoordinates}:${version}`, - "--ttl", - "1h", - "--", - "0", - ], - }; - - client = new LanguageClient( - "smithyLsp", - "Smithy LSP", - startServer, - clientOptions - ); + return Promise.all([ + getCoursierExecutable(context.globalStoragePath), + parseSmithyBuild(), + ]).then(([csBinaryPath, smithyBuild]) => { + console.info(`Resolved coursier's binary at ${csBinaryPath}`); - const smithyContentProvider = createSmithyContentProvider(client); - context.subscriptions.push( - workspace.registerTextDocumentContentProvider( - "smithyjar", - smithyContentProvider - ), - // Start the client. This will also launch the server - client.start() - ); - } - ); + const projectLanguageServerArtifact = smithyBuild?.languageServer; + const finalLanguageServerArtifact = projectLanguageServerArtifact + ? projectLanguageServerArtifact + : `${lspCoordinates}:${version}`; + + const startServer = { + command: csBinaryPath, + args: ["launch", finalLanguageServerArtifact, "--ttl", "1h", "--", "0"], + }; + + client = new LanguageClient( + "smithyLsp", + "Smithy LSP", + startServer, + clientOptions + ); + + const smithyContentProvider = createSmithyContentProvider(client); + context.subscriptions.push( + workspace.registerTextDocumentContentProvider( + "smithyjar", + smithyContentProvider + ), + // Start the client. This will also launch the server + client.start() + ); + }); } export function deactivate(): Thenable | undefined { @@ -84,6 +100,26 @@ export function deactivate(): Thenable | undefined { return client.stop(); } +function parseSmithyBuild(): Thenable { + const folders = vscode.workspace.workspaceFolders; + if (folders.length != 1) { + return Promise.resolve(null); + } else { + const root = folders[0].uri; + const smithyBuildPath = vscode.Uri.parse(`${root}/smithy-build.json`); + return vscode.workspace.fs + .readFile(smithyBuildPath) + .then((uint8array) => new TextDecoder().decode(uint8array)) + .then( + (content) => JSON.parse(content) as SmithyBuild, + (err) => { + console.warn(`Unable to read ${smithyBuildPath}.`, err); + return null; + } + ); + } +} + function createSmithyContentProvider( languageClient: LanguageClient ): vscode.TextDocumentContentProvider { From cc81abe7d25d8b3f7b4009887cf36a28f3f5fdba Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 14:38:54 -0400 Subject: [PATCH 02/14] Drop .gitpod file --- .gitpod.yml | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .gitpod.yml diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 0c55694..0000000 --- a/.gitpod.yml +++ /dev/null @@ -1,7 +0,0 @@ -# This configuration file was automatically generated by Gitpod. -# Please adjust to your needs (see https://www.gitpod.io/docs/config-gitpod-file) -# and commit this file to your remote git repository to share the goodness with others. - -tasks: - - init: yarn install && yarn run build - command: yarn run watch From 6378188a3578a28685105456a18ae11242c32902 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 14:41:45 -0400 Subject: [PATCH 03/14] Cleanup extension bundle --- .vscodeignore | 19 +++++++++++++++---- package.json | 2 +- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.vscodeignore b/.vscodeignore index 1628877..8c1d1a8 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -1,5 +1,16 @@ -.vscode/** +.github +.gitignore .vscode-test/** -out/test/** -out/**/*.map -src/** \ No newline at end of file +.vscode/** +.yarnrc +**/.eslintrc.json +**/*.map +**/*.ts +**/tsconfig.json +jest.config.js +jest.e2e.config.js +node_modules/** +out/it/** +out/tests/** +src/** +yarn.lock diff --git a/package.json b/package.json index 980f466..e7be603 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "activationEvents": [ "onLanguage:smithy" ], - "main": "./out/extension", + "main": "./out/src/extension", "contributes": { "configuration": { "type": "object", From b94f978ca9527ebfbacd06dca74c4374b84efcec Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 15:27:27 -0400 Subject: [PATCH 04/14] Drop mocha dependencies --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index e7be603..57ad532 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,6 @@ "@typescript-eslint/parser": "^2.3.0", "eslint": "^8.10.0", "jest": "^27.5.1", - "mocha": "^9.2.1", "prettier": "^2.5.1", "ts-jest": "^27.1.3", "typescript": "^4.6.2", From e0144bc5bdf73e81c9f986e020169ff8b523b658 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 14:18:00 -0400 Subject: [PATCH 05/14] Integration tests --- .gitignore | 1 + it/runTest.ts | 23 ++++++++++++++++++++++ it/suite/extension.test.ts | 8 ++++++++ it/suite/index.ts | 40 ++++++++++++++++++++++++++++++++++++++ it/vscode-environment.js | 21 ++++++++++++++++++++ it/vscode.js | 2 ++ jest.config.js | 1 + jest.e2e.config.js | 11 +++++++++++ package.json | 10 ++++++---- tsconfig.json | 4 ++-- yarn.lock | 28 +++++++++++++------------- 11 files changed, 129 insertions(+), 20 deletions(-) create mode 100644 it/runTest.ts create mode 100644 it/suite/extension.test.ts create mode 100644 it/suite/index.ts create mode 100644 it/vscode-environment.js create mode 100644 it/vscode.js create mode 100644 jest.e2e.config.js diff --git a/.gitignore b/.gitignore index b724b71..3861161 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules node_modules *.vsix out/ +.vscode-test diff --git a/it/runTest.ts b/it/runTest.ts new file mode 100644 index 0000000..e810ed5 --- /dev/null +++ b/it/runTest.ts @@ -0,0 +1,23 @@ +import * as path from "path"; + +import { runTests } from "@vscode/test-electron"; + +async function main() { + try { + // The folder containing the Extension Manifest package.json + // Passed to `--extensionDevelopmentPath` + const extensionDevelopmentPath = path.resolve(__dirname, "../../"); + + // The path to test runner + // Passed to --extensionTestsPath + const extensionTestsPath = path.resolve(__dirname, "./suite/index"); + + // Download VS Code, unzip it and run the integration test + await runTests({ extensionDevelopmentPath, extensionTestsPath }); + } catch (err) { + console.error("Failed to run tests"); + process.exit(1); + } +} + +main(); diff --git a/it/suite/extension.test.ts b/it/suite/extension.test.ts new file mode 100644 index 0000000..3bc683b --- /dev/null +++ b/it/suite/extension.test.ts @@ -0,0 +1,8 @@ +import * as vscode from "vscode"; + +test("Sample test", () => { + vscode.window.showInformationMessage("Start all tests."); + + expect([1, 2, 3].indexOf(5)).toEqual(-1); + expect([1, 2, 3].indexOf(0)).toEqual(-1); +}); diff --git a/it/suite/index.ts b/it/suite/index.ts new file mode 100644 index 0000000..a88d1cb --- /dev/null +++ b/it/suite/index.ts @@ -0,0 +1,40 @@ +import { runCLI } from "jest"; + +interface ITestRunner { + run(testsRoot: string, clb: (error?: Error, failures?: number) => void): void; +} +const path = require("path"); + +const jestTestRunnerForVSCodeE2E: ITestRunner = { + run( + testsRoot: string, + reportTestResults: (error?: Error, failures?: number) => void + ): void { + const projectRootPath = process.cwd(); + const config = path.join(projectRootPath, "jest.e2e.config.js"); + + runCLI({ config } as any, [projectRootPath]) + .then((jestCliCallResult) => { + jestCliCallResult.results.testResults.forEach((testResult) => { + testResult.testResults + .filter((assertionResult) => assertionResult.status === "passed") + .forEach(({ ancestorTitles, title, status }) => { + console.info(` ● ${ancestorTitles} > ${title} (${status})`); + }); + }); + + jestCliCallResult.results.testResults.forEach((testResult) => { + if (testResult.failureMessage) { + console.error(testResult.failureMessage); + } + }); + + reportTestResults(undefined, jestCliCallResult.results.numFailedTests); + }) + .catch((errorCaughtByJestRunner) => { + reportTestResults(errorCaughtByJestRunner, 0); + }); + }, +}; + +module.exports = jestTestRunnerForVSCodeE2E; diff --git a/it/vscode-environment.js b/it/vscode-environment.js new file mode 100644 index 0000000..2697d2d --- /dev/null +++ b/it/vscode-environment.js @@ -0,0 +1,21 @@ +// see https://github.com/microsoft/vscode-test/issues/37#issuecomment-700167820 +const NodeEnvironment = require("jest-environment-node"); +const vscode = require("vscode"); + +class VsCodeEnvironment extends NodeEnvironment { + async setup() { + await super.setup(); + this.global.vscode = vscode; + } + + async teardown() { + this.global.vscode = {}; + await super.teardown(); + } + + runScript(script) { + return super.runScript(script); + } +} + +module.exports = VsCodeEnvironment; diff --git a/it/vscode.js b/it/vscode.js new file mode 100644 index 0000000..ede3772 --- /dev/null +++ b/it/vscode.js @@ -0,0 +1,2 @@ +// see https://github.com/microsoft/vscode-test/issues/37#issuecomment-700167820 +module.exports = global.vscode; diff --git a/jest.config.js b/jest.config.js index a3e6fcb..5dce936 100644 --- a/jest.config.js +++ b/jest.config.js @@ -11,4 +11,5 @@ module.exports = { moduleNameMapper: { "^(\\.{1,2}/.*)\\.js$": "$1", }, + testMatch: ["/tests/**/*.spec.ts"], }; diff --git a/jest.e2e.config.js b/jest.e2e.config.js new file mode 100644 index 0000000..dd11a3a --- /dev/null +++ b/jest.e2e.config.js @@ -0,0 +1,11 @@ +const path = require("path"); + +module.exports = { + moduleFileExtensions: ["js"], + testMatch: ["/out/it/suite/**.test.js"], + testEnvironment: "./it/vscode-environment.js", + verbose: true, + moduleNameMapper: { + vscode: path.join(__dirname, "it", "vscode.js"), + }, +}; diff --git a/package.json b/package.json index 57ad532..f6d08df 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "watch": "tsc -watch -p ./", "clean": "rm -rf node_modules/ out/", "test": "jest", + "test:it": "yarn run compile && node ./out/it/runTest.js", "test:watch": "yarn run test --watch", "build": "vsce package --yarn", "format": "prettier --write '**/*.{ts,js,json,yml}'", @@ -87,7 +88,7 @@ "extension.vsix" ], "engines": { - "vscode": "^1.43.0" + "vscode": "^1.70.0" }, "dependencies": { "follow-redirects": "^1.14.9", @@ -97,14 +98,15 @@ "@types/follow-redirects": "^1.14.1", "@types/jest": "^27.4.0", "@types/node": "^17.0.21", - "@types/vscode": "1.43.0", + "@types/vscode": "^1.70.0", "@typescript-eslint/parser": "^2.3.0", + "@vscode/test-electron": "^2.1.5", "eslint": "^8.10.0", "jest": "^27.5.1", + "jest-environment-node": "^27.5.1", "prettier": "^2.5.1", "ts-jest": "^27.1.3", "typescript": "^4.6.2", - "vsce": "^2.10.0", - "vscode-test": "^1.6.1" + "vsce": "^2.10.0" } } diff --git a/tsconfig.json b/tsconfig.json index ef32823..a27ea15 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,9 +4,9 @@ "target": "es2019", "lib": ["ES2019"], "outDir": "out", - "rootDirs": ["src", "tests"], + "rootDirs": ["src", "tests", "it"], "sourceMap": true }, - "include": ["src"], + "include": ["src", "tests", "it"], "exclude": ["node_modules", ".vscode-test"] } diff --git a/yarn.lock b/yarn.lock index 3ff2133..4374e4e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -661,10 +661,10 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/vscode@1.43.0": - version "1.43.0" - resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.43.0.tgz#22276e60034c693b33117f1068ffaac0e89522db" - integrity sha512-kIaR9qzd80rJOxePKpCB/mdy00mz8Apt2QA5Y6rdrKFn13QNFNeP3Hzmsf37Bwh/3cS7QjtAeGSK7wSqAU0sYQ== +"@types/vscode@^1.70.0": + version "1.70.0" + resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.70.0.tgz#9cb14cdaac9f450a7005ae2db49ecee4a084c983" + integrity sha512-3/9Fz0F2eBgwciazc94Ien+9u1elnjFg9YAhvAb3qDy/WeFWD9VrOPU7CIytryOVUdbxus8uzL4VZYONA0gDtA== "@types/yargs-parser@*": version "21.0.0" @@ -716,6 +716,16 @@ resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== +"@vscode/test-electron@^2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.1.5.tgz#ac98f8f445ea4590753f5fa0c7f6e4298f08c3b7" + integrity sha512-O/ioqFpV+RvKbRykX2ItYPnbcZ4Hk5V0rY4uhQjQTLhGL9WZUvS7exzuYQCCI+ilSqJpctvxq2llTfGXf9UnnA== + dependencies: + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + rimraf "^3.0.2" + unzipper "^0.10.11" + abab@^2.0.3, abab@^2.0.5: version "2.0.6" resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" @@ -3780,16 +3790,6 @@ vscode-languageserver-types@3.15.1: resolved "https://registry.yarnpkg.com/vscode-languageserver-types/-/vscode-languageserver-types-3.15.1.tgz#17be71d78d2f6236d414f0001ce1ef4d23e6b6de" integrity sha512-+a9MPUQrNGRrGU630OGbYVQ+11iOIovjCkqxajPa9w57Sd5ruK8WQNsslzpa0x/QJqC8kRc2DUxWjIFwoNm4ZQ== -vscode-test@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/vscode-test/-/vscode-test-1.6.1.tgz#44254c67036de92b00fdd72f6ace5f1854e1a563" - integrity sha512-086q88T2ca1k95mUzffvbzb7esqQNvJgiwY4h29ukPhFo8u+vXOOmelUoU5EQUHs3Of8+JuQ3oGdbVCqaxuTXA== - dependencies: - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - rimraf "^3.0.2" - unzipper "^0.10.11" - w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" From 0c2d2553bba47da220dbcd31c5c55bbb1c013738 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 15:34:13 -0400 Subject: [PATCH 06/14] Latest: 1.70.0 rewrite package.json when testing see: https://github.com/microsoft/vscode/issues/148975 --- it/runTest.ts | 6 +- package.json | 4 +- yarn.lock | 297 ++++++-------------------------------------------- 3 files changed, 39 insertions(+), 268 deletions(-) diff --git a/it/runTest.ts b/it/runTest.ts index e810ed5..1758bc3 100644 --- a/it/runTest.ts +++ b/it/runTest.ts @@ -13,7 +13,11 @@ async function main() { const extensionTestsPath = path.resolve(__dirname, "./suite/index"); // Download VS Code, unzip it and run the integration test - await runTests({ extensionDevelopmentPath, extensionTestsPath }); + await runTests({ + version: "1.66.0", // force this version to avoid https://github.com/microsoft/vscode/issues/148975 + extensionDevelopmentPath, + extensionTestsPath, + }); } catch (err) { console.error("Failed to run tests"); process.exit(1); diff --git a/package.json b/package.json index f6d08df..4cc2481 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "extension.vsix" ], "engines": { - "vscode": "^1.70.0" + "vscode": "^1.66.0" }, "dependencies": { "follow-redirects": "^1.14.9", @@ -98,7 +98,7 @@ "@types/follow-redirects": "^1.14.1", "@types/jest": "^27.4.0", "@types/node": "^17.0.21", - "@types/vscode": "^1.70.0", + "@types/vscode": "^1.66.0", "@typescript-eslint/parser": "^2.3.0", "@vscode/test-electron": "^2.1.5", "eslint": "^8.10.0", diff --git a/yarn.lock b/yarn.lock index 4374e4e..9bedb9a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -661,7 +661,7 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/vscode@^1.70.0": +"@types/vscode@^1.66.0": version "1.70.0" resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.70.0.tgz#9cb14cdaac9f450a7005ae2db49ecee4a084c983" integrity sha512-3/9Fz0F2eBgwciazc94Ien+9u1elnjFg9YAhvAb3qDy/WeFWD9VrOPU7CIytryOVUdbxus8uzL4VZYONA0gDtA== @@ -711,11 +711,6 @@ semver "^7.3.2" tsutils "^3.17.1" -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - "@vscode/test-electron@^2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@vscode/test-electron/-/test-electron-2.1.5.tgz#ac98f8f445ea4590753f5fa0c7f6e4298f08c3b7" @@ -776,11 +771,6 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - ansi-escapes@^4.2.1: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" @@ -812,7 +802,7 @@ ansi-styles@^5.0.0: resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== -anymatch@^3.0.3, anymatch@~3.1.2: +anymatch@^3.0.3: version "3.1.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== @@ -921,11 +911,6 @@ big-integer@^1.6.17: resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - binary@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/binary/-/binary-0.3.0.tgz#9f60553bc5ce8c3386f3b553cff47462adecaa79" @@ -961,7 +946,7 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.2, braces@~3.0.2: +braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -973,11 +958,6 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - browserslist@^4.20.2: version "4.21.2" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.2.tgz#59a400757465535954946a400b841ed37e2b4ecf" @@ -1048,7 +1028,7 @@ camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -camelcase@^6.0.0, camelcase@^6.2.0: +camelcase@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== @@ -1074,7 +1054,7 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0: +chalk@^4.0.0: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -1112,21 +1092,6 @@ cheerio@^1.0.0-rc.9: parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" -chokidar@3.5.3: - version "3.5.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - chownr@^1.1.1: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -1272,18 +1237,6 @@ debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: dependencies: ms "2.1.2" -debug@4.3.3: - version "4.3.3" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" - integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== - dependencies: - ms "2.1.2" - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - decimal.js@^10.2.1: version "10.3.1" resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" @@ -1336,11 +1289,6 @@ diff-sequences@^27.5.1: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1436,11 +1384,6 @@ escalade@^3.1.1: resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== -escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" @@ -1451,6 +1394,11 @@ escape-string-regexp@^2.0.0: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz#a30304e99daa32e23b2fd20f51babd07cffca344" integrity sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w== +escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + escodegen@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" @@ -1670,14 +1618,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -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" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -1694,11 +1634,6 @@ flat-cache@^3.0.4: flatted "^3.1.0" rimraf "^3.0.2" -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - flatted@^3.1.0: version "3.2.6" resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.6.tgz#022e9218c637f9f3fc9c35ab9c9193f05add60b2" @@ -1728,7 +1663,7 @@ fs.realpath@^1.0.0: resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@^2.3.2, fsevents@~2.3.2: +fsevents@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== @@ -1794,25 +1729,6 @@ glob-parent@^6.0.1: dependencies: is-glob "^4.0.3" -glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -1842,11 +1758,6 @@ graceful-fs@^4.1.2, graceful-fs@^4.2.2, graceful-fs@^4.2.9: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -1869,11 +1780,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - hosted-git-info@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.1.0.tgz#827b82867e9ff1c8d0c4d9d53880397d2c86d224" @@ -1986,13 +1892,6 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" @@ -2015,7 +1914,7 @@ is-generator-fn@^2.0.0: resolved "https://registry.yarnpkg.com/is-generator-fn/-/is-generator-fn-2.1.0.tgz#7d140adc389aaf3011a8f2a2a4cfa6faadffb118" integrity sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ== -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== @@ -2027,11 +1926,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" @@ -2047,11 +1941,6 @@ is-typedarray@^1.0.0: resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" integrity sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA== -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - isarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" @@ -2514,13 +2403,6 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -2529,6 +2411,13 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + jsdom@^16.6.0: version "16.7.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" @@ -2645,13 +2534,6 @@ 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.memoize@4.x: version "4.1.2" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" @@ -2667,14 +2549,6 @@ lodash@^4.17.15, lodash@^4.7.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -2757,13 +2631,6 @@ mimic-response@^3.1.0: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-3.1.0.tgz#2d1d59af9c1b129815accc2c46a022a5ce1fa3c9" integrity sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== -minimatch@4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-4.2.1.tgz#40d9d511a46bdc4e563c22c3080cde9c0d8299b4" - integrity sha512-9Uq1ChtSZO+Mxa/CL1eGizn2vRn3MlLgzhT0Iz8zaY8NdvxvB0d5QdPFmCKf7JKA9Lerx5vRrnwO03jsSfGG9g== - dependencies: - brace-expansion "^1.1.7" - minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -2788,56 +2655,16 @@ mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: dependencies: minimist "^1.2.6" -mocha@^9.2.1: - version "9.2.2" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-9.2.2.tgz#d70db46bdb93ca57402c809333e5a84977a88fb9" - integrity sha512-L6XC3EdwT6YrIk0yXpavvLkn8h+EU+Y5UcCHKECyMbdUIxyMuZj4bX4U9e1nvnvUUvQVsV2VHQr5zLdcUkhW/g== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.3" - debug "4.3.3" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.2.0" - growl "1.10.5" - he "1.2.0" - js-yaml "4.1.0" - log-symbols "4.1.0" - minimatch "4.2.1" - ms "2.1.3" - nanoid "3.3.1" - serialize-javascript "6.0.0" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - workerpool "6.2.0" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -nanoid@3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" - integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== - napi-build-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" @@ -2870,7 +2697,7 @@ 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== -normalize-path@^3.0.0, normalize-path@~3.0.0: +normalize-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== @@ -2944,13 +2771,6 @@ 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" @@ -2958,13 +2778,6 @@ 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" @@ -3044,7 +2857,7 @@ picocolors@^1.0.0: resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -3141,13 +2954,6 @@ qs@^6.9.1: dependencies: side-channel "^1.0.4" -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -3192,13 +2998,6 @@ readable-stream@^3.1.1, readable-stream@^3.4.0: string_decoder "^1.1.1" util-deprecate "^1.0.1" -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" @@ -3254,7 +3053,7 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: +safe-buffer@^5.0.1, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -3298,13 +3097,6 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -serialize-javascript@6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - setimmediate@~1.0.4: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -3438,7 +3230,7 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -3448,13 +3240,6 @@ strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ== -supports-color@8.1.1, supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - supports-color@^5.3.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -3469,6 +3254,13 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-hyperlinks@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz#4f77b42488765891774b70c79babd87f9bd594bb" @@ -3842,7 +3634,7 @@ whatwg-url@^8.0.0, whatwg-url@^8.5.0: tr46 "^2.1.0" webidl-conversions "^6.1.0" -which@2.0.2, which@^2.0.1: +which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -3854,11 +3646,6 @@ word-wrap@^1.2.3, word-wrap@~1.2.3: resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== -workerpool@6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" - integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== - wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -3921,27 +3708,12 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - yargs-parser@20.x, yargs-parser@^20.2.2: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0, yargs@^16.2.0: +yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== @@ -3968,8 +3740,3 @@ yazl@^2.2.2: integrity sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw== dependencies: buffer-crc32 "~0.2.3" - -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== From 6de9b401de2522287eb09632db0715e08163620b Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 16:28:57 -0400 Subject: [PATCH 07/14] Add an integration test --- it/suite/extension.test.ts | 47 ++++++++++++++++++++++++++++++++++---- it/suite/weather.smithy | 7 ++++++ src/extension.ts | 2 +- 3 files changed, 50 insertions(+), 6 deletions(-) create mode 100644 it/suite/weather.smithy diff --git a/it/suite/extension.test.ts b/it/suite/extension.test.ts index 3bc683b..2100476 100644 --- a/it/suite/extension.test.ts +++ b/it/suite/extension.test.ts @@ -1,8 +1,45 @@ +import * as path from "path"; +import { setTimeout } from "timers/promises"; import * as vscode from "vscode"; -test("Sample test", () => { - vscode.window.showInformationMessage("Start all tests."); +import { extensionId } from "./../../src/constants"; - expect([1, 2, 3].indexOf(5)).toEqual(-1); - expect([1, 2, 3].indexOf(0)).toEqual(-1); -}); +const testTimeout = 20 * 1000; + +test( + "Sample test", + () => { + const file = path.join(process.cwd(), "it/suite/weather.smithy"); + // this activates the extension + const openSmithyFile = vscode.workspace.openTextDocument( + vscode.Uri.file(file) + ); + + return openSmithyFile + .then(() => waitActive(timeout(testTimeout))) + .then((active) => expect(active).toBeTruthy()); + }, + testTimeout + 1000 +); + +function getExt(): vscode.Extension { + return vscode.extensions.getExtension(extensionId); +} + +function timeout(ms: number): number { + return Date.now() + ms; +} + +function waitActive(expired: number): Promise { + const ext = getExt(); + const isActive = ext ? ext.isActive : false; + if (isActive) { + return Promise.resolve(true); + } else if (Date.now() > expired) { + return Promise.resolve(false); + } else { + const delayMs = 1000; + console.log(`Retrying active check in ${delayMs} ms.`); + return setTimeout(1000).then(() => waitActive(expired)); + } +} diff --git a/it/suite/weather.smithy b/it/suite/weather.smithy new file mode 100644 index 0000000..96c77f7 --- /dev/null +++ b/it/suite/weather.smithy @@ -0,0 +1,7 @@ +namespace example.weather + +/// Provides weather forecasts. +/// Triple slash comments attach documentation to shapes. +service Weather { + version: "2006-03-01" +} \ No newline at end of file diff --git a/src/extension.ts b/src/extension.ts index 14f841a..0e63bec 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -102,7 +102,7 @@ export function deactivate(): Thenable | undefined { function parseSmithyBuild(): Thenable { const folders = vscode.workspace.workspaceFolders; - if (folders.length != 1) { + if (!folders || folders.length != 1) { return Promise.resolve(null); } else { const root = folders[0].uri; From 978b73b5fb7ae4b647d8534e4d72858e3a4e72c8 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Mon, 15 Aug 2022 20:48:21 -0400 Subject: [PATCH 08/14] Add comment on why the file is there --- jest.e2e.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.e2e.config.js b/jest.e2e.config.js index dd11a3a..400c581 100644 --- a/jest.e2e.config.js +++ b/jest.e2e.config.js @@ -1,3 +1,4 @@ +// see https://github.com/microsoft/vscode-test/issues/37#issuecomment-700167820 const path = require("path"); module.exports = { From b7ee6441ea0bdb8db4036a284ac1fd1ba0a89a85 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Tue, 16 Aug 2022 09:09:57 -0400 Subject: [PATCH 09/14] Include constants field --- src/constants.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/constants.ts diff --git a/src/constants.ts b/src/constants.ts new file mode 100644 index 0000000..c39ab3e --- /dev/null +++ b/src/constants.ts @@ -0,0 +1 @@ +export const extensionId = "disneystreaming.smithy"; From 2fee28850347567479da19adca5e58623d812e4e Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Tue, 16 Aug 2022 11:31:29 -0400 Subject: [PATCH 10/14] exclude .vscode-test for prettier --- .prettierignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.prettierignore b/.prettierignore index 93e2cb9..69204a5 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,3 +1,4 @@ out/ node_modules/ .vscode/ +.vscode-test/ \ No newline at end of file From e448ca26d66eecfa22e11d1f20d301a0990c4d22 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Tue, 16 Aug 2022 11:31:41 -0400 Subject: [PATCH 11/14] Run integration test on CI --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4cc2481..5da3ee8 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "build": "vsce package --yarn", "format": "prettier --write '**/*.{ts,js,json,yml}'", "format-check": "prettier --check '**/*.{ts,js,json,yml}'", - "ci": "yarn clean && yarn install --no-progress && yarn format-check && yarn build && yarn test" + "ci": "yarn clean && yarn install --no-progress && yarn format-check && yarn build && yarn test && yarn test:it" }, "files": [ "extension.vsix" From 9740f4b8b2102bd3ed08648a9bf4541e4e69006e Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Tue, 16 Aug 2022 11:38:38 -0400 Subject: [PATCH 12/14] Print error to console --- it/runTest.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/it/runTest.ts b/it/runTest.ts index 1758bc3..668dd67 100644 --- a/it/runTest.ts +++ b/it/runTest.ts @@ -20,6 +20,7 @@ async function main() { }); } catch (err) { console.error("Failed to run tests"); + console.error(err); process.exit(1); } } From dc487414726e3d2e4cc7d00a7aa5243e688e3da3 Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Tue, 16 Aug 2022 11:46:16 -0400 Subject: [PATCH 13/14] Use GabrielBB/xvfb-action for the it tests --- .github/workflows/ci.yml | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 826b61f..c797823 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,11 @@ jobs: - name: Build & test run: yarn ci + - name: Run Integration tests + uses: GabrielBB/xvfb-action@v1.0 + with: + run: yarn test:it + deploy: if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) name: Publish diff --git a/package.json b/package.json index 5da3ee8..4cc2481 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "build": "vsce package --yarn", "format": "prettier --write '**/*.{ts,js,json,yml}'", "format-check": "prettier --check '**/*.{ts,js,json,yml}'", - "ci": "yarn clean && yarn install --no-progress && yarn format-check && yarn build && yarn test && yarn test:it" + "ci": "yarn clean && yarn install --no-progress && yarn format-check && yarn build && yarn test" }, "files": [ "extension.vsix" From 34222b17cf011643dc8e949056bb3b44d560b85c Mon Sep 17 00:00:00 2001 From: David Francoeur Date: Wed, 17 Aug 2022 11:06:19 -0400 Subject: [PATCH 14/14] Go back to 1.43.0, no need to force a new version on users --- it/runTest.ts | 5 ++++- package.json | 4 ++-- yarn.lock | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/it/runTest.ts b/it/runTest.ts index 668dd67..ff56767 100644 --- a/it/runTest.ts +++ b/it/runTest.ts @@ -14,7 +14,10 @@ async function main() { // Download VS Code, unzip it and run the integration test await runTests({ - version: "1.66.0", // force this version to avoid https://github.com/microsoft/vscode/issues/148975 + // we use 1.53.0 rather than 1.43.0 because it's the first one + // available to be downloaded. Latest also has the following issue: + //https://github.com/microsoft/vscode/issues/148975 + version: "1.53.0", extensionDevelopmentPath, extensionTestsPath, }); diff --git a/package.json b/package.json index 4cc2481..7a4e934 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "extension.vsix" ], "engines": { - "vscode": "^1.66.0" + "vscode": "^1.43.0" }, "dependencies": { "follow-redirects": "^1.14.9", @@ -98,7 +98,7 @@ "@types/follow-redirects": "^1.14.1", "@types/jest": "^27.4.0", "@types/node": "^17.0.21", - "@types/vscode": "^1.66.0", + "@types/vscode": "^1.43.0", "@typescript-eslint/parser": "^2.3.0", "@vscode/test-electron": "^2.1.5", "eslint": "^8.10.0", diff --git a/yarn.lock b/yarn.lock index 9bedb9a..fca1475 100644 --- a/yarn.lock +++ b/yarn.lock @@ -661,7 +661,7 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/vscode@^1.66.0": +"@types/vscode@^1.43.0": version "1.70.0" resolved "https://registry.yarnpkg.com/@types/vscode/-/vscode-1.70.0.tgz#9cb14cdaac9f450a7005ae2db49ecee4a084c983" integrity sha512-3/9Fz0F2eBgwciazc94Ien+9u1elnjFg9YAhvAb3qDy/WeFWD9VrOPU7CIytryOVUdbxus8uzL4VZYONA0gDtA==