From 39a80b5e3b58f811b459f70f20cf30184e122f6d Mon Sep 17 00:00:00 2001 From: Mark Pearce Date: Wed, 31 Jul 2024 16:37:04 -0300 Subject: [PATCH 01/15] All Typescript and brighterscript errors fixed --- bsc-plugin/package-lock.json | 466 ++++- bsc-plugin/package.json | 2 +- bsc-plugin/src/lib/rooibos/Annotation.ts | 2 +- .../lib/rooibos/CodeCoverageProcessor.spec.ts | 4 +- .../src/lib/rooibos/CodeCoverageProcessor.ts | 29 +- bsc-plugin/src/lib/rooibos/FileFactory.ts | 2 +- bsc-plugin/src/lib/rooibos/MockUtil.spec.ts | 4 +- bsc-plugin/src/lib/rooibos/MockUtil.ts | 21 +- .../src/lib/rooibos/RawCodeExpression.ts | 8 +- .../src/lib/rooibos/RawCodeStatement.ts | 13 +- bsc-plugin/src/lib/rooibos/RooibosSession.ts | 53 +- bsc-plugin/src/lib/rooibos/TestGroup.ts | 52 +- bsc-plugin/src/lib/rooibos/TestSuite.ts | 10 +- .../src/lib/rooibos/TestSuiteBuilder.spec.ts | 2 +- .../src/lib/rooibos/TestSuiteBuilder.ts | 40 +- bsc-plugin/src/lib/rooibos/Utils.ts | 59 +- bsc-plugin/src/lib/utils/Diagnostics.ts | 42 +- bsc-plugin/src/plugin.spec.ts | 115 +- bsc-plugin/src/plugin.ts | 50 +- bsconfig.json | 5 +- framework/src/source/BaseTestSuite.bs | 85 +- framework/src/source/RuntimeConfig.bs | 18 +- framework/src/source/Test.bs | 3 + framework/src/source/TestConstructorData.bs | 60 + framework/src/source/TestGroup.bs | 44 +- framework/src/source/TestRunner.bs | 35 +- framework/src/source/Utils.bs | 4 +- package-lock.json | 1833 +++++++++++++---- package.json | 11 +- tests/bsconfig.json | 3 +- tests/package.json | 2 +- tests/src/source/Assertion.spec.bs | 101 +- tests/src/source/Async.spec.bs | 12 +- tests/src/source/Basic.spec.bs | 60 +- tests/src/source/Charlies-Issues.spec.bs | 6 +- tests/src/source/Common.spec.bs | 10 +- tests/src/source/Expect.spec.bs | 20 +- .../src/source/Infinite-looping-fixes.spec.bs | 10 +- tests/src/source/Matcher.spec.bs | 16 +- tests/src/source/NewExpectSyntax.spec.bs | 96 +- tests/src/source/NodeExample.spec.bs | 14 +- tests/src/source/Params.spec.bs | 6 +- .../issue_13_afterEach_not_running.spec.bs | 12 +- .../issue_15_tests_only_on_groups.spec.bs | 6 +- .../source/verifyBeforeEachAfterEach.spec.bs | 16 +- tsconfig.json | 3 + 46 files changed, 2504 insertions(+), 961 deletions(-) create mode 100644 framework/src/source/TestConstructorData.bs create mode 100644 tsconfig.json diff --git a/bsc-plugin/package-lock.json b/bsc-plugin/package-lock.json index 1e7614c2..d3b4230c 100644 --- a/bsc-plugin/package-lock.json +++ b/bsc-plugin/package-lock.json @@ -22,7 +22,7 @@ "@types/node": "^14.18.41", "@typescript-eslint/eslint-plugin": "^5.27.0", "@typescript-eslint/parser": "^5.27.0", - "brighterscript": "^0.65.22", + "brighterscript": "^1.0.0-alpha.35", "chai": "^4.2.0", "chai-subset": "^1.6.0", "coveralls": "^3.0.0", @@ -341,6 +341,18 @@ "node": ">=6.0.0" } }, + "node_modules/@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", @@ -1341,9 +1353,9 @@ } }, "node_modules/@postman/tunnel-agent": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.3.tgz", - "integrity": "sha512-k57fzmAZ2PJGxfOA4SGR05ejorHbVAa/84Hxh/2nAztjNXc4ZjOm9NUIk6/Z6LCrBvJZqjRZbN8e/nROVUPVdg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.4.tgz", + "integrity": "sha512-CJJlq8V7rNKhAw4sBfjixKpJW00SHqebqNUQKxMoepgeWZIbdPcD+rguRcivGhS4N12PymDcKgUgSD4rVC+RjQ==", "dev": true, "dependencies": { "safe-buffer": "^5.0.1" @@ -1358,6 +1370,117 @@ "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==", "dev": true }, + "node_modules/@rokucommunity/logger": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@rokucommunity/logger/-/logger-0.3.9.tgz", + "integrity": "sha512-j4DK7dF2klMhoclJZ6P7h1bT4bMVt/ynfCi3GSMozXld0M1HbpRyY3TCxu6dnxPl16l6PtIosNHELjQxKzFp6g==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "date-fns": "^2.30.0", + "fs-extra": "^10.0.0", + "parse-ms": "^2.1.0", + "safe-json-stringify": "^1.2.0", + "serialize-error": "^8.1.0" + } + }, + "node_modules/@rokucommunity/logger/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@rokucommunity/logger/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@rokucommunity/logger/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/@rokucommunity/logger/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@rokucommunity/logger/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@rokucommunity/logger/node_modules/serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@rokucommunity/logger/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@rokucommunity/logger/node_modules/type-fest": { + "version": "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==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sindresorhus/is": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.5.2.tgz", @@ -2293,18 +2416,20 @@ } }, "node_modules/brighterscript": { - "version": "0.65.27", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.27.tgz", - "integrity": "sha512-G56OIzdh8D9GHPSt2LfmJ3amr4hkPXleECRTPWWI3fDvj9L7p7Vhk/g5HG/ClCkjTG/QwuYv7giNsMW8fB8VJA==", + "version": "1.0.0-alpha.35", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-1.0.0-alpha.35.tgz", + "integrity": "sha512-pvMOPoCjMn+26FPAX48vCMbO7pr9HCIR7Vu68Q82rMWyi+K5Mpr8J6Or+puwUH6p9EGbGlzyCc7N6rnCBGfxTg==", "dev": true, "dependencies": { "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.9", "@xml-tools/parser": "^1.0.7", "array-flat-polyfill": "^1.0.1", "chalk": "^2.4.2", "chevrotain": "^7.0.1", "chokidar": "^3.5.1", "clear": "^0.1.0", + "coveralls-next": "^4.2.0", "cross-platform-clear-console": "^2.3.0", "debounce-promise": "^3.1.0", "eventemitter3": "^4.0.0", @@ -2320,12 +2445,15 @@ "parse-ms": "^2.1.0", "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.12.0", + "roku-deploy": "^3.12.1", "serialize-error": "^7.0.1", "source-map": "^0.7.4", + "thenby": "^1.3.4", + "uuid": "^9.0.0", "vscode-languageserver": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", "vscode-uri": "^3.0.8", "xml2js": "^0.5.0", "yargs": "^16.2.0" @@ -2348,6 +2476,19 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/brighterscript/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/brighterscript/node_modules/vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -2993,6 +3134,57 @@ "node": ">=6" } }, + "node_modules/coveralls-next": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/coveralls-next/-/coveralls-next-4.2.1.tgz", + "integrity": "sha512-O/SBGZsCryt+6Q3NuJHENyQYaucTEV9qp0KGaed+y42PUh+GuF949LRLHKZbxWwOIc1tV8bJRIVWlfbZ8etEwQ==", + "dev": true, + "dependencies": { + "form-data": "4.0.0", + "js-yaml": "4.1.0", + "lcov-parse": "1.0.0", + "log-driver": "1.2.7", + "minimist": "1.2.8" + }, + "bin": { + "coveralls": "bin/coveralls.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/coveralls-next/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/coveralls-next/node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/coveralls-next/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -3087,6 +3279,22 @@ "node": ">= 12" } }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -3097,9 +3305,9 @@ } }, "node_modules/dayjs": { - "version": "1.11.11", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", - "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==", + "version": "1.11.12", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", + "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==", "dev": true }, "node_modules/debounce-promise": { @@ -7751,14 +7959,14 @@ } }, "node_modules/postman-request": { - "version": "2.88.1-postman.33", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.33.tgz", - "integrity": "sha512-uL9sCML4gPH6Z4hreDWbeinKU0p0Ke261nU7OvII95NU22HN6Dk7T/SaVPaj6T4TsQqGKIFw6/woLZnH7ugFNA==", + "version": "2.88.1-postman.36", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.36.tgz", + "integrity": "sha512-frYz62rp/C9Ip+l0KrOuPuFfv9UhkczCUK6sITc+0AZ1z/8Lcr7brs8AQ38VjxBFmaEyL/ITjy6u0uHyFLV5RQ==", "dev": true, "dependencies": { "@postman/form-data": "~3.1.1", "@postman/tough-cookie": "~4.1.3-postman.1", - "@postman/tunnel-agent": "^0.6.3", + "@postman/tunnel-agent": "^0.6.4", "aws-sign2": "~0.7.0", "aws4": "^1.12.0", "brotli": "^1.3.3", @@ -7780,7 +7988,7 @@ "uuid": "^8.3.2" }, "engines": { - "node": ">= 6" + "node": ">= 16" } }, "node_modules/postman-request/node_modules/http-signature": { @@ -8069,6 +8277,12 @@ "node": ">= 0.10" } }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "node_modules/regexp-to-ast": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", @@ -8819,9 +9033,9 @@ } }, "node_modules/roku-deploy": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.0.tgz", - "integrity": "sha512-YiCZeQ+sEmFW9ZfXtMNH+/CBSHQ5deNZYWONM+s6gCEQsrz7kCMFPj5YEdgfqW+d2b8G1ve9GELHcSt2FsfM8g==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.1.tgz", + "integrity": "sha512-PEOdiFKGW1jrcoC9zjb+9kOWC/Q3eH7dzPvSi5kKignjNcyDiyJi+/wINwNrzw9SsxAVtw+NLvYueyZi9wQVsw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -9027,6 +9241,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "dev": true + }, "node_modules/safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -9556,6 +9776,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "node_modules/thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", + "dev": true + }, "node_modules/through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -10769,6 +10995,15 @@ "integrity": "sha512-lobG0d7aOfQRXh8AyklEAgZGvA4FShxo6xQbUrrT/cNBPUdIDojlokwJsQyCC/eKia7ifqM0yP+2DRZ4WKw2RQ==", "dev": true }, + "@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, "@babel/template": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", @@ -11534,9 +11769,9 @@ } }, "@postman/tunnel-agent": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.3.tgz", - "integrity": "sha512-k57fzmAZ2PJGxfOA4SGR05ejorHbVAa/84Hxh/2nAztjNXc4ZjOm9NUIk6/Z6LCrBvJZqjRZbN8e/nROVUPVdg==", + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.4.tgz", + "integrity": "sha512-CJJlq8V7rNKhAw4sBfjixKpJW00SHqebqNUQKxMoepgeWZIbdPcD+rguRcivGhS4N12PymDcKgUgSD4rVC+RjQ==", "dev": true, "requires": { "safe-buffer": "^5.0.1" @@ -11548,6 +11783,86 @@ "integrity": "sha512-2ox6EUL+UTtccTbD4dbVjZK3QHa0PHCqpoKMF8lZz9ayzzEP3iVPF8KZR6hOi6bxsIcbGXVjqmtCVkpC4P9SrA==", "dev": true }, + "@rokucommunity/logger": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@rokucommunity/logger/-/logger-0.3.9.tgz", + "integrity": "sha512-j4DK7dF2klMhoclJZ6P7h1bT4bMVt/ynfCi3GSMozXld0M1HbpRyY3TCxu6dnxPl16l6PtIosNHELjQxKzFp6g==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "date-fns": "^2.30.0", + "fs-extra": "^10.0.0", + "parse-ms": "^2.1.0", + "safe-json-stringify": "^1.2.0", + "serialize-error": "^8.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "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==", + "dev": true + } + } + }, "@sindresorhus/is": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-5.5.2.tgz", @@ -12219,18 +12534,20 @@ } }, "brighterscript": { - "version": "0.65.27", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.65.27.tgz", - "integrity": "sha512-G56OIzdh8D9GHPSt2LfmJ3amr4hkPXleECRTPWWI3fDvj9L7p7Vhk/g5HG/ClCkjTG/QwuYv7giNsMW8fB8VJA==", + "version": "1.0.0-alpha.35", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-1.0.0-alpha.35.tgz", + "integrity": "sha512-pvMOPoCjMn+26FPAX48vCMbO7pr9HCIR7Vu68Q82rMWyi+K5Mpr8J6Or+puwUH6p9EGbGlzyCc7N6rnCBGfxTg==", "dev": true, "requires": { "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.9", "@xml-tools/parser": "^1.0.7", "array-flat-polyfill": "^1.0.1", "chalk": "^2.4.2", "chevrotain": "^7.0.1", "chokidar": "^3.5.1", "clear": "^0.1.0", + "coveralls-next": "^4.2.0", "cross-platform-clear-console": "^2.3.0", "debounce-promise": "^3.1.0", "eventemitter3": "^4.0.0", @@ -12246,12 +12563,15 @@ "parse-ms": "^2.1.0", "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.12.0", + "roku-deploy": "^3.12.1", "serialize-error": "^7.0.1", "source-map": "^0.7.4", + "thenby": "^1.3.4", + "uuid": "^9.0.0", "vscode-languageserver": "^9.0.1", "vscode-languageserver-protocol": "^3.17.5", "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", "vscode-uri": "^3.0.8", "xml2js": "^0.5.0", "yargs": "^16.2.0" @@ -12268,6 +12588,12 @@ "universalify": "^0.1.0" } }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true + }, "vscode-jsonrpc": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", @@ -12737,6 +13063,47 @@ "request": "^2.88.2" } }, + "coveralls-next": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/coveralls-next/-/coveralls-next-4.2.1.tgz", + "integrity": "sha512-O/SBGZsCryt+6Q3NuJHENyQYaucTEV9qp0KGaed+y42PUh+GuF949LRLHKZbxWwOIc1tV8bJRIVWlfbZ8etEwQ==", + "dev": true, + "requires": { + "form-data": "4.0.0", + "js-yaml": "4.1.0", + "lcov-parse": "1.0.0", + "log-driver": "1.2.7", + "minimist": "1.2.8" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + } + } + }, "create-require": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", @@ -12807,6 +13174,15 @@ "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "dev": true }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.21.0" + } + }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -12814,9 +13190,9 @@ "dev": true }, "dayjs": { - "version": "1.11.11", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.11.tgz", - "integrity": "sha512-okzr3f11N6WuqYtZSvm+F776mB41wRZMhKP+hc34YdW+KmtYYK9iqvHSwo2k9FEH3fhGXvOPV6yz2IcSrfRUDg==", + "version": "1.11.12", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.12.tgz", + "integrity": "sha512-Rt2g+nTbLlDWZTwwrIXjy9MeiZmSDI375FvZs72ngxx8PDC6YXOeR3q5LAuPzjZQxhiWdRKac7RKV+YyQYfYIg==", "dev": true }, "debounce-promise": { @@ -16230,14 +16606,14 @@ } }, "postman-request": { - "version": "2.88.1-postman.33", - "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.33.tgz", - "integrity": "sha512-uL9sCML4gPH6Z4hreDWbeinKU0p0Ke261nU7OvII95NU22HN6Dk7T/SaVPaj6T4TsQqGKIFw6/woLZnH7ugFNA==", + "version": "2.88.1-postman.36", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.36.tgz", + "integrity": "sha512-frYz62rp/C9Ip+l0KrOuPuFfv9UhkczCUK6sITc+0AZ1z/8Lcr7brs8AQ38VjxBFmaEyL/ITjy6u0uHyFLV5RQ==", "dev": true, "requires": { "@postman/form-data": "~3.1.1", "@postman/tough-cookie": "~4.1.3-postman.1", - "@postman/tunnel-agent": "^0.6.3", + "@postman/tunnel-agent": "^0.6.4", "aws-sign2": "~0.7.0", "aws4": "^1.12.0", "brotli": "^1.3.3", @@ -16480,6 +16856,12 @@ "resolve": "^1.1.6" } }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "regexp-to-ast": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", @@ -17015,9 +17397,9 @@ } }, "roku-deploy": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.0.tgz", - "integrity": "sha512-YiCZeQ+sEmFW9ZfXtMNH+/CBSHQ5deNZYWONM+s6gCEQsrz7kCMFPj5YEdgfqW+d2b8G1ve9GELHcSt2FsfM8g==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.1.tgz", + "integrity": "sha512-PEOdiFKGW1jrcoC9zjb+9kOWC/Q3eH7dzPvSi5kKignjNcyDiyJi+/wINwNrzw9SsxAVtw+NLvYueyZi9wQVsw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -17172,6 +17554,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "dev": true + }, "safe-regex-test": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", @@ -17566,6 +17954,12 @@ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true }, + "thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", diff --git a/bsc-plugin/package.json b/bsc-plugin/package.json index a6206ce9..2e6442f0 100644 --- a/bsc-plugin/package.json +++ b/bsc-plugin/package.json @@ -42,7 +42,7 @@ "@types/node": "^14.18.41", "@typescript-eslint/eslint-plugin": "^5.27.0", "@typescript-eslint/parser": "^5.27.0", - "brighterscript": "^0.65.22", + "brighterscript": "^1.0.0-alpha.35", "chai": "^4.2.0", "chai-subset": "^1.6.0", "coveralls": "^3.0.0", diff --git a/bsc-plugin/src/lib/rooibos/Annotation.ts b/bsc-plugin/src/lib/rooibos/Annotation.ts index dfd3821e..8cc0179f 100644 --- a/bsc-plugin/src/lib/rooibos/Annotation.ts +++ b/bsc-plugin/src/lib/rooibos/Annotation.ts @@ -206,7 +206,7 @@ export class RooibosAnnotation { } try { if (rawParams) { - this.params.push(new AnnotationParams(annotation, rawParams, annotation.range.start.line, annotation.getArguments() as any, isIgnore, isSolo, noCatch)); + this.params.push(new AnnotationParams(annotation, rawParams, annotation.location.range.start.line, annotation.getArguments() as any, isIgnore, isSolo, noCatch)); } else { diagnosticIllegalParams(file, annotation); } diff --git a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts index 1a038d3d..0357a39e 100644 --- a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts +++ b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts @@ -49,11 +49,11 @@ describe('RooibosPlugin', () => { builder.plugins = new PluginInterface([plugin], { logger: builder.logger }); program.plugins = new PluginInterface([plugin], { logger: builder.logger }); program.createSourceScope(); //ensure source scope is created - plugin.beforeProgramCreate(builder); + plugin.beforeProgramCreate({ builder: builder }); }); afterEach(() => { - plugin.afterProgramCreate(program); + plugin.afterProgramCreate({ builder: builder, program: program }); fsExtra.ensureDirSync(tmpPath); fsExtra.emptyDirSync(tmpPath); builder.dispose(); diff --git a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts index b0a48488..d3fd18e2 100644 --- a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts +++ b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts @@ -79,29 +79,30 @@ export class CodeCoverageProcessor { file.ast.walk(createVisitor({ ForStatement: (ds, parent, owner, key) => { this.addStatement(ds); - ds.forToken.text = `${this.getFuncCallText(ds.range.start.line, CodeCoverageLineType.code)}: for`; + ds.tokens.for.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: for`; }, IfStatement: (ifStatement, parent, owner, key) => { this.addStatement(ifStatement); - (ifStatement as any).condition = new BinaryExpression( - new RawCodeExpression(this.getFuncCallText(ifStatement.condition.range.start.line, CodeCoverageLineType.condition)), - createToken(TokenKind.And), - new GroupingExpression({ - left: createToken(TokenKind.LeftParen), - right: createToken(TokenKind.RightParen) - }, ifStatement.condition) - ); + (ifStatement as any).condition = new BinaryExpression({ + left: new RawCodeExpression(this.getFuncCallText(ifStatement.condition.location.range.start.line, CodeCoverageLineType.condition)), + operator: createToken(TokenKind.And), + right: new GroupingExpression({ + leftParen: createToken(TokenKind.LeftParen), + rightParen: createToken(TokenKind.RightParen), + expression: ifStatement.condition + }) + }); let blockStatements = ifStatement?.thenBranch?.statements; if (blockStatements) { - let coverageStatement = new RawCodeStatement(this.getFuncCallText(ifStatement.range.start.line, CodeCoverageLineType.branch)); + let coverageStatement = new RawCodeStatement(this.getFuncCallText(ifStatement.location.range.start.line, CodeCoverageLineType.branch)); blockStatements.splice(0, 0, coverageStatement); } // Handle the else blocks let elseBlock = ifStatement.elseBranch; if (isBlock(elseBlock) && elseBlock.statements) { - let coverageStatement = new RawCodeStatement(this.getFuncCallText(elseBlock.range.start.line - 1, CodeCoverageLineType.branch)); + let coverageStatement = new RawCodeStatement(this.getFuncCallText(elseBlock.location.range.start.line - 1, CodeCoverageLineType.branch)); elseBlock.statements.splice(0, 0, coverageStatement); } @@ -112,7 +113,7 @@ export class CodeCoverageProcessor { }, WhileStatement: (ds, parent, owner, key) => { - ds.tokens.while.text = `${this.getFuncCallText(ds.range.start.line, CodeCoverageLineType.code)}: while`; + ds.tokens.while.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: while`; }, ReturnStatement: (ds, parent, owner, key) => { this.addStatement(ds); @@ -120,7 +121,7 @@ export class CodeCoverageProcessor { }, ForEachStatement: (ds, parent, owner, key) => { this.addStatement(ds); - ds.tokens.forEach.text = `${this.getFuncCallText(ds.range.start.line, CodeCoverageLineType.code)}: for each`; + ds.tokens.forEach.text = `${this.getFuncCallText(ds.location.range.start.line, CodeCoverageLineType.code)}: for each`; }, ExitWhileStatement: (ds, parent, owner, key) => { @@ -171,7 +172,7 @@ export class CodeCoverageProcessor { return; } - const lineNumber = statement.range.start.line; + const lineNumber = statement.location.range.start.line; this.coverageMap.set(lineNumber, coverageType); const parsed = Parser.parse(this.getFuncCallText(lineNumber, coverageType)).ast.statements[0] as ExpressionStatement; this.astEditor.arraySplice(owner, key, 0, parsed); diff --git a/bsc-plugin/src/lib/rooibos/FileFactory.ts b/bsc-plugin/src/lib/rooibos/FileFactory.ts index 24b16c59..f21a3ca8 100644 --- a/bsc-plugin/src/lib/rooibos/FileFactory.ts +++ b/bsc-plugin/src/lib/rooibos/FileFactory.ts @@ -140,7 +140,7 @@ export class FileFactory { public addFileToRootDir(program: Program, filePath: string, contents: string) { try { fse.outputFileSync( - path.join(program.options.stagingFolderPath ?? program.options.stagingDir ?? program.options.sourceRoot, filePath), + path.join(program.options.stagingDir ?? program.options.sourceRoot, filePath), contents ); } catch (error) { diff --git a/bsc-plugin/src/lib/rooibos/MockUtil.spec.ts b/bsc-plugin/src/lib/rooibos/MockUtil.spec.ts index 13ae670a..c9406aab 100644 --- a/bsc-plugin/src/lib/rooibos/MockUtil.spec.ts +++ b/bsc-plugin/src/lib/rooibos/MockUtil.spec.ts @@ -50,11 +50,11 @@ describe('MockUtil', () => { builder.plugins = new PluginInterface([plugin], { logger: builder.logger }); program.plugins = new PluginInterface([plugin], { logger: builder.logger }); program.createSourceScope(); //ensure source scope is created - plugin.beforeProgramCreate(builder); + plugin.beforeProgramCreate({ builder: builder }); }); afterEach(() => { - plugin.afterProgramCreate(program); + plugin.afterProgramCreate({ program: program, builder: builder }); fsExtra.ensureDirSync(tmpPath); fsExtra.emptyDirSync(tmpPath); builder.dispose(); diff --git a/bsc-plugin/src/lib/rooibos/MockUtil.ts b/bsc-plugin/src/lib/rooibos/MockUtil.ts index 525251b7..34751f6b 100644 --- a/bsc-plugin/src/lib/rooibos/MockUtil.ts +++ b/bsc-plugin/src/lib/rooibos/MockUtil.ts @@ -10,7 +10,7 @@ import type { RooibosSession } from './RooibosSession'; import { diagnosticErrorProcessingFile } from '../utils/Diagnostics'; import type { TestCase } from './TestCase'; import type { TestSuite } from './TestSuite'; -import { functionRequiresReturnValue, getAllDottedGetParts, getScopeForSuite } from './Utils'; +import { functionRequiresReturnValue, getAllDottedGetParts, getFileLookups, getScopeForSuite } from './Utils'; export class MockUtil { @@ -50,7 +50,7 @@ export class MockUtil { this.processedStatements = new Set(); this.astEditor = astEditor; // console.log('processing global methods on ', file.pkgPath); - for (let functionStatement of file.parser.references.functionStatements) { + for (let functionStatement of getFileLookups(file).functionStatements) { this.enableMockOnFunction(file, functionStatement); } @@ -94,10 +94,11 @@ export class MockUtil { // TODO check if the user has actually mocked or stubbed this function, otherwise leave it alone! for (let param of functionStatement.func.parameters) { - param.asToken = null; + // WHY ? + // param.tokens.as = null; } - const paramNames = functionStatement.func.parameters.map((param) => param.name.text).join(','); + const paramNames = functionStatement.func.parameters.map((param) => param.tokens.name.text).join(','); const requiresReturnValue = functionRequiresReturnValue(functionStatement); const globalAaName = '__stubs_globalAa'; const resultName = '__stubOrMockResult'; @@ -141,21 +142,21 @@ export class MockUtil { } private gatherMockedGlobalMethods(testSuite: TestSuite, testCase: TestCase) { try { - let func = testSuite.classStatement.methods.find((m) => m.name.text.toLowerCase() === testCase.funcName.toLowerCase()); + let func = testSuite.classStatement.methods.find((m) => m.tokens.name.text.toLowerCase() === testCase.funcName.toLowerCase()); func.walk(brighterscript.createVisitor({ ExpressionStatement: (expressionStatement, parent, owner) => { let callExpression = expressionStatement.expression as brighterscript.CallExpression; if (brighterscript.isCallExpression(callExpression) && brighterscript.isDottedGetExpression(callExpression.callee)) { let dge = callExpression.callee; let assertRegex = /(?:fail|assert(?:[a-z0-9]*)|expect(?:[a-z0-9]*)|stubCall)/i; - if (dge && assertRegex.test(dge.name.text)) { - if (dge.name.text === 'stubCall') { + if (dge && assertRegex.test(dge.tokens.name.text)) { + if (dge.tokens.name.text === 'stubCall') { this.processGlobalStubbedMethod(callExpression, testSuite); return expressionStatement; } else { - if (dge.name.text === 'expectCalled' || dge.name.text === 'expectNotCalled') { + if (dge.tokens.name.text === 'expectCalled' || dge.tokens.name.text === 'expectNotCalled') { this.processGlobalStubbedMethod(callExpression, testSuite); } } @@ -178,7 +179,7 @@ export class MockUtil { const scope = getScopeForSuite(testSuite); const namespaceLookup = this.session.namespaceLookup; if (brighterscript.isDottedGetExpression(callExpression.callee)) { - const nameText = callExpression.callee.name.text; + const nameText = callExpression.callee.tokens.name.text; isNotCalled = nameText === 'expectNotCalled'; isStubCall = nameText === 'stubCall'; } @@ -214,7 +215,7 @@ export class MockUtil { } } else if (brighterscript.isVariableExpression(expression)) { let functionName = expression.getName(ParseMode.BrightScript); - if (scope.symbolTable.hasSymbol(functionName)) { + if (scope.symbolTable.hasSymbol(functionName, brighterscript.SymbolTypeFlag.runtime)) { result = functionName; } diff --git a/bsc-plugin/src/lib/rooibos/RawCodeExpression.ts b/bsc-plugin/src/lib/rooibos/RawCodeExpression.ts index 82f0b6a5..05b8e80f 100644 --- a/bsc-plugin/src/lib/rooibos/RawCodeExpression.ts +++ b/bsc-plugin/src/lib/rooibos/RawCodeExpression.ts @@ -16,11 +16,17 @@ export class RawCodeExpression extends Expression { super(); } + readonly kind = 'RawCodeExpression' as brighterscript.AstNodeKind; + + get location() { + return brighterscript.util.createLocationFromFileRange(this.sourceFile, this.range); + } + public transpile(state: BrsTranspileState) { return [new SourceNode( this.range.start.line + 1, this.range.start.character, - this.sourceFile ? this.sourceFile.pathAbsolute : state.srcPath, + this.sourceFile ? this.sourceFile.srcPath : state.srcPath, this.source )]; } diff --git a/bsc-plugin/src/lib/rooibos/RawCodeStatement.ts b/bsc-plugin/src/lib/rooibos/RawCodeStatement.ts index 41ad22ca..75da51b7 100644 --- a/bsc-plugin/src/lib/rooibos/RawCodeStatement.ts +++ b/bsc-plugin/src/lib/rooibos/RawCodeStatement.ts @@ -1,11 +1,13 @@ import type { + AstNodeKind, BscFile, WalkOptions, WalkVisitor } from 'brighterscript'; import { Range, - Statement + Statement, + util } from 'brighterscript'; import { SourceNode } from 'source-map'; @@ -21,6 +23,13 @@ export class RawCodeStatement extends Statement { super(); } + + readonly kind = 'RawCodeExpression' as AstNodeKind; + + get location() { + return util.createLocationFromFileRange(this.sourceFile, this.range); + } + public transpile(state: BrsTranspileState) { //indent every line with the current transpile indent level (except the first line, because that's pre-indented by bsc) let source = this.source.replace(/\r?\n/g, (match, newline) => { @@ -30,7 +39,7 @@ export class RawCodeStatement extends Statement { return [new SourceNode( this.range.start.line + 1, this.range.start.character, - this.sourceFile ? this.sourceFile.pathAbsolute : state.srcPath, + this.sourceFile ? this.sourceFile.srcPath : state.srcPath, source )]; } diff --git a/bsc-plugin/src/lib/rooibos/RooibosSession.ts b/bsc-plugin/src/lib/rooibos/RooibosSession.ts index ac5608e0..337de7ab 100644 --- a/bsc-plugin/src/lib/rooibos/RooibosSession.ts +++ b/bsc-plugin/src/lib/rooibos/RooibosSession.ts @@ -1,7 +1,6 @@ import * as path from 'path'; -import type { BrsFile, ClassStatement, FunctionStatement, NamespaceContainer, NamespaceStatement, Program, ProgramBuilder, Scope } from 'brighterscript'; +import type { BrsFile, ClassStatement, Editor, FunctionStatement, NamespaceContainer, NamespaceStatement, Program, ProgramBuilder, Scope } from 'brighterscript'; import { isBrsFile, isCallExpression, isVariableExpression, ParseMode, Parser, WalkMode } from 'brighterscript'; -import type { AstEditor } from 'brighterscript/dist/astUtils/AstEditor'; import type { RooibosConfig } from './RooibosConfig'; import { SessionInfo } from './RooibosSessionInfo'; import { TestSuiteBuilder } from './TestSuiteBuilder'; @@ -11,6 +10,7 @@ import { diagnosticErrorNoMainFound as diagnosticWarnNoMainFound, diagnosticNoSt import undent from 'undent'; import * as fsExtra from 'fs-extra'; import type { MockUtil } from './MockUtil'; +import { getMainFunctionStatement } from './Utils'; // eslint-disable-next-line const pkg = require('../../../package.json'); @@ -38,7 +38,7 @@ export class RooibosSession { this.sessionInfo = new SessionInfo(this.config); } - prepareForTranspile(editor: AstEditor, program: Program, mockUtil: MockUtil) { + prepareForTranspile(editor: Editor, program: Program, mockUtil: MockUtil) { this.addTestRunnerMetadata(editor); this.addLaunchHookToExistingMain(editor); @@ -71,12 +71,12 @@ export class RooibosSession { return testSuites; } - addLaunchHookToExistingMain(editor: AstEditor) { + addLaunchHookToExistingMain(editor: Editor) { let mainFunction: FunctionStatement; const files = this._builder.program.getScopeByName('source').getOwnFiles(); for (let file of files) { if (isBrsFile(file)) { - const mainFunc = file.parser.references.functionStatements.find((f) => f.name.text.toLowerCase() === 'main'); + const mainFunc = getMainFunctionStatement(file); if (mainFunc) { mainFunction = mainFunc; break; @@ -84,7 +84,7 @@ export class RooibosSession { } } if (mainFunction) { - const initCall = mainFunction.func.body.findChild(f => isCallExpression(f) && isVariableExpression(f.callee) && f.callee.name.text.toLowerCase() === 'rooibos_init', { + const initCall = mainFunction.func.body.findChild(f => isCallExpression(f) && isVariableExpression(f.callee) && f.callee.tokens.name.text.toLowerCase() === 'rooibos_init', { walkMode: WalkMode.visitAllRecursive }); if (!initCall) { @@ -97,7 +97,7 @@ export class RooibosSession { const files = this._builder.program.getScopeByName('source').getOwnFiles(); for (let file of files) { if (isBrsFile(file)) { - const mainFunc = file.parser.references.functionStatements.find((f) => f.name.text.toLowerCase() === 'main'); + const mainFunc = getMainFunctionStatement(file); if (mainFunc) { mainFunction = mainFunc; break; @@ -105,19 +105,19 @@ export class RooibosSession { } } if (!mainFunction) { - diagnosticWarnNoMainFound(files[0]); - if (!this._builder.options.stagingDir && !this._builder.options.stagingFolderPath) { - console.error('this plugin requires that stagingDir or the deprecated stagingFolderPath bsconfig option is set'); - diagnosticNoStagingDir(files[0]); + diagnosticWarnNoMainFound(files[0] as BrsFile); + if (!this._builder.options.stagingDir) { + console.error('this plugin requires that stagingDir bsconfig option is set'); + diagnosticNoStagingDir(files[0] as BrsFile); } else { - const filePath = path.join(this._builder.options.stagingDir ?? this._builder.options.stagingFolderPath, 'source/rooibosMain.brs'); + const filePath = path.join(this._builder.options.stagingDir, 'source/rooibosMain.brs'); fsExtra.writeFileSync(filePath, `function main()\n Rooibos_init("${this.config?.testSceneName ?? 'RooibosScene'}")\nend function`); } } } - addTestRunnerMetadata(editor: AstEditor) { + addTestRunnerMetadata(editor: Editor) { let runtimeConfig = this._builder.program.getFile('source/rooibos/RuntimeConfig.bs'); if (runtimeConfig) { let classStatement = (runtimeConfig.ast.statements[0] as NamespaceStatement).body.statements[0] as ClassStatement; @@ -128,8 +128,8 @@ export class RooibosSession { } } - updateRunTimeConfigFunction(classStatement: ClassStatement, editor: AstEditor) { - let method = classStatement.methods.find((m) => m.name.text === 'getRuntimeConfig'); + updateRunTimeConfigFunction(classStatement: ClassStatement, editor: Editor) { + let method = classStatement.methods.find((m) => m.tokens.name.text === 'getRuntimeConfig'); if (method) { editor.addToArray( method.func.body.statements, @@ -179,8 +179,8 @@ export class RooibosSession { return name; } - updateVersionTextFunction(classStatement: ClassStatement, editor: AstEditor) { - let method = classStatement.methods.find((m) => m.name.text === 'getVersionText'); + updateVersionTextFunction(classStatement: ClassStatement, editor: Editor) { + let method = classStatement.methods.find((m) => m.tokens.name.text === 'getVersionText'); if (method) { editor.addToArray( method.func.body.statements, @@ -190,8 +190,8 @@ export class RooibosSession { } } - updateClassMapFunction(classStatement: ClassStatement, editor: AstEditor) { - let method = classStatement.methods.find((m) => m.name.text === 'getTestSuiteClassMap'); + updateClassMapFunction(classStatement: ClassStatement, editor: Editor) { + let method = classStatement.methods.find((m) => m.tokens.name.text === 'getTestSuiteClassMap'); if (method) { editor.arrayPush(method.func.body.statements, ...Parser.parse(undent` return {${this.sessionInfo.testSuitesToRun.map(suite => ` @@ -210,11 +210,11 @@ export class RooibosSession { createNodeFile(program: Program, suite: TestSuite) { let xmlText = this.getNodeTestXmlText(suite); this.fileFactory.addFile(program, suite.xmlPkgPath, xmlText); - let bsFile = program.getFile(suite.bsPkgPath); - if (bsFile) { - (bsFile as BrsFile).parser.statements.push(); - bsFile.needsTranspiled = true; - } + //let bsFile = program.getFile(suite.bsPkgPath); + //if (bsFile) { + // (bsFile as BrsFile).parser.statements.push(); + // bsFile.needsTranspiled = true; + //} let brsFile = this.fileFactory.addFile(program, suite.bsPkgPath, undent` function init() nodeRunner = Rooibos_TestRunner(m.top.getScene(), m) @@ -256,8 +256,8 @@ export class RooibosSession { } - private createIgnoredTestsInfoFunction(cs: ClassStatement, editor: AstEditor) { - let method = cs.methods.find((m) => m.name.text === 'getIgnoredTestInfo'); + private createIgnoredTestsInfoFunction(cs: ClassStatement, editor: Editor) { + let method = cs.methods.find((m) => m.tokens.name.text === 'getIgnoredTestInfo'); if (method) { editor.arrayPush(method.func.body.statements, ...Parser.parse([ 'return {', @@ -269,4 +269,5 @@ export class RooibosSession { ].join('\n')).ast.statements); } } + } diff --git a/bsc-plugin/src/lib/rooibos/TestGroup.ts b/bsc-plugin/src/lib/rooibos/TestGroup.ts index 71df26f5..24d6337a 100644 --- a/bsc-plugin/src/lib/rooibos/TestGroup.ts +++ b/bsc-plugin/src/lib/rooibos/TestGroup.ts @@ -52,25 +52,25 @@ export class TestGroup extends TestBlock { //add line number as last param const transpileState = new BrsTranspileState(this.file); try { - let func = this.testSuite.classStatement.methods.find((m) => m.name.text.toLowerCase() === testCase.funcName.toLowerCase()); + let func = this.testSuite.classStatement.methods.find((m) => m.tokens.name.text.toLowerCase() === testCase.funcName.toLowerCase()); func.walk(brighterscript.createVisitor({ ExpressionStatement: (expressionStatement, parent, owner, key) => { let callExpression = expressionStatement.expression as CallExpression; if (brighterscript.isCallExpression(callExpression) && brighterscript.isDottedGetExpression(callExpression.callee)) { let dge = callExpression.callee; - let isSub = isFunctionExpression(callExpression.parent.parent.parent) && callExpression.parent.parent.parent.functionType.kind === TokenKind.Sub; + let isSub = isFunctionExpression(callExpression.parent.parent.parent) && callExpression.parent.parent.parent.tokens.functionType.kind === TokenKind.Sub; let assertRegex = /(?:fail|assert(?:[a-z0-9]*)|expect(?:[a-z0-9]*)|stubCall)/i; - if (dge && assertRegex.test(dge.name.text)) { - if (dge.name.text === 'stubCall') { + if (dge && assertRegex.test(dge.tokens.name.text)) { + if (dge.tokens.name.text === 'stubCall') { this.modifyModernRooibosExpectCallExpression(callExpression, editor, namespaceLookup, scope); return expressionStatement; } else { - if (dge.name.text === 'expectCalled' || dge.name.text === 'expectNotCalled') { + if (dge.tokens.name.text === 'expectCalled' || dge.tokens.name.text === 'expectNotCalled') { this.modifyModernRooibosExpectCallExpression(callExpression, editor, namespaceLookup, scope); } - if (dge.name.text === 'expectCalled' || dge.name.text === 'expectNotCalled') { + if (dge.tokens.name.text === 'expectCalled' || dge.tokens.name.text === 'expectNotCalled') { this.modifyModernRooibosExpectCallExpression(callExpression, editor, namespaceLookup, scope); } @@ -78,7 +78,7 @@ export class TestGroup extends TestBlock { const trailingLine = Parser.parse(`if m.currentResult?.isFail = true then m.done() : return ${isSub ? '' : 'invalid'}`).ast.statements[0]; editor.arraySplice(owner, key + 1, 0, trailingLine); } - const leadingLine = Parser.parse(`m.currentAssertLineNumber = ${callExpression.range.start.line}`).ast.statements[0]; + const leadingLine = Parser.parse(`m.currentAssertLineNumber = ${callExpression.location.range.start.line}`).ast.statements[0]; editor.arraySplice(owner, key, 0, leadingLine); } } @@ -102,14 +102,14 @@ export class TestGroup extends TestBlock { let arg0 = callExpression.args[0]; let arg1 = callExpression.args[1]; if (isDottedGetExpression(callExpression.callee)) { - const nameText = callExpression.callee.name.text; + const nameText = callExpression.callee.tokens.name.text; isNotCalled = nameText === 'expectNotCalled'; isStubCall = nameText === 'stubCall'; if (isStubCall && this.shouldNotModifyStubCall(arg0, namespaceLookup, scope)) { return; } - editor.setProperty(callExpression.callee.name, 'text', `_${nameText}`); + editor.setProperty(callExpression.callee.tokens.name, 'text', `_${nameText}`); } if (brighterscript.isCallExpression(arg0) && isDottedGetExpression(arg0.callee)) { @@ -132,7 +132,11 @@ export class TestGroup extends TestBlock { let functionName = nameParts.join('_').toLowerCase(); editor.removeFromArray(callExpression.args, 0); if (!isNotCalled && !isStubCall) { - const expectedArgs = new ArrayLiteralExpression(arg0.args, createToken(TokenKind.LeftSquareBracket), createToken(TokenKind.RightSquareBracket)); + const expectedArgs = new ArrayLiteralExpression({ + elements: arg0.args, + open: createToken(TokenKind.LeftSquareBracket), + close: createToken(TokenKind.RightSquareBracket) + }); editor.addToArray(callExpression.args, 0, expectedArgs); } editor.addToArray(callExpression.args, 0, createInvalidLiteral()); @@ -141,11 +145,15 @@ export class TestGroup extends TestBlock { editor.addToArray(callExpression.args, 0, brighterscript.createVariableExpression(functionName)); this.testSuite.session.globalStubbedMethods.add(functionName); } else { - let functionName = arg0.callee.name.text; + let functionName = arg0.callee.tokens.name.text; let fullPath = getStringPathFromDottedGet(arg0.callee.obj as DottedGetExpression); editor.removeFromArray(callExpression.args, 0); if (!isNotCalled && !isStubCall) { - const expectedArgs = new ArrayLiteralExpression(arg0.args, createToken(TokenKind.LeftSquareBracket), createToken(TokenKind.RightSquareBracket)); + const expectedArgs = new ArrayLiteralExpression({ + elements: arg0.args, + open: createToken(TokenKind.LeftSquareBracket), + close: createToken(TokenKind.RightSquareBracket) + }); editor.addToArray(callExpression.args, 0, expectedArgs); } editor.addToArray(callExpression.args, 0, fullPath ?? createInvalidLiteral()); @@ -155,7 +163,7 @@ export class TestGroup extends TestBlock { } } } else if (brighterscript.isDottedGetExpression(arg0)) { - let functionName = arg0.name.text; + let functionName = arg0.tokens.name.text; let fullPath = getStringPathFromDottedGet(arg0.obj as DottedGetExpression); arg0 = callExpression.args[0] as DottedGetExpression; editor.removeFromArray(callExpression.args, 0); @@ -167,14 +175,18 @@ export class TestGroup extends TestBlock { editor.addToArray(callExpression.args, 0, createStringLiteral(functionName)); editor.addToArray(callExpression.args, 0, (arg0 as DottedGetExpression).obj); } else if (brighterscript.isCallfuncExpression(arg0)) { - let functionName = arg0.methodName.text; + let functionName = arg0.tokens.methodName.text; editor.removeFromArray(callExpression.args, 0); if (isNotCalled || isStubCall) { //TODO in future we can improve is notCalled to know which callFunc function it is // const expectedArgs = new ArrayLiteralExpression([createStringLiteral(functionName)], createToken(TokenKind.LeftSquareBracket), createToken(TokenKind.RightSquareBracket)); // editor.addToArray(callExpression.args, 0, expectedArgs); } else { - const expectedArgs = new ArrayLiteralExpression([createStringLiteral(functionName), ...arg0.args], createToken(TokenKind.LeftSquareBracket), createToken(TokenKind.RightSquareBracket)); + const expectedArgs = new ArrayLiteralExpression({ + elements: [createStringLiteral(functionName), ...arg0.args], + open: createToken(TokenKind.LeftSquareBracket), + close: createToken(TokenKind.RightSquareBracket) + }); editor.addToArray(callExpression.args, 0, expectedArgs); } let fullPath = getStringPathFromDottedGet(arg0.callee as DottedGetExpression); @@ -186,7 +198,11 @@ export class TestGroup extends TestBlock { let functionName = arg0.callee.getName(brighterscript.ParseMode.BrightScript); editor.removeFromArray(callExpression.args, 0); if (!isNotCalled && !isStubCall) { - const expectedArgs = new ArrayLiteralExpression(arg0.args, createToken(TokenKind.LeftSquareBracket), createToken(TokenKind.RightSquareBracket)); + const expectedArgs = new ArrayLiteralExpression({ + elements: arg0.args, + open: createToken(TokenKind.LeftSquareBracket), + close: createToken(TokenKind.RightSquareBracket) + }); editor.addToArray(callExpression.args, 0, expectedArgs); } editor.addToArray(callExpression.args, 0, createInvalidLiteral()); @@ -204,7 +220,7 @@ export class TestGroup extends TestBlock { return scope.getCallableByName(functionName); } else if (brighterscript.isVariableExpression(arg0)) { return ( - scope.symbolTable.hasSymbol(arg0.getName(ParseMode.BrightScript)) || + scope.symbolTable.hasSymbol(arg0.getName(ParseMode.BrightScript), brighterscript.SymbolTypeFlag.runtime) || scope.getCallableByName(arg0.getName(ParseMode.BrighterScript)) ); } @@ -220,7 +236,7 @@ export class TestGroup extends TestBlock { isSolo: ${this.isSolo} isIgnored: ${this.isIgnored} filename: "${this.pkgPath}" - lineNumber: "${this.annotation.annotation.range.start.line}" + lineNumber: ${this.annotation.annotation.location.range.start.line} setupFunctionName: "${this.setupFunctionName || ''}" tearDownFunctionName: "${this.tearDownFunctionName || ''}" beforeEachFunctionName: "${this.beforeEachFunctionName || ''}" diff --git a/bsc-plugin/src/lib/rooibos/TestSuite.ts b/bsc-plugin/src/lib/rooibos/TestSuite.ts index 076dc6b5..a3fdf430 100644 --- a/bsc-plugin/src/lib/rooibos/TestSuite.ts +++ b/bsc-plugin/src/lib/rooibos/TestSuite.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import type { AstEditor, BrsFile, ClassStatement } from 'brighterscript'; +import type { Editor, BrsFile, ClassStatement } from 'brighterscript'; import { diagnosticNodeTestIllegalNode, diagnosticNodeTestRequiresNode } from '../utils/Diagnostics'; @@ -26,7 +26,7 @@ export class TestBlock { } public get filePath(): string { - return this.file.pathAbsolute; + return this.file.srcPath; } public get name(): string { @@ -71,7 +71,7 @@ export class TestSuite extends TestBlock { this.isNodeTest = annotation.nodeName && annotation.nodeName.trim() !== ''; this.nodeName = annotation.nodeName?.trim(); if (!this.name) { - this.annotation.name = classStatement.name.text; + this.annotation.name = classStatement.tokens.name.text; } this.generatedNodeName = (this.name || 'ERROR').replace(/[^a-zA-Z0-9]/g, '_'); let pathBase = path.join('components', 'rooibos', 'generated'); @@ -105,7 +105,7 @@ export class TestSuite extends TestBlock { this.isValid = true; } - public addDataFunctions(editor: AstEditor) { + public addDataFunctions(editor: Editor) { if (this.isIncluded) { addOverriddenMethod(this.file, this.annotation.annotation, this.classStatement, 'getTestSuiteData', `return ${this.asText()}`, editor); } @@ -136,7 +136,7 @@ export class TestSuite extends TestBlock { isIgnored: ${this.isIgnored} pkgPath: "${this.pkgPath}" filePath: "${this.filePath}" - lineNumber: ${this.classStatement.range.start.line + 1} + lineNumber: ${this.classStatement.location.range.start.line + 1} valid: ${this.isValid} hasFailures: ${this.hasFailures} hasSoloTests: ${this.hasSoloTests} diff --git a/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.spec.ts b/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.spec.ts index 75c8e18f..130a4a35 100644 --- a/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.spec.ts +++ b/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.spec.ts @@ -1178,7 +1178,7 @@ function assertParamTestCase(testSuite: TestSuite, groupIndex: number, testIndex } function createTestSuite(path: string, text: string): TestSuite { - let file = new BrsFile(path, path, program); + let file = new BrsFile({ srcPath: path, destPath: path, program: program }); file.parse(text); let testSuites = testSuiteBuilder.processFile(file); return testSuites.length > 0 ? testSuites[0] : null; diff --git a/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.ts b/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.ts index e7dfac3b..d463f234 100644 --- a/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.ts +++ b/bsc-plugin/src/lib/rooibos/TestSuiteBuilder.ts @@ -1,11 +1,12 @@ import type { BrsFile, - ClassMethodStatement, + MethodStatement, ClassStatement } from 'brighterscript'; import { - isClassMethodStatement + isMethodStatement, + util } from 'brighterscript'; import { TestGroup } from './TestGroup'; @@ -29,6 +30,7 @@ import { diagnosticTestWithArgsButNoParams } from '../utils/Diagnostics'; import type { RooibosSession } from './RooibosSession'; +import { getFileLookups } from './Utils'; export class TestSuiteBuilder { constructor(public session: RooibosSession) { @@ -44,7 +46,7 @@ export class TestSuiteBuilder { this.file = file; let suites = []; try { - for (let cs of file.parser.references.classStatements) { + for (let cs of getFileLookups(file).classStatements) { //a test is comprised of a comment block; followed by a class let annotation = RooibosAnnotation.getAnnotation(file, cs)?.blockAnnotation; @@ -73,8 +75,8 @@ export class TestSuiteBuilder { let oldSuite = this.session.sessionInfo.testSuites.get(annotation.name); let suite = this.processClass(annotation, s); let isDuplicate = false; - if ((oldSuite && oldSuite.file.pathAbsolute !== - file.pathAbsolute)) { + if ((oldSuite && oldSuite.file.srcPath !== + file.srcPath)) { oldSuite.isValid = false; suite.isValid = false; diagnosticDuplicateSuite(file, oldSuite.classStatement, oldSuite.annotation); @@ -121,7 +123,7 @@ export class TestSuiteBuilder { } this.annotation = testAnnotation; - if (isClassMethodStatement(s)) { + if (isMethodStatement(s)) { this.processClassMethod(s); } this.annotation = null; @@ -130,7 +132,9 @@ export class TestSuiteBuilder { if (this.currentGroup) { this.testSuite.addGroup(this.currentGroup); } - this.testSuite.isValid = this.testSuite.file.getDiagnostics().length === 0; + this.testSuite.isValid = this.testSuite.file.program.diagnostics.getDiagnostics().filter((diag) => { + return diag.location.uri === util.pathToUri(this.file.srcPath); + }).length === 0; return this.testSuite; } @@ -145,7 +149,7 @@ export class TestSuiteBuilder { } } - public processClassMethod(statement: ClassMethodStatement) { + public processClassMethod(statement: MethodStatement) { if (this.annotation) { if (!this.currentGroup) { @@ -156,25 +160,25 @@ export class TestSuiteBuilder { this.createTestCases(statement, this.annotation); break; case AnnotationType.Setup: - this.currentGroup.setupFunctionName = statement.name.text; + this.currentGroup.setupFunctionName = statement.tokens.name.text; if (statement.func.parameters.length > 0) { diagnosticWrongParameterCount(this.file, statement, 0); } break; case AnnotationType.TearDown: - this.currentGroup.tearDownFunctionName = statement.name.text; + this.currentGroup.tearDownFunctionName = statement.tokens.name.text; if (statement.func.parameters.length > 0) { diagnosticWrongParameterCount(this.file, statement, 0); } break; case AnnotationType.BeforeEach: - this.currentGroup.beforeEachFunctionName = statement.name.text; + this.currentGroup.beforeEachFunctionName = statement.tokens.name.text; if (statement.func.parameters.length > 0) { diagnosticWrongParameterCount(this.file, statement, 0); } break; case AnnotationType.AfterEach: - this.currentGroup.afterEachFunctionName = statement.name.text; + this.currentGroup.afterEachFunctionName = statement.tokens.name.text; if (statement.func.parameters.length > 0) { diagnosticWrongParameterCount(this.file, statement, 0); } @@ -188,8 +192,8 @@ export class TestSuiteBuilder { private sanitizeFunctionName(name: string) { return name.replace(/[^0-9_a-z]/ig, '_'); } - public createTestCases(statement: ClassMethodStatement, annotation: RooibosAnnotation): boolean { - const lineNumber = statement.func.range.start.line; + public createTestCases(statement: MethodStatement, annotation: RooibosAnnotation): boolean { + const lineNumber = statement.func.location.range.start.line; const numberOfArgs = statement.func.parameters.length; const numberOfParams = annotation.params.length; if (this.currentGroup.testCases.has(annotation.name) || this.currentGroup.testCases.get(annotation.name + '0')?.paramLineNumber) { @@ -199,8 +203,8 @@ export class TestSuiteBuilder { } let sanitizedTestName = this.sanitizeFunctionName(this.currentGroup.name) + '_' + this.sanitizeFunctionName(annotation.name); - statement.name.text = sanitizedTestName; - statement.func.functionStatement.name.text = sanitizedTestName; + statement.tokens.name.text = sanitizedTestName; + statement.func.functionStatement.tokens.name.text = sanitizedTestName; if (numberOfParams > 0) { let index = 0; @@ -209,7 +213,7 @@ export class TestSuiteBuilder { let isSolo = annotation.hasSoloParams ? param.isSolo : annotation.isSolo; let isIgnore = annotation.isIgnore ? true : param.isIgnore; this.currentGroup.addTestCase( - new TestCase(annotation, annotation.name, statement.name.text, isSolo, isIgnore, lineNumber, param.params, index, param.lineNumber, numberOfArgs) + new TestCase(annotation, annotation.name, statement.tokens.name.text, isSolo, isIgnore, lineNumber, param.params, index, param.lineNumber, numberOfArgs) ); } else { diagnosticWrongTestParameterCount(this.file, param.annotation, param.params.length, numberOfArgs); @@ -221,7 +225,7 @@ export class TestSuiteBuilder { } else if (numberOfParams === 0) { if (numberOfArgs === 0) { this.currentGroup.addTestCase( - new TestCase(annotation, annotation.name, statement.name.text, annotation.isSolo, annotation.isIgnore, lineNumber) + new TestCase(annotation, annotation.name, statement.tokens.name.text, annotation.isSolo, annotation.isIgnore, lineNumber) ); } else { diagnosticTestWithArgsButNoParams(this.file, annotation.annotation, numberOfArgs); diff --git a/bsc-plugin/src/lib/rooibos/Utils.ts b/bsc-plugin/src/lib/rooibos/Utils.ts index 7b3d788e..6e50a32b 100644 --- a/bsc-plugin/src/lib/rooibos/Utils.ts +++ b/bsc-plugin/src/lib/rooibos/Utils.ts @@ -1,25 +1,32 @@ -import type { AnnotationExpression, AstEditor, BrsFile, ClassStatement, Expression, FunctionStatement } from 'brighterscript'; +import type { AnnotationExpression, Editor, BrsFile, ClassStatement, Expression, FunctionStatement } from 'brighterscript'; +import type { CachedLookups } from 'brighterscript/dist/astUtils/CachedLookups'; import { TokenKind, isXmlScope } from 'brighterscript'; import * as brighterscript from 'brighterscript'; import { diagnosticCorruptTestProduced } from '../utils/Diagnostics'; import type { TestSuite } from './TestSuite'; -export function addOverriddenMethod(file: BrsFile, annotation: AnnotationExpression, target: ClassStatement, name: string, source: string, editor: AstEditor): boolean { +export function addOverriddenMethod(file: BrsFile, annotation: AnnotationExpression, target: ClassStatement, name: string, source: string, editor: Editor): boolean { let functionSource = ` function ${name}() ${source} end function `; - let { statements, diagnostics } = brighterscript.Parser.parse(functionSource, { mode: brighterscript.ParseMode.BrighterScript }); + let { ast, diagnostics } = brighterscript.Parser.parse(functionSource, { mode: brighterscript.ParseMode.BrighterScript }); + let statements = ast.statements; let error = ''; if (statements && statements.length > 0) { let statement = statements[0] as FunctionStatement; if (statement.func.body.statements.length > 0) { - let p = brighterscript.createToken(brighterscript.TokenKind.Public, 'public', target.range); - let o = brighterscript.createToken(brighterscript.TokenKind.Override, 'override', target.range); - let n = brighterscript.createIdentifier(name, target.range); - let method = new brighterscript.ClassMethodStatement(p, n, statement.func, o); + let p = brighterscript.createToken(brighterscript.TokenKind.Public, 'public', target.location); + let o = brighterscript.createToken(brighterscript.TokenKind.Override, 'override', target.location); + let n = brighterscript.createIdentifier(name, target.location); + let method = new brighterscript.MethodStatement({ + modifiers: [p], + name: n, + func: statement.func, + override: o + }); //bsc has a quirk where it auto-adds a `new` method if missing. That messes with our AST editing, so //trigger that functionality BEFORE performing AstEditor operations. TODO remove this whenever bsc stops doing this. // eslint-disable-next-line @typescript-eslint/dot-notation @@ -39,22 +46,26 @@ export function sanitizeBsJsonString(text: string) { } export function functionRequiresReturnValue(statement: FunctionStatement) { - const returnTypeToken = statement.func.returnTypeToken; - const functionType = statement.func.functionType; - return !((functionType?.kind === TokenKind.Sub && (returnTypeToken === undefined || returnTypeToken?.kind === TokenKind.Void)) || returnTypeToken?.kind === TokenKind.Void); + const functionReturnType = statement.func.getType({ flags: brighterscript.SymbolTypeFlag.typetime }).returnType; + return !brighterscript.isVoidType(functionReturnType); } export function getAllDottedGetParts(dg: brighterscript.DottedGetExpression) { - let parts = [dg?.name?.text]; + + // TODO - Similar function in brighterscript.utils + + let parts = [dg?.tokens.name?.text]; let nextPart = dg.obj; while (brighterscript.isDottedGetExpression(nextPart) || brighterscript.isVariableExpression(nextPart)) { - parts.push(nextPart?.name?.text); + parts.push(nextPart?.tokens.name?.text); nextPart = brighterscript.isDottedGetExpression(nextPart) ? nextPart.obj : undefined; } return parts.reverse(); } export function getRootObjectFromDottedGet(value: brighterscript.DottedGetExpression) { + // TODO - Similar function in brighterscript.utils + let root; if (brighterscript.isDottedGetExpression(value) || brighterscript.isIndexedGetExpression(value)) { @@ -70,6 +81,8 @@ export function getRootObjectFromDottedGet(value: brighterscript.DottedGetExpres } export function getStringPathFromDottedGet(value: brighterscript.DottedGetExpression) { + // TODO - Similar function in brighterscript.utils + let parts = [getPathValuePartAsString(value)]; let root; root = value.obj; @@ -89,18 +102,19 @@ export function getPathValuePartAsString(expr: Expression) { return undefined; } if (brighterscript.isVariableExpression(expr)) { - return expr.name.text; + return expr.tokens.name.text; } if (!expr) { return undefined; } if (brighterscript.isDottedGetExpression(expr)) { - return expr.name.text; + return expr.tokens.name.text; } else if (brighterscript.isIndexedGetExpression(expr)) { - if (brighterscript.isLiteralExpression(expr.index)) { - return `${expr.index.token.text.replace(/^"/, '').replace(/"$/, '')}`; - } else if (brighterscript.isVariableExpression(expr.index)) { - return `${expr.index.name.text}`; + const firstIndex = expr.indexes[0]; + if (brighterscript.isLiteralExpression(firstIndex)) { + return `${firstIndex.tokens.value.text.replace(/^"/, '').replace(/"$/, '')}`; + } else if (brighterscript.isVariableExpression(firstIndex)) { + return `${firstIndex.tokens.name.text}`; } } } @@ -115,3 +129,12 @@ export function getScopeForSuite(testSuite: TestSuite) { return testSuite.file.program.getFirstScopeForFile(testSuite.file); } } + +export function getFileLookups(file: BrsFile): CachedLookups { + // eslint-disable-next-line @typescript-eslint/dot-notation + return file['_cachedLookups'] as CachedLookups; +} + +export function getMainFunctionStatement(file: BrsFile) { + return getFileLookups(file).functionStatements.find((fs) => fs.tokens.name.text === 'main'); +} diff --git a/bsc-plugin/src/lib/utils/Diagnostics.ts b/bsc-plugin/src/lib/utils/Diagnostics.ts index e967b7e7..64384133 100644 --- a/bsc-plugin/src/lib/utils/Diagnostics.ts +++ b/bsc-plugin/src/lib/utils/Diagnostics.ts @@ -1,10 +1,10 @@ -import type { BrsFile, ClassStatement, FunctionStatement, Statement, BscFile, AnnotationExpression } from 'brighterscript'; -import { DiagnosticSeverity, Range } from 'brighterscript'; +import type { BrsFile, ClassStatement, FunctionStatement, Statement, BscFile, AnnotationExpression, BsDiagnostic } from 'brighterscript'; +import { DiagnosticSeverity, Range, util } from 'brighterscript'; import type { AnnotationType, RooibosAnnotation } from '../rooibos/Annotation'; function addDiagnostic( - file: BscFile, + file: BrsFile, code: number, message: string, startLine = 0, @@ -14,7 +14,10 @@ function addDiagnostic( severity: DiagnosticSeverity = DiagnosticSeverity.Error ) { endLine = endLine === -1 ? startLine : endLine; - file.addDiagnostics([createDiagnostic(file, code, message, startLine, startCol, endLine, endCol, severity)]); + file.program.diagnostics.register( + createDiagnostic(file, code, message, startLine, startCol, endLine, endCol, severity), + { tags: ['rooibos'] } + ); } function addDiagnosticForStatement( @@ -24,23 +27,29 @@ function addDiagnosticForStatement( statement: Statement, severity: DiagnosticSeverity = DiagnosticSeverity.Error ) { - let line = statement.range.start.line; - let col = statement.range.start.character; - file.addDiagnostics([createDiagnostic(file, code, message, line, col, line, 999999, severity)]); + let line = statement.location.range.start.line; + let col = statement.location.range.start.character; + file.program.diagnostics.register( + createDiagnostic(file, code, message, line, col, line, 999999, severity), + { tags: ['rooibos'] } + ); } function addDiagnosticForAnnotation( - file: BscFile, + file: BrsFile, code: number, message: string, annotation: AnnotationExpression, severity: DiagnosticSeverity = DiagnosticSeverity.Error, endChar?: number ) { - let line = annotation.range.start.line; - let col = annotation.range.start.character; + let line = annotation.location.range.start.line; + let col = annotation.location.range.start.character; - file.addDiagnostics([createDiagnostic(file, code, message, line, col, annotation.range.end.line, annotation.range.end.character + 9999, severity)]); + file.program.diagnostics.register( + createDiagnostic(file, code, message, line, col, annotation.location.range.end.line, annotation.location.range.end.character + 9999, severity), + { tags: ['rooibos'] } + ); } function createDiagnostic( @@ -52,12 +61,11 @@ function createDiagnostic( endLine = 0, endCol = 99999, severity: DiagnosticSeverity = DiagnosticSeverity.Error -) { +): BsDiagnostic { const diagnostic = { code: `RBS${code}`, message: message, - range: Range.create(startLine, startCol, endLine, endCol), - file: bscFile, + location: util.createLocationFromFileRange(bscFile, Range.create(startLine, startCol, endLine, endCol)), severity: severity }; return diagnostic; @@ -89,7 +97,7 @@ export function diagnosticWrongParameterCount(file: BrsFile, statement: Function addDiagnosticForStatement( file, 2202, - `Function ${statement.name} defined with wrong number of params: expected ${expectedParamCount}`, + `Function ${statement.tokens.name} defined with wrong number of params: expected ${expectedParamCount}`, statement ); } @@ -183,7 +191,7 @@ export function diagnosticErrorProcessingFile(file: BrsFile, message: string) { ); } -export function diagnosticErrorNoMainFound(file: BscFile) { +export function diagnosticErrorNoMainFound(file: BrsFile) { addDiagnostic( file, 2213, @@ -255,7 +263,7 @@ export function diagnosticCorruptTestProduced(file: BrsFile, annotation: Annotat ); } -export function diagnosticNoStagingDir(file: BscFile) { +export function diagnosticNoStagingDir(file: BrsFile) { addDiagnostic( file, 2221, diff --git a/bsc-plugin/src/plugin.spec.ts b/bsc-plugin/src/plugin.spec.ts index dbe5bcd4..022b4166 100644 --- a/bsc-plugin/src/plugin.spec.ts +++ b/bsc-plugin/src/plugin.spec.ts @@ -1,4 +1,4 @@ -import type { BrsFile, CallExpression, ClassMethodStatement, ClassStatement, ExpressionStatement, FunctionStatement } from 'brighterscript'; +import type { BrsFile, CallExpression, MethodStatement, ClassStatement, ExpressionStatement, FunctionStatement } from 'brighterscript'; import { CallfuncExpression, DiagnosticSeverity, DottedGetExpression, Position, Program, ProgramBuilder, util, standardizePath as s, PrintStatement } from 'brighterscript'; import { expect } from 'chai'; import { RooibosPlugin } from './plugin'; @@ -6,12 +6,13 @@ import * as fsExtra from 'fs-extra'; import * as path from 'path'; import undent from 'undent'; import { SourceMapConsumer } from 'source-map'; +import { getFileLookups } from './lib/rooibos/Utils'; let tmpPath = s`${process.cwd()}/tmp`; let _rootDir = s`${tmpPath}/rootDir`; let _stagingFolderPath = s`${tmpPath}/staging`; const version = fsExtra.readJsonSync(__dirname + '/../package.json').version; -describe('RooibosPlugin', () => { +describe.only('RooibosPlugin', () => { let program: Program; let builder: ProgramBuilder; let plugin: RooibosPlugin; @@ -29,9 +30,9 @@ describe('RooibosPlugin', () => { program = builder.program; program.plugins.add(plugin); program.createSourceScope(); //ensure source scope is created - plugin.beforeProgramCreate(builder); + plugin.beforeProgramCreate({ builder: builder }); plugin.fileFactory['options'].frameworkSourcePath = path.resolve(path.join('../framework/src/source')); - plugin.afterProgramCreate(program); + plugin.afterProgramCreate({ program: program, builder: builder }); } function destroyProgram() { @@ -428,7 +429,7 @@ describe('RooibosPlugin', () => { }); it('test full transpile', async () => { - plugin.afterProgramCreate(program); + plugin.afterProgramCreate({ program: program, builder: builder }); // program.validate(); const file = program.setFile('source/test.spec.bs', ` @suite @@ -440,7 +441,7 @@ describe('RooibosPlugin', () => { end class `); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -497,7 +498,7 @@ describe('RooibosPlugin', () => { isSolo: false isIgnored: false filename: "${s`source/test.spec.bs`}" - lineNumber: "3" + lineNumber: 3 setupFunctionName: "" tearDownFunctionName: "" beforeEachFunctionName: "" @@ -537,13 +538,13 @@ describe('RooibosPlugin', () => { //verify the AST was restored after transpile const cls = file.ast.statements[0] as ClassStatement; - expect(cls.body.find((x: ClassMethodStatement) => { - return x.name?.text.toLowerCase() === 'getTestSuiteData'.toLowerCase(); + expect(cls.body.find((x: MethodStatement) => { + return x.tokens.name?.text.toLowerCase() === 'getTestSuiteData'.toLowerCase(); })).not.to.exist; }); it('test full transpile with complex params', async () => { - plugin.afterProgramCreate(program); + plugin.afterProgramCreate({ program: program, builder: builder }); // program.validate(); program.setFile('source/test.spec.bs', ` @suite @@ -556,7 +557,7 @@ describe('RooibosPlugin', () => { end class `); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -575,7 +576,7 @@ describe('RooibosPlugin', () => { }); it('adds launch hook to existing main function', async () => { - plugin.afterProgramCreate(program); + plugin.afterProgramCreate({ program: program, builder: builder }); // program.validate(); const file = program.setFile('source/main.bs', ` sub main() @@ -583,7 +584,7 @@ describe('RooibosPlugin', () => { end sub `); program.validate(); - await builder.transpile(); + await builder.build(); expect( getContents('main.brs') @@ -594,7 +595,7 @@ describe('RooibosPlugin', () => { end sub `); //the AST should not have been permanently modified - const statements = (file.parser.statements[0] as FunctionStatement).func.body.statements; + const statements = (file.parser.ast.statements[0] as FunctionStatement).func.body.statements; expect(statements).to.be.lengthOf(1); expect(statements[0]).to.be.instanceof(PrintStatement); }); @@ -616,7 +617,7 @@ describe('RooibosPlugin', () => { end sub `); program.validate(); - await builder.transpile(); + await builder.build(); expect( getContents('main.brs') @@ -627,7 +628,7 @@ describe('RooibosPlugin', () => { end sub `); //the AST should not have been permanently modified - const statements = (file.parser.statements[0] as FunctionStatement).func.body.statements; + const statements = (file.parser.ast.statements[0] as FunctionStatement).func.body.statements; expect(statements).to.be.lengthOf(1); expect(statements[0]).to.be.instanceof(PrintStatement); }); @@ -650,7 +651,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const testContents = getTestFunctionContents(); expect( testContents @@ -709,7 +710,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -743,7 +744,7 @@ describe('RooibosPlugin', () => { end class `); program.validate(); - await builder.transpile(); + await builder.build(); expect(program.getDiagnostics().filter((d) => d.code !== 'RBS2213')).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; const testContents = getTestFunctionContents(); @@ -797,7 +798,7 @@ describe('RooibosPlugin', () => { end class `); program.validate(); - await builder.transpile(); + await builder.build(); expect(program.getDiagnostics().filter((d) => d.code !== 'RBS2213')).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; expect( @@ -850,7 +851,7 @@ describe('RooibosPlugin', () => { end class `); program.validate(); - await builder.transpile(); + await builder.build(); program.validate(); expect(program.getDiagnostics().filter((d) => d.code !== 'RBS2213')).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; @@ -911,7 +912,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; // expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const testContents = getTestFunctionContents(); expect( testContents @@ -948,7 +949,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const testContents = getTestFunctionContents(); expect( testContents @@ -1012,7 +1013,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const testText = getTestFunctionContents(); expect( testText @@ -1103,7 +1104,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const testText = getTestFunctionContents(); expect( testText @@ -1189,7 +1190,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1215,7 +1216,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1240,7 +1241,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1269,7 +1270,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1298,7 +1299,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1339,7 +1340,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const result = getTestFunctionContents(); expect( result @@ -1399,7 +1400,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const result = getTestFunctionContents(); expect( result @@ -1460,7 +1461,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const result = getTestFunctionContents(); expect( result @@ -1521,7 +1522,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const result = getTestFunctionContents(); expect( result @@ -1582,7 +1583,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const result = getTestFunctionContents(); expect( result @@ -1645,7 +1646,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1685,7 +1686,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1732,7 +1733,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1751,17 +1752,17 @@ describe('RooibosPlugin', () => { end if `); //verify original code does not remain modified after the transpile cycle - const testMethod = ((file.ast.statements[0] as ClassStatement).memberMap['_'] as ClassMethodStatement); + const testMethod = ((file.ast.statements[0] as ClassStatement).memberMap['_'] as MethodStatement); const call1 = (testMethod.func.body.statements[1] as ExpressionStatement).expression as CallExpression; expect(call1.args).to.be.lengthOf(1); expect(call1.args[0]).to.be.instanceof(CallfuncExpression); - expect((call1.args[0] as CallfuncExpression).methodName.text).to.eql('getFunction'); + expect((call1.args[0] as CallfuncExpression).tokens.methodName.text).to.eql('getFunction'); const call2 = (testMethod.func.body.statements[2] as ExpressionStatement).expression as CallExpression; expect(call2.args).to.be.lengthOf(1); expect(call2.args[0]).to.be.instanceof(CallfuncExpression); - expect((call2.args[0] as CallfuncExpression).methodName.text).to.eql('getFunction'); + expect((call2.args[0] as CallfuncExpression).tokens.methodName.text).to.eql('getFunction'); }); @@ -1779,7 +1780,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1791,12 +1792,12 @@ describe('RooibosPlugin', () => { end if `); //verify original code does not remain modified after the transpile cycle - const testMethod = ((file.ast.statements[0] as ClassStatement).memberMap['_'] as ClassMethodStatement); + const testMethod = ((file.ast.statements[0] as ClassStatement).memberMap['_'] as MethodStatement); const call = (testMethod.func.body.statements[0] as ExpressionStatement).expression as CallExpression; const arg0 = call.args[0] as DottedGetExpression; expect(call.args).to.be.lengthOf(1); expect(arg0).to.be.instanceof(DottedGetExpression); - expect(arg0.name.text).to.eql('getFunctionField'); + expect(arg0.tokens.name.text).to.eql('getFunctionField'); }); it('correctly transpiles function invocations', async () => { @@ -1816,7 +1817,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() ).to.eql(undent` @@ -1862,7 +1863,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; expect(plugin.session.sessionInfo.testSuitesToRun).to.not.be.empty; - await builder.transpile(); + await builder.build(); const testContents = getTestFunctionContents(); expect( testContents @@ -1921,7 +1922,7 @@ describe('RooibosPlugin', () => { plugin.session.sessionInfo.includeTags = ['one']; program.setFile('source/test.spec.bs', testSource); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -1934,7 +1935,7 @@ describe('RooibosPlugin', () => { plugin.session.sessionInfo.includeTags = ['two']; program.setFile('source/test.spec.bs', testSource); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -1946,7 +1947,7 @@ describe('RooibosPlugin', () => { plugin.session.sessionInfo.includeTags = ['three']; program.setFile('source/test.spec.bs', testSource); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -1958,7 +1959,7 @@ describe('RooibosPlugin', () => { plugin.session.sessionInfo.excludeTags = ['exclude']; program.setFile('source/test.spec.bs', testSource); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -1971,7 +1972,7 @@ describe('RooibosPlugin', () => { plugin.session.sessionInfo.excludeTags = ['exclude']; program.setFile('source/test.spec.bs', testSource); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -1982,7 +1983,7 @@ describe('RooibosPlugin', () => { plugin.session.sessionInfo.includeTags = ['one', 'two']; program.setFile('source/test.spec.bs', testSource); program.validate(); - await builder.transpile(); + await builder.build(); console.log(builder.getDiagnostics()); expect(builder.getDiagnostics()).to.have.length(1); expect(builder.getDiagnostics()[0].severity).to.equal(DiagnosticSeverity.Warning); @@ -2054,8 +2055,8 @@ describe('RooibosPlugin', () => { function findMethod(methodName: string) { const file = program.getFile('source/rooibos/RuntimeConfig.bs'); - let classStatement = file.parser.references.classStatementLookup.get('rooibos.runtimeconfig'); - const method = classStatement.methods.find(x => x.name.text.toLowerCase() === methodName.toLowerCase()); + let classStatement = getFileLookups(file).classStatementMap.get('rooibos.runtimeconfig'); + const method = classStatement.methods.find(x => x.tokens.name.text.toLowerCase() === methodName.toLowerCase()); return method; } @@ -2065,7 +2066,7 @@ describe('RooibosPlugin', () => { expect(findMethod('getTestSuiteClassMap').func.body.statements).to.be.empty; expect(findMethod('getIgnoredTestInfo').func.body.statements).to.be.empty; - await builder.transpile(); + await builder.build(); expect( getTestFunctionContents() @@ -2172,7 +2173,7 @@ describe('RooibosPlugin', () => { program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); expect( getContents('rooibos/RuntimeConfig.brs') @@ -2312,7 +2313,7 @@ describe('RooibosPlugin', () => { program.validate(); //build the project - await builder.transpile(); + await builder.build(); const actualContents = getContents('test.spec.brs'); expect(actualContents).to.eql(undent`${expectedText}`); diff --git a/bsc-plugin/src/plugin.ts b/bsc-plugin/src/plugin.ts index 027bebd0..c8bb90af 100644 --- a/bsc-plugin/src/plugin.ts +++ b/bsc-plugin/src/plugin.ts @@ -4,12 +4,18 @@ import type { Program, ProgramBuilder, TranspileObj, - AstEditor, - BeforeFileTranspileEvent, - XmlFile + Editor, + XmlFile, + BeforeProgramCreateEvent, + AfterProgramCreateEvent, + AfterFileParseEvent, + AfterProgramValidateEvent, + OnPrepareFileEvent } from 'brighterscript'; import { - isBrsFile + isBrsFile, + isXmlFile, + util } from 'brighterscript'; import { RooibosSession } from './lib/rooibos/RooibosSession'; import { CodeCoverageProcessor } from './lib/rooibos/CodeCoverageProcessor'; @@ -30,7 +36,8 @@ export class RooibosPlugin implements CompilerPlugin { public _builder: ProgramBuilder; public config: RooibosConfig; - beforeProgramCreate(builder: ProgramBuilder): void { + beforeProgramCreate(event: BeforeProgramCreateEvent): void { + const builder = event.builder; this._builder = builder; this.config = this.getConfig((builder.options as any).rooibos || {}); @@ -111,8 +118,8 @@ export class RooibosPlugin implements CompilerPlugin { return config; } - afterProgramCreate(program: Program) { - this.fileFactory.addFrameworkFiles(program); + afterProgramCreate(event: AfterProgramCreateEvent) { + this.fileFactory.addFrameworkFiles(event.program); } afterFileDispose(file: BscFile) { @@ -124,9 +131,13 @@ export class RooibosPlugin implements CompilerPlugin { } } - afterFileParse(file: BscFile): void { + afterFileParse(event: AfterFileParseEvent): void { + const file = event.file; + if (!(isBrsFile(file) || isXmlFile(file))) { + return; + } // console.log('afp', file.pkgPath); - if (file.pathAbsolute.includes('/rooibos/bsc-plugin/dist/framework')) { + if (util.pathToUri(event.file.srcPath).includes('/rooibos/bsc-plugin/dist/framework')) { // eslint-disable-next-line @typescript-eslint/dot-notation file['diagnostics'] = []; return; @@ -151,16 +162,8 @@ export class RooibosPlugin implements CompilerPlugin { } } - beforeProgramTranspile(program: Program, entries: TranspileObj[], editor: AstEditor) { - this.session.prepareForTranspile(editor, program, this.mockUtil); - } - - afterProgramTranspile(program: Program, entries: TranspileObj[], editor: AstEditor) { - this.session.addLaunchHookFileIfNotPresent(); - this.codeCoverageProcessor.generateMetadata(this.config.isRecordingCodeCoverage, program); - } - - beforeFileTranspile(event: BeforeFileTranspileEvent) { + prepareFile(event: OnPrepareFileEvent) { + this.session.prepareForTranspile(event.editor, event.program, this.mockUtil); let testSuite = this.session.sessionInfo.testSuitesToRun.find((ts) => ts.file.pkgPath === event.file.pkgPath); if (testSuite) { const scope = getScopeForSuite(testSuite); @@ -193,7 +196,12 @@ export class RooibosPlugin implements CompilerPlugin { } } - afterProgramValidate(program: Program) { + afterProgramTranspile(program: Program, entries: TranspileObj[], editor: Editor) { + this.session.addLaunchHookFileIfNotPresent(); + this.codeCoverageProcessor.generateMetadata(this.config.isRecordingCodeCoverage, program); + } + + afterProgramValidate(event: AfterProgramValidateEvent) { // console.log('bpv'); this.session.updateSessionStats(); for (let testSuite of [...this.session.sessionInfo.testSuites.values()]) { @@ -210,7 +218,7 @@ export class RooibosPlugin implements CompilerPlugin { return true; } else { for (let filter of this.config.includeFilters) { - if (!minimatch(file.pathAbsolute, filter)) { + if (!minimatch(file.srcPath, filter)) { return false; } } diff --git a/bsconfig.json b/bsconfig.json index fba6c42a..e028c5da 100644 --- a/bsconfig.json +++ b/bsconfig.json @@ -7,7 +7,6 @@ ], "autoImportComponentScript": true, "createPackage": false, - "stagingFolderPath": "dist", "diagnosticFilters": [ { "src": "**/roku_modules/**/*.*", @@ -18,6 +17,6 @@ } ], "plugins": [ - "@rokucommunity/bslint" - ] + + ] } \ No newline at end of file diff --git a/framework/src/source/BaseTestSuite.bs b/framework/src/source/BaseTestSuite.bs index 87cf90eb..f7299b08 100644 --- a/framework/src/source/BaseTestSuite.bs +++ b/framework/src/source/BaseTestSuite.bs @@ -15,18 +15,18 @@ namespace rooibos protected hasIgnoredTests = false protected isSolo = false protected isIgnored = false - protected noCatch = false + public noCatch = false protected isNodeTest = false protected nodeName = invalid protected lineNumber = 1 - protected groups = [] + protected groups as TestGroup[] = [] protected groupsData = [] - protected stats = invalid + public stats as Stats = invalid protected currentAssertLineNumber = -1 protected valid = false - protected hasFailures = false + public hasFailures = false protected hasSoloGroups = false - protected isFailingFast = false + public isFailingFast = false protected stubs = invalid protected mocks = invalid protected __stubId = -1 @@ -38,21 +38,42 @@ namespace rooibos protected ignoreValue = "#ROIBOS#IGNORE_VALUE" ' special value used in mock arguments 'built in any matchers - protected anyStringMatcher = { "matcher": Rooibos_Matcher_anyString } - protected anyBoolMatcher = { "matcher": Rooibos_Matcher_anyBool } - protected anyNumberMatcher = { "matcher": Rooibos_Matcher_anyNumber } - protected anyAAMatcher = { "matcher": Rooibos_Matcher_anyAA } - protected anyArrayMatcher = { "matcher": Rooibos_Matcher_anyArray } - protected anyNodeMatcher = { "matcher": Rooibos_Matcher_anyNode } + protected anyStringMatcher = {"matcher": Rooibos_Matcher_anyString} + protected anyBoolMatcher = {"matcher": Rooibos_Matcher_anyBool} + protected anyNumberMatcher = {"matcher": Rooibos_Matcher_anyNumber} + protected anyAAMatcher = {"matcher": Rooibos_Matcher_anyAA} + protected anyArrayMatcher = {"matcher": Rooibos_Matcher_anyArray} + protected anyNodeMatcher = {"matcher": Rooibos_Matcher_anyNode} protected allowNonExistingMethodsOnMocks = true protected isAutoAssertingMocks = true - protected currentResult = invalid + protected currentResult as TestResult = invalid protected global = invalid - protected catchCrashes = false + public catchCrashes = false protected throwOnFailedAssertion = false + public isAsync = false + protected asyncTimeout = 0 + + protected generatedNodeName = "" + + public testRunner as TestRunner = invalid + + protected testTimer as roSGNodeTimer = invalid + protected currentTimeout as integer = 0 + + protected currentGroup as TestGroup = invalid + protected currentGroupIndex = -1 + + public isDoneCalled = false + + public top as NodeWithRooibosFields = invalid + + public tests as Test[] = [] + + protected isTestFailedDueToEarlyExit = false + '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ '++ base methods to override '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -84,7 +105,7 @@ namespace rooibos end if end function - function getTestSuiteData() + function getTestSuiteData() as TestSuiteData 'this will be injected by the plugin end function @@ -147,7 +168,7 @@ namespace rooibos end for if m.isNodeTest and m.testRunner.top <> invalid - m.testRunner.top.addFields({ asyncRooibosTestResult: { + m.testRunner.top.addFields({asyncRooibosTestResult: { stats: m.stats tests: m.tests groups: m.groups @@ -231,7 +252,7 @@ namespace rooibos private function finishAsyncGroups() m.testRunner.top.unobserveFieldScoped("rooibosGroupFinished") - m.testRunner.top.addFields({ asyncRooibosTestResult: { + m.testRunner.top.addFields({asyncRooibosTestResult: { stats: m.stats tests: m.tests groups: m.groups @@ -241,7 +262,7 @@ namespace rooibos m.testSuiteDone() end function - private function setTestTimer(duration) + public function setTestTimer(duration as integer) ' ? " SETTING TIMER FOR " duration if m.testTimer = invalid m.testTimer = createObject("roSGNode", "Timer") @@ -258,18 +279,18 @@ namespace rooibos end if end function - function runTest(test as rooibos.Test) + function runTest(testToRun as rooibos.Test) ? "" - ? rooibos.common.fillText(">>>>>> It: " + test.name, ">", 80) - ? ` Location: file://${test.testSuite.filePath.trim()}:${test.lineNumber}` + ? rooibos.common.fillText(">>>>>> It: " + testToRun.name, ">", 80) + ? ` Location: file://${testToRun.testSuite.filePath.trim()}:${testToRun.lineNumber}` ? "" - m.currentResult = test.result + m.currentResult = testToRun.result m.currentResult.throwOnFailedAssertion = m.throwOnFailedAssertion - if m.catchCrashes and not test.noCatch and not m.noCatch + if m.catchCrashes and not testToRun.noCatch and not m.noCatch try - test.run() - if m.isAutoAssertingMocks = true and not test.isAsync + testToRun.run() + if m.isAutoAssertingMocks = true and not testToRun.isAsync m.AssertMocks() m.CleanMocks() m.CleanStubs() @@ -279,15 +300,15 @@ namespace rooibos m.currentResult.crash("test crashed!", error) end try else - test.run() - if m.isAutoAssertingMocks = true and not test.isAsync + testToRun.run() + if m.isAutoAssertingMocks = true and not testToRun.isAsync m.AssertMocks() m.CleanMocks() m.CleanStubs() end if end if - ? rooibos.common.fillText("<<<< END It: " + test.name + " (" + m.currentResult.getStatusText() + ") ", "<", 80) + ? rooibos.common.fillText("<<<< END It: " + testToRun.name + " (" + m.currentResult.getStatusText() + ") ", "<", 80) end function @@ -1755,7 +1776,7 @@ namespace rooibos ' */ function stub(target, methodName, returnValue = invalid, allowNonExistingMethods = false) as object if target = invalid and not rooibos.common.isFunction(methodName) - m.fail("could not create Stub. Global function", methodName, ", is invalid") + m.fail(`could not create Stub. Global function ${methodName} is invalid`) return {} else if type(target) <> "roAssociativeArray" m.fail("could not create Stub provided target was null") @@ -2004,7 +2025,7 @@ namespace rooibos if target <> invalid and not rooibos.common.isFunction(target) and not rooibos.common.isAssociativeArray(target) methodName = "" - m.mockFail(lineNumber, "", "mock args: target should be an AA or in-scope Global function", methodName) + m.mockFail(lineNumber, "", "mock args: target should be an AA or in-scope Global function") else if not rooibos.common.isString(methodName) methodName = "" m.mockFail(lineNumber, "", "mock args: methodName was not a string") @@ -2751,7 +2772,7 @@ namespace rooibos 'thing.top.value, thing.top.value2, etc all over the place instance.append(nodeTop) instance.top = instance - instance.__rooibosSkipFields = { "top": true } + instance.__rooibosSkipFields = {"top": true} end if return instance end function @@ -2760,8 +2781,8 @@ namespace rooibos bundle = m.global.testStyleManager@.loadBundle(bundlePath) 'bs:disable-next-line ids = mv_getIdsFromStyleJson(mc_getArray(bundle, viewsPath)) - for each id in ids - instance[id] = { id: id } + for each id in (ids as roArray) + instance[id] = {id: id} end for end function diff --git a/framework/src/source/RuntimeConfig.bs b/framework/src/source/RuntimeConfig.bs index 788feae2..8d614129 100644 --- a/framework/src/source/RuntimeConfig.bs +++ b/framework/src/source/RuntimeConfig.bs @@ -1,29 +1,37 @@ namespace rooibos class RuntimeConfig + private testSuites as roAssociativeArray = {} + function new() m.testSuites = m.getTestSuiteClassMap() end function - function getVersionText() + function getVersionText() as string end function function getRuntimeConfig() end function - function getTestSuiteClassMap() + function getTestSuiteClassMap() as roAssociativeArray end function - function getTestSuiteClassWithName(name) + function getTestSuiteClassWithName(name) as BaseTestSuite return m.testSuites[name] end function - function getAllTestSuitesNames() + function getAllTestSuitesNames() as string[] return m.testSuites.keys() end function - function getIgnoredTestInfo() + function getIgnoredTestInfo() as IgnoredTestInfo end function end class + + interface IgnoredTestInfo + count as integer + items as roArray + end interface + end namespace \ No newline at end of file diff --git a/framework/src/source/Test.bs b/framework/src/source/Test.bs index f9af81b7..f44f1ed3 100644 --- a/framework/src/source/Test.bs +++ b/framework/src/source/Test.bs @@ -19,6 +19,9 @@ namespace rooibos public result = invalid + public isAsync = false + public asyncTimeout = 0 + function new(testGroup, data) m.testGroup = testGroup m.testSuite = testGroup.testSuite diff --git a/framework/src/source/TestConstructorData.bs b/framework/src/source/TestConstructorData.bs new file mode 100644 index 00000000..583bacab --- /dev/null +++ b/framework/src/source/TestConstructorData.bs @@ -0,0 +1,60 @@ +namespace rooibos + + interface TestSuiteData + name as string + isSolo as boolean + noCatch as boolean + isIgnored as boolean + pkgPath as string + filePath as string + lineNumber as integer + valid as boolean + hasFailures as boolean + hasSoloTests as boolean + hasIgnoredTests as boolean + hasSoloGroups as boolean + setupFunctionName as string + tearDownFunctionName as string + beforeEachFunctionName as string + afterEachFunctionName as string + isNodeTest as boolean + isAsync as boolean + asyncTimeout as integer + nodeName as string + generatedNodeName as string + testGroups as TestGroupData[] + end interface + + interface TestGroupData + name as string + isSolo as boolean + isIgnored as boolean + filename as string + lineNumber as integer + setupFunctionName as string + tearDownFunctionName as string + beforeEachFunctionName as string + afterEachFunctionName as string + testCases as TestCaseData [] + end interface + + interface TestCaseData + isSolo as boolean + noCatch as boolean + funcName as string + isIgnored as boolean + isAsync as boolean + asyncTimeout as integer + isParamTest as boolean + name as string + lineNumber as integer + paramLineNumber as integer + assertIndex as integer + assertLineNumberMap as roAssociativeArray + rawParams as roAssociativeArray + paramTestIndex as integer + expectedNumberOfParams as integer + isParamsValid as boolean + end interface + +end namespace \ No newline at end of file diff --git a/framework/src/source/TestGroup.bs b/framework/src/source/TestGroup.bs index f45098e3..0ae63a23 100644 --- a/framework/src/source/TestGroup.bs +++ b/framework/src/source/TestGroup.bs @@ -8,7 +8,7 @@ namespace rooibos 'test state name = "Unnamed Suite" - testSuite = invalid + testSuite as BaseTestSuite = invalid setupFunctionName = invalid tearDownFunctionName = invalid beforeEachFunctionName = invalid @@ -19,23 +19,27 @@ namespace rooibos stats = invalid scene = invalid lineNumber = 00 - top = invalid - valid = false + top as NodeWithRooibosFields = invalid hasFailures = false isNodeTest = false nodeName = invalid - testsData = invalid - tests = [] + testsData as TestCaseData[] = invalid + tests as Test[] = [] - function new(testSuite, data) + private isTestFailedDueToEarlyExit = false + + currentTest as Test = invalid + protected testTimer as roTimespan = invalid + + + testRunner as TestRunner + + function new(testSuite as BaseTestSuite, data as TestGroupData) m.testSuite = testSuite m.name = data.name - m.valid = data.valid m.hasFailures = testSuite.hasFailures m.isSolo = data.isSolo m.isIgnored = data.isIgnored - m.isAsync = data.isAsync - m.asyncTimeout = data.asyncTimeout m.testsData = data.testCases m.isNodeTest = false m.nodeName = invalid @@ -48,7 +52,7 @@ namespace rooibos 'bs:disable-next-line m.global = testSuite.global m.top = testSuite.top - m.scene = testSuite.scene + m.stats = new rooibos.Stats() end function @@ -77,18 +81,18 @@ namespace rooibos if isOk for each testData in m.testsData - test = new rooibos.Test(m, testData) - m.tests.push(test) + rooibosTest = new rooibos.Test(m, testData) + m.tests.push(rooibosTest) - isOk = m.runSuiteFunction(m.beforeEachFunctionName, "beforeEach", test) + isOk = m.runSuiteFunction(m.beforeEachFunctionName, "beforeEach", rooibosTest) if isOk m.testSuite.runTest(test) end if - m.runSuiteFunction(m.afterEachFunctionName, "afterEach", test) + m.runSuiteFunction(m.afterEachFunctionName, "afterEach", rooibosTest) - m.stats.appendTestResult(test.result) + m.stats.appendTestResult(rooibosTest.result) if m.stats.hasFailures and m.testSuite.isFailingFast ? "Terminating group due to failed test" @@ -135,20 +139,20 @@ namespace rooibos isOk = m.runSuiteFunction(m.beforeEachFunctionName, "beforeEach", m.currentTest) if isOk 'TODO - set a timeout here - test = m.currentTest - if test.isAsync <> true + currentTest = m.currentTest + if currentTest.isAsync <> true ? "Executing test synchronously" m.testSuite.runTest(test) m.testRunner.top.rooibosTestFinished = true m.onAsyncTestComplete() else m.testRunner.top.observeFieldScoped("rooibosTestFinished", "rooibos_onTestComplete") - if test.isAsync = true - m.testSuite.setTestTimer(test.asyncTimeout) + if currentTest.isAsync = true + m.testSuite.setTestTimer(currentTest.asyncTimeout) end if m.testSuite.runTest(test) - if test.result.isFail + if currentTest.result.isFail ? "Test failed before any async code could be executed" m.testRunner.top.unobserveFieldScoped("rooibosTestFinished") m.testRunner.top.rooibosTestFinished = true diff --git a/framework/src/source/TestRunner.bs b/framework/src/source/TestRunner.bs index adffa227..22c395b2 100644 --- a/framework/src/source/TestRunner.bs +++ b/framework/src/source/TestRunner.bs @@ -10,16 +10,19 @@ namespace rooibos ' * @description Creates an instance of the test runner ' */ class TestRunner - public testScene = invalid - public testReporters = [] + public testScene as roSGNodeScene = invalid + public testReporters as BaseTestReporter[] = [] public nodeContext = invalid public config = invalid - public testSuites = [] + public testSuites as BaseTestSuite[] = [] private runtimeConfig = invalid - private stats = invalid - private top = invalid + private stats as Stats = invalid + public top as NodeWithRooibosFields = invalid + private nodeTestName = "" + private currentTestSuite as BaseTestSuite = invalid + public currentGroup as TestGroup = invalid - public function new(testScene, nodeContext) + public function new(testScene as roSGNodeScene, nodeContext as roAssociativeArray) m.testScene = testScene if nodeContext.top = invalid nodeContext.top = testScene @@ -107,7 +110,7 @@ namespace rooibos for each reporter in m.testReporters if rooibos.common.isFunction(reporter.onEnd) - reporter.onEnd({ stats: m.stats }) + reporter.onEnd({stats: m.stats}) end if end for @@ -131,7 +134,7 @@ namespace rooibos end if end function - public function runInNodeMode(nodeTestName) + public function runInNodeMode(nodeTestName as string) 'bs:disable-next-line suiteClass = m.runtimeConfig.getTestSuiteClassWithName(nodeTestName) testSuite = invalid @@ -184,14 +187,14 @@ namespace rooibos if testSuite <> invalid return { stats: testSuite.stats - tests: testSuite.tests + tests: testSuite.tests ' WHAT IS THIS? } else - ? "[ERROR] could not create test suite " ; m.testRunner.nodeTestName + ? "[ERROR] could not create test suite " ; m.nodeTestName end if - ? "ERROR! (onTestSuiteComplete) executing node test " + m.testRunner.nodeTestName + " was unsuccessful." + ? "ERROR! (onTestSuiteComplete) executing node test " + m.nodeTestName + " was unsuccessful." return invalid end function @@ -245,7 +248,7 @@ namespace rooibos 'wait on the field if type(node) = "roSGNode" - m.groups = [] + for each groupData in testSuite.groupsData 'bs:disable-next-line group = new TestGroup(testSuite, groupData) @@ -353,4 +356,12 @@ namespace rooibos function onTestSuiteComplete() m.testRunner.onTestSuiteComplete() end function + + interface NodeWithRooibosFields extends roSGNode + rooibosSuiteFinished as boolean + rooibosTestFinished as boolean + rooibosTestIsAsync as boolean + rooibosGroupFinished as boolean + end interface + end namespace diff --git a/framework/src/source/Utils.bs b/framework/src/source/Utils.bs index 2a8e49fb..9bacb6a9 100644 --- a/framework/src/source/Utils.bs +++ b/framework/src/source/Utils.bs @@ -45,13 +45,13 @@ namespace rooibos.utils end function function addFields(fields) - m.append(fields) + (m as roAssociativeArray).append(fields) end function function setField(field, value) m[field] = value end function function setFields(fields) - m.append(fields) + (m as roAssociativeArray).append(fields) end function function observeField(field, callback) end function diff --git a/package-lock.json b/package-lock.json index a2b1adee..8a71f514 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,102 @@ "version": "1.0.0", "license": "MIT", "devDependencies": { - "@rokucommunity/bslint": "^0.5.0", - "brighterscript": "^0.61.3", - "ropm": "^0.5.0" + "@rokucommunity/bslint": "../bslint", + "@types/chai": "^4.1.2", + "@types/mocha": "^5.2.5", + "brighterscript": "^1.0.0-alpha.35", + "chai": "^4.2.0", + "ropm": "^0.5.0", + "ts-node": "^10.9.2", + "undent": "^0.1.0" + } + }, + "../bslint": { + "name": "@rokucommunity/bslint", + "version": "1.0.0-alpha.34", + "dev": true, + "license": "MIT", + "dependencies": { + "coveralls-next": "^4.2.0", + "fs-extra": "^10.0.0", + "jsonc-parser": "^2.3.0", + "minimatch": "^3.0.4", + "vscode-languageserver-types": "^3.17.3", + "yargs": "^15.4.1" + }, + "bin": { + "bslint": "dist/cli.js" + }, + "devDependencies": { + "@types/chai": "^4.3.0", + "@types/minimatch": "^3.0.4", + "@types/mocha": "^9.1.0", + "@types/mock-fs": "^4.10.0", + "@types/node": "^14.6.0", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/parser": "^3.10.1", + "brighterscript": "^1.0.0-alpha.35", + "chai": "^4.3.6", + "coveralls-next": "^4.2.0", + "eslint": "^7.7.0", + "mocha": "^9.2.2", + "nyc": "^15.1.0", + "source-map-support": "^0.5.21", + "thenby": "^1.3.4", + "ts-node": "^10.7.0", + "typescript": "^4.9.4" + }, + "peerDependencies": { + "brighterscript": "1.0.0-alpha.34" + } + }, + "node_modules/@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "dev": true, + "dependencies": { + "regenerator-runtime": "^0.14.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" } }, "node_modules/@nodelib/fs.scandir": { @@ -49,6 +142,56 @@ "node": ">= 8" } }, + "node_modules/@postman/form-data": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", + "integrity": "sha512-vjh8Q2a8S6UCm/KKs31XFJqEEgmbjBmpPNVV2eVav6905wyFAwaUOBGA1NPBI4ERH9MMZc6w0umFgM6WbEPMdg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@postman/tough-cookie": { + "version": "4.1.3-postman.1", + "resolved": "https://registry.npmjs.org/@postman/tough-cookie/-/tough-cookie-4.1.3-postman.1.tgz", + "integrity": "sha512-txpgUqZOnWYnUHZpHjkfb0IwVH4qJmyq77pPnJLlfhMtdCLMFTEeQHlzQiK906aaNCe4NEB5fGJHo9uzGbFMeA==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@postman/tough-cookie/node_modules/universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/@postman/tunnel-agent": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.4.tgz", + "integrity": "sha512-CJJlq8V7rNKhAw4sBfjixKpJW00SHqebqNUQKxMoepgeWZIbdPcD+rguRcivGhS4N12PymDcKgUgSD4rVC+RjQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, "node_modules/@rokucommunity/bslib": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", @@ -56,93 +199,150 @@ "dev": true }, "node_modules/@rokucommunity/bslint": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.5.0.tgz", - "integrity": "sha512-pJ/GU9eg7n0Vudnlk/IQCKhTJn4wKM8heynWvNjlFDdVJkjkIisaItA11kfz0tKyIO27AIjbJ6cz6Q2wbPAN9Q==", + "resolved": "../bslint", + "link": true + }, + "node_modules/@rokucommunity/logger": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@rokucommunity/logger/-/logger-0.3.9.tgz", + "integrity": "sha512-j4DK7dF2klMhoclJZ6P7h1bT4bMVt/ynfCi3GSMozXld0M1HbpRyY3TCxu6dnxPl16l6PtIosNHELjQxKzFp6g==", "dev": true, "dependencies": { - "brighterscript": "^0.39.1", + "chalk": "^4.1.2", + "date-fns": "^2.30.0", "fs-extra": "^10.0.0", - "jsonc-parser": "^2.3.0", - "minimatch": "^3.0.4", - "yargs": "^15.4.1" + "parse-ms": "^2.1.0", + "safe-json-stringify": "^1.2.0", + "serialize-error": "^8.1.0" + } + }, + "node_modules/@rokucommunity/logger/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" }, - "bin": { - "bslint": "dist/cli.js" + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/@rokucommunity/bslint/node_modules/brighterscript": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.39.4.tgz", - "integrity": "sha512-VJR+6A+bMyRu4Fd+5xlSFAVSv4NtqNpkROZuS9x7pBGRqAjy6BBPjmSPOeRjK4TGv9CvaH3OD5ZYtsi2kaY1IA==", + "node_modules/@rokucommunity/logger/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "@rokucommunity/bslib": "^0.1.1", - "@xml-tools/parser": "^1.0.7", - "array-flat-polyfill": "^1.0.1", - "chalk": "^2.4.2", - "chevrotain": "^7.0.1", - "chokidar": "^3.5.1", - "clear": "^0.1.0", - "cross-platform-clear-console": "^2.3.0", - "debounce-promise": "^3.1.0", - "eventemitter3": "^4.0.0", - "file-url": "^3.0.0", - "fs-extra": "^7.0.1", - "glob": "^7.1.6", - "jsonc-parser": "^2.3.0", - "long": "^3.2.0", - "luxon": "^1.8.3", - "minimatch": "^3.0.4", - "moment": "^2.23.0", - "p-settle": "^2.1.0", - "parse-ms": "^2.1.0", - "roku-deploy": "^3.4.1", - "serialize-error": "^7.0.1", - "source-map": "^0.7.3", - "vscode-languageserver": "7.0.0", - "vscode-languageserver-protocol": "3.16.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-uri": "^2.1.1", - "xml2js": "^0.4.19", - "yargs": "^16.2.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, - "bin": { - "bsc": "dist/cli.js" + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/@rokucommunity/bslint/node_modules/brighterscript/node_modules/fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "node_modules/@rokucommunity/logger/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" + "color-name": "~1.1.4" }, "engines": { - "node": ">=6 <7 || >=8" + "node": ">=7.0.0" } }, - "node_modules/@rokucommunity/bslint/node_modules/brighterscript/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "node_modules/@rokucommunity/logger/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/@rokucommunity/logger/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@rokucommunity/logger/node_modules/serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", "dev": true, "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" + "type-fest": "^0.20.2" }, "engines": { "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@rokucommunity/logger/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, + "node_modules/@rokucommunity/logger/node_modules/type-fest": { + "version": "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==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/chai": { + "version": "4.3.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz", + "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", + "dev": true + }, "node_modules/@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -159,6 +359,12 @@ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, + "node_modules/@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "dev": true + }, "node_modules/@types/node": { "version": "18.15.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", @@ -209,6 +415,30 @@ "regexp-to-ast": "0.5.0" } }, + "node_modules/acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "dependencies": { + "acorn": "^8.11.0" + }, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -272,6 +502,18 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "node_modules/array-flat-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz", @@ -308,6 +550,15 @@ "node": ">=0.8" } }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -333,9 +584,9 @@ } }, "node_modules/aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", + "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==", "dev": true }, "node_modules/balanced-match": { @@ -344,6 +595,26 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -362,6 +633,12 @@ "node": ">=8" } }, + "node_modules/bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -373,36 +650,38 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/brighterscript": { - "version": "0.61.3", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.61.3.tgz", - "integrity": "sha512-8BDpOSCdmkS/QcTdPTUW/99nCBypuoa/Zz6PZHI6OiVylqTBidtrGI7lBZotqY6yvQ3KJl24thhLHK5XuIT/6w==", + "version": "1.0.0-alpha.35", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-1.0.0-alpha.35.tgz", + "integrity": "sha512-pvMOPoCjMn+26FPAX48vCMbO7pr9HCIR7Vu68Q82rMWyi+K5Mpr8J6Or+puwUH6p9EGbGlzyCc7N6rnCBGfxTg==", "dev": true, "dependencies": { "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.9", "@xml-tools/parser": "^1.0.7", "array-flat-polyfill": "^1.0.1", "chalk": "^2.4.2", "chevrotain": "^7.0.1", "chokidar": "^3.5.1", "clear": "^0.1.0", + "coveralls-next": "^4.2.0", "cross-platform-clear-console": "^2.3.0", "debounce-promise": "^3.1.0", "eventemitter3": "^4.0.0", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "file-url": "^3.0.0", - "fs-extra": "^8.0.0", + "fs-extra": "^8.1.0", "jsonc-parser": "^2.3.0", "long": "^3.2.0", "luxon": "^2.5.2", @@ -410,15 +689,19 @@ "moment": "^2.23.0", "p-settle": "^2.1.0", "parse-ms": "^2.1.0", + "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.9.3", + "roku-deploy": "^3.12.1", "serialize-error": "^7.0.1", "source-map": "^0.7.4", - "vscode-languageserver": "7.0.0", - "vscode-languageserver-protocol": "3.16.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-uri": "^2.1.1", - "xml2js": "^0.4.19", + "thenby": "^1.3.4", + "uuid": "^9.0.0", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "xml2js": "^0.5.0", "yargs": "^16.2.0" }, "bin": { @@ -466,6 +749,15 @@ "node": ">=10" } }, + "node_modules/brotli": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", + "integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==", + "dev": true, + "dependencies": { + "base64-js": "^1.1.2" + } + }, "node_modules/camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -481,6 +773,24 @@ "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, + "node_modules/chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -495,6 +805,18 @@ "node": ">=4" } }, + "node_modules/check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "dependencies": { + "get-func-name": "^2.0.2" + }, + "engines": { + "node": "*" + } + }, "node_modules/chevrotain": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-7.1.2.tgz", @@ -599,6 +921,31 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, + "node_modules/coveralls-next": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/coveralls-next/-/coveralls-next-4.2.1.tgz", + "integrity": "sha512-O/SBGZsCryt+6Q3NuJHENyQYaucTEV9qp0KGaed+y42PUh+GuF949LRLHKZbxWwOIc1tV8bJRIVWlfbZ8etEwQ==", + "dev": true, + "dependencies": { + "form-data": "4.0.0", + "js-yaml": "4.1.0", + "lcov-parse": "1.0.0", + "log-driver": "1.2.7", + "minimist": "1.2.8" + }, + "bin": { + "coveralls": "bin/coveralls.js" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "node_modules/cross-platform-clear-console": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cross-platform-clear-console/-/cross-platform-clear-console-2.3.0.tgz", @@ -617,6 +964,22 @@ "node": ">=0.10" } }, + "node_modules/date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.21.0" + }, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, "node_modules/dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -647,6 +1010,18 @@ "node": ">=0.10.0" } }, + "node_modules/deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/del": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", @@ -675,6 +1050,15 @@ "node": ">=0.4.0" } }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -789,9 +1173,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -823,17 +1207,17 @@ } }, "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "dependencies": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" }, "engines": { - "node": ">= 0.12" + "node": ">= 6" } }, "node_modules/fs-extra": { @@ -863,9 +1247,9 @@ } }, "node_modules/fs-extra/node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true, "engines": { "node": ">= 10.0.0" @@ -900,6 +1284,15 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -1012,18 +1405,17 @@ } }, "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "dependencies": { "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" }, "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" + "node": ">=0.10" } }, "node_modules/ignore": { @@ -1162,6 +1554,18 @@ "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, "node_modules/jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -1202,18 +1606,18 @@ } }, "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, + "engines": [ + "node >=0.6.0" + ], "dependencies": { "assert-plus": "1.0.0", "extsprintf": "1.3.0", "json-schema": "0.4.0", "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" } }, "node_modules/jszip": { @@ -1234,6 +1638,15 @@ "integrity": "sha512-A4miz97dNF+EbNgQdayPAEtud5eRpCGPwJy7JQFD1hBQcOzOgBS4m721zoREuPqpz1yKm8hYT2ANlh7pirapsA==", "dev": true }, + "node_modules/lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", + "dev": true, + "bin": { + "lcov-parse": "bin/cli.js" + } + }, "node_modules/lie": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", @@ -1261,6 +1674,15 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "node_modules/log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true, + "engines": { + "node": ">=0.8.6" + } + }, "node_modules/long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", @@ -1270,26 +1692,20 @@ "node": ">=0.6" } }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "node_modules/loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" + "get-func-name": "^2.0.1" } }, - "node_modules/luxon": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.28.1.tgz", - "integrity": "sha512-gYHAa180mKrNIUJCbwpmD0aTu9kV0dREDrwNnuyFAsO1Wt0EVYSZelPnJlbj9HplzXX/YWXHFTL45kvZ53M0pw==", - "dev": true, - "engines": { - "node": "*" - } + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true }, "node_modules/merge2": { "version": "1.4.1", @@ -1346,6 +1762,15 @@ "node": "*" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/moment": { "version": "2.29.4", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", @@ -1548,6 +1973,15 @@ "node": ">=8" } }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true, + "engines": { + "node": "*" + } + }, "node_modules/performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -1566,6 +2000,48 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/postman-request": { + "version": "2.88.1-postman.36", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.36.tgz", + "integrity": "sha512-frYz62rp/C9Ip+l0KrOuPuFfv9UhkczCUK6sITc+0AZ1z/8Lcr7brs8AQ38VjxBFmaEyL/ITjy6u0uHyFLV5RQ==", + "dev": true, + "dependencies": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.4", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "brotli": "^1.3.3", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "har-validator": "~5.1.3", + "http-signature": "~1.3.1", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.3", + "safe-buffer": "^5.1.2", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">= 16" + } + }, + "node_modules/postman-request/node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -1579,9 +2055,9 @@ "dev": true }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -1596,6 +2072,12 @@ "node": ">=0.6" } }, + "node_modules/querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -1643,44 +2125,24 @@ "node": ">=8.10.0" } }, + "node_modules/readline": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", + "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==", + "dev": true + }, + "node_modules/regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "node_modules/regexp-to-ast": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==", "dev": true }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -1702,6 +2164,12 @@ "integrity": "sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==", "dev": true }, + "node_modules/requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -1728,9 +2196,9 @@ } }, "node_modules/roku-deploy": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.0.tgz", - "integrity": "sha512-qifRe8xmX0g1bBJoin6wC4IYiLoFGU4PU9CRGdsV25Sv35TPFuz1FLBMIBEieBg8pHoATUa+jyPfs7upHxq9Yw==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.1.tgz", + "integrity": "sha512-PEOdiFKGW1jrcoC9zjb+9kOWC/Q3eH7dzPvSi5kKignjNcyDiyJi+/wINwNrzw9SsxAVtw+NLvYueyZi9wQVsw==", "dev": true, "dependencies": { "chalk": "^2.4.2", @@ -1741,12 +2209,13 @@ "is-glob": "^4.0.3", "jsonc-parser": "^2.3.0", "jszip": "^3.6.0", + "lodash": "^4.17.21", "micromatch": "^4.0.4", "moment": "^2.29.1", "parse-ms": "^2.1.0", - "request": "^2.88.0", + "postman-request": "^2.88.1-postman.32", "temp-dir": "^2.0.0", - "xml2js": "^0.4.23" + "xml2js": "^0.5.0" }, "bin": { "roku-deploy": "dist/cli.js" @@ -1856,6 +2325,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "dev": true + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -1863,19 +2338,16 @@ "dev": true }, "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", "dev": true }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, "bin": { "semver": "bin/semver.js" }, @@ -1929,9 +2401,9 @@ } }, "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "dependencies": { "asn1": "~0.2.3", @@ -1953,6 +2425,15 @@ "node": ">=0.10.0" } }, + "node_modules/stream-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-length/-/stream-length-1.0.2.tgz", + "integrity": "sha512-aI+qKFiwoDV4rsXiS7WRoCt+v2RX1nUj17+KJC5r2gfh5xoSJIfP6Y3Do/HtvesFcTSWthIuJ3l1cvKQY/+nZg==", + "dev": true, + "dependencies": { + "bluebird": "^2.6.2" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -2009,6 +2490,12 @@ "node": ">=8" } }, + "node_modules/thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", + "dev": true + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -2021,29 +2508,47 @@ "node": ">=8.0" } }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "node_modules/ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" }, - "engines": { - "node": "*" + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } } }, "node_modules/tweetnacl": { @@ -2052,6 +2557,15 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, + "node_modules/type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/type-fest": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", @@ -2064,6 +2578,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undent": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/undent/-/undent-0.1.0.tgz", + "integrity": "sha512-vohX7ywgBjRxDNw+f3wHclSXmO0z9HsEfmGObOuG7G0yi7kZ6OtCG8kAxtDSNklmua5KR6ev2drTFqMGqpYEbg==", + "dev": true + }, "node_modules/universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -2082,6 +2616,16 @@ "punycode": "^2.1.0" } }, + "node_modules/url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "dependencies": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -2089,15 +2633,24 @@ "dev": true }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, "node_modules/verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -2119,52 +2672,52 @@ "dev": true }, "node_modules/vscode-jsonrpc": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", - "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "dev": true, "engines": { - "node": ">=8.0.0 || >=10.0.0" + "node": ">=14.0.0" } }, "node_modules/vscode-languageserver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz", - "integrity": "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", "dev": true, "dependencies": { - "vscode-languageserver-protocol": "3.16.0" + "vscode-languageserver-protocol": "3.17.5" }, "bin": { "installServerIntoExtension": "bin/installServerIntoExtension" } }, "node_modules/vscode-languageserver-protocol": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", - "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "dev": true, "dependencies": { - "vscode-jsonrpc": "6.0.0", - "vscode-languageserver-types": "3.16.0" + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" } }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz", - "integrity": "sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", "dev": true }, "node_modules/vscode-languageserver-types": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", - "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", "dev": true }, "node_modules/vscode-uri": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", - "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true }, "node_modules/which-module": { @@ -2230,9 +2783,9 @@ "dev": true }, "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", "dev": true, "dependencies": { "sax": ">=0.6.0", @@ -2260,12 +2813,6 @@ "node": ">=10" } }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", @@ -2373,9 +2920,58 @@ "engines": { "node": ">=6" } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } } }, "dependencies": { + "@babel/runtime": { + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.0.tgz", + "integrity": "sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -2402,6 +2998,46 @@ "fastq": "^1.6.0" } }, + "@postman/form-data": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@postman/form-data/-/form-data-3.1.1.tgz", + "integrity": "sha512-vjh8Q2a8S6UCm/KKs31XFJqEEgmbjBmpPNVV2eVav6905wyFAwaUOBGA1NPBI4ERH9MMZc6w0umFgM6WbEPMdg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "@postman/tough-cookie": { + "version": "4.1.3-postman.1", + "resolved": "https://registry.npmjs.org/@postman/tough-cookie/-/tough-cookie-4.1.3-postman.1.tgz", + "integrity": "sha512-txpgUqZOnWYnUHZpHjkfb0IwVH4qJmyq77pPnJLlfhMtdCLMFTEeQHlzQiK906aaNCe4NEB5fGJHo9uzGbFMeA==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.2.0", + "url-parse": "^1.5.3" + }, + "dependencies": { + "universalify": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz", + "integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==", + "dev": true + } + } + }, + "@postman/tunnel-agent": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/@postman/tunnel-agent/-/tunnel-agent-0.6.4.tgz", + "integrity": "sha512-CJJlq8V7rNKhAw4sBfjixKpJW00SHqebqNUQKxMoepgeWZIbdPcD+rguRcivGhS4N12PymDcKgUgSD4rVC+RjQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "@rokucommunity/bslib": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@rokucommunity/bslib/-/bslib-0.1.1.tgz", @@ -2409,85 +3045,142 @@ "dev": true }, "@rokucommunity/bslint": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/@rokucommunity/bslint/-/bslint-0.5.0.tgz", - "integrity": "sha512-pJ/GU9eg7n0Vudnlk/IQCKhTJn4wKM8heynWvNjlFDdVJkjkIisaItA11kfz0tKyIO27AIjbJ6cz6Q2wbPAN9Q==", - "dev": true, + "version": "file:../bslint", "requires": { - "brighterscript": "^0.39.1", + "@types/chai": "^4.3.0", + "@types/minimatch": "^3.0.4", + "@types/mocha": "^9.1.0", + "@types/mock-fs": "^4.10.0", + "@types/node": "^14.6.0", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/parser": "^3.10.1", + "brighterscript": "^1.0.0-alpha.35", + "chai": "^4.3.6", + "coveralls-next": "^4.2.0", + "eslint": "^7.7.0", "fs-extra": "^10.0.0", "jsonc-parser": "^2.3.0", "minimatch": "^3.0.4", + "mocha": "^9.2.2", + "nyc": "^15.1.0", + "source-map-support": "^0.5.21", + "thenby": "^1.3.4", + "ts-node": "^10.7.0", + "typescript": "^4.9.4", + "vscode-languageserver-types": "^3.17.3", "yargs": "^15.4.1" + } + }, + "@rokucommunity/logger": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@rokucommunity/logger/-/logger-0.3.9.tgz", + "integrity": "sha512-j4DK7dF2klMhoclJZ6P7h1bT4bMVt/ynfCi3GSMozXld0M1HbpRyY3TCxu6dnxPl16l6PtIosNHELjQxKzFp6g==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "date-fns": "^2.30.0", + "fs-extra": "^10.0.0", + "parse-ms": "^2.1.0", + "safe-json-stringify": "^1.2.0", + "serialize-error": "^8.1.0" }, "dependencies": { - "brighterscript": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.39.4.tgz", - "integrity": "sha512-VJR+6A+bMyRu4Fd+5xlSFAVSv4NtqNpkROZuS9x7pBGRqAjy6BBPjmSPOeRjK4TGv9CvaH3OD5ZYtsi2kaY1IA==", + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "@rokucommunity/bslib": "^0.1.1", - "@xml-tools/parser": "^1.0.7", - "array-flat-polyfill": "^1.0.1", - "chalk": "^2.4.2", - "chevrotain": "^7.0.1", - "chokidar": "^3.5.1", - "clear": "^0.1.0", - "cross-platform-clear-console": "^2.3.0", - "debounce-promise": "^3.1.0", - "eventemitter3": "^4.0.0", - "file-url": "^3.0.0", - "fs-extra": "^7.0.1", - "glob": "^7.1.6", - "jsonc-parser": "^2.3.0", - "long": "^3.2.0", - "luxon": "^1.8.3", - "minimatch": "^3.0.4", - "moment": "^2.23.0", - "p-settle": "^2.1.0", - "parse-ms": "^2.1.0", - "roku-deploy": "^3.4.1", - "serialize-error": "^7.0.1", - "source-map": "^0.7.3", - "vscode-languageserver": "7.0.0", - "vscode-languageserver-protocol": "3.16.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-uri": "^2.1.1", - "xml2js": "^0.4.19", - "yargs": "^16.2.0" - }, - "dependencies": { - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } - } + "has-flag": "^4.0.0" } + }, + "type-fest": { + "version": "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==", + "dev": true } } }, + "@tsconfig/node10": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", + "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", + "dev": true + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "@types/chai": { + "version": "4.3.16", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.16.tgz", + "integrity": "sha512-PatH4iOdyh3MyWtmHVFXLWCCIhUbopaltqddG9BzB+gMIzee2MJrvd+jouii9Z3wzQJruGWAm7WOMjgfG8hQlQ==", + "dev": true + }, "@types/glob": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz", @@ -2504,6 +3197,12 @@ "integrity": "sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==", "dev": true }, + "@types/mocha": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", + "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", + "dev": true + }, "@types/node": { "version": "18.15.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.15.10.tgz", @@ -2556,6 +3255,21 @@ } } }, + "acorn": { + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "dev": true + }, + "acorn-walk": { + "version": "8.3.3", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", + "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "dev": true, + "requires": { + "acorn": "^8.11.0" + } + }, "aggregate-error": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", @@ -2603,6 +3317,18 @@ "picomatch": "^2.0.4" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, "array-flat-polyfill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-flat-polyfill/-/array-flat-polyfill-1.0.1.tgz", @@ -2630,6 +3356,12 @@ "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", "dev": true }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2649,9 +3381,9 @@ "dev": true }, "aws4": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz", - "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==", + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", + "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==", "dev": true }, "balanced-match": { @@ -2660,6 +3392,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -2675,6 +3413,12 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "bluebird": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-2.11.0.tgz", + "integrity": "sha512-UfFSr22dmHPQqPP9XWHRhq+gWnHCYguQGkXQlbyPtW5qTnhFWA8/iXg765tH0cAjy7l/zPJ1aBTO0g5XgA7kvQ==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2686,33 +3430,35 @@ } }, "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "requires": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" } }, "brighterscript": { - "version": "0.61.3", - "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-0.61.3.tgz", - "integrity": "sha512-8BDpOSCdmkS/QcTdPTUW/99nCBypuoa/Zz6PZHI6OiVylqTBidtrGI7lBZotqY6yvQ3KJl24thhLHK5XuIT/6w==", + "version": "1.0.0-alpha.35", + "resolved": "https://registry.npmjs.org/brighterscript/-/brighterscript-1.0.0-alpha.35.tgz", + "integrity": "sha512-pvMOPoCjMn+26FPAX48vCMbO7pr9HCIR7Vu68Q82rMWyi+K5Mpr8J6Or+puwUH6p9EGbGlzyCc7N6rnCBGfxTg==", "dev": true, "requires": { "@rokucommunity/bslib": "^0.1.1", + "@rokucommunity/logger": "^0.3.9", "@xml-tools/parser": "^1.0.7", "array-flat-polyfill": "^1.0.1", "chalk": "^2.4.2", "chevrotain": "^7.0.1", "chokidar": "^3.5.1", "clear": "^0.1.0", + "coveralls-next": "^4.2.0", "cross-platform-clear-console": "^2.3.0", "debounce-promise": "^3.1.0", "eventemitter3": "^4.0.0", - "fast-glob": "^3.2.11", + "fast-glob": "^3.2.12", "file-url": "^3.0.0", - "fs-extra": "^8.0.0", + "fs-extra": "^8.1.0", "jsonc-parser": "^2.3.0", "long": "^3.2.0", "luxon": "^2.5.2", @@ -2720,15 +3466,19 @@ "moment": "^2.23.0", "p-settle": "^2.1.0", "parse-ms": "^2.1.0", + "readline": "^1.3.0", "require-relative": "^0.8.7", - "roku-deploy": "^3.9.3", + "roku-deploy": "^3.12.1", "serialize-error": "^7.0.1", "source-map": "^0.7.4", - "vscode-languageserver": "7.0.0", - "vscode-languageserver-protocol": "3.16.0", - "vscode-languageserver-textdocument": "^1.0.1", - "vscode-uri": "^2.1.1", - "xml2js": "^0.4.19", + "thenby": "^1.3.4", + "uuid": "^9.0.0", + "vscode-languageserver": "^9.0.1", + "vscode-languageserver-protocol": "^3.17.5", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-languageserver-types": "^3.17.5", + "vscode-uri": "^3.0.8", + "xml2js": "^0.5.0", "yargs": "^16.2.0" }, "dependencies": { @@ -2766,6 +3516,15 @@ } } }, + "brotli": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/brotli/-/brotli-1.3.3.tgz", + "integrity": "sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==", + "dev": true, + "requires": { + "base64-js": "^1.1.2" + } + }, "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", @@ -2778,6 +3537,21 @@ "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", "dev": true }, + "chai": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", + "integrity": "sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.3", + "deep-eql": "^4.1.3", + "get-func-name": "^2.0.2", + "loupe": "^2.3.6", + "pathval": "^1.1.1", + "type-detect": "^4.1.0" + } + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -2789,6 +3563,15 @@ "supports-color": "^5.3.0" } }, + "check-error": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", + "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==", + "dev": true, + "requires": { + "get-func-name": "^2.0.2" + } + }, "chevrotain": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-7.1.2.tgz", @@ -2873,6 +3656,25 @@ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, + "coveralls-next": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/coveralls-next/-/coveralls-next-4.2.1.tgz", + "integrity": "sha512-O/SBGZsCryt+6Q3NuJHENyQYaucTEV9qp0KGaed+y42PUh+GuF949LRLHKZbxWwOIc1tV8bJRIVWlfbZ8etEwQ==", + "dev": true, + "requires": { + "form-data": "4.0.0", + "js-yaml": "4.1.0", + "lcov-parse": "1.0.0", + "log-driver": "1.2.7", + "minimist": "1.2.8" + } + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, "cross-platform-clear-console": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cross-platform-clear-console/-/cross-platform-clear-console-2.3.0.tgz", @@ -2888,6 +3690,15 @@ "assert-plus": "^1.0.0" } }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.21.0" + } + }, "dateformat": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", @@ -2912,6 +3723,15 @@ "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", "dev": true }, + "deep-eql": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz", + "integrity": "sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, "del": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", @@ -2934,6 +3754,12 @@ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -3030,9 +3856,9 @@ "dev": true }, "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { "to-regex-range": "^5.0.1" @@ -3055,13 +3881,13 @@ "dev": true }, "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", "dev": true, "requires": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, @@ -3087,9 +3913,9 @@ } }, "universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", "dev": true } } @@ -3113,6 +3939,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-func-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz", + "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==", + "dev": true + }, "getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -3200,14 +4032,14 @@ "dev": true }, "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.3.6.tgz", + "integrity": "sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==", "dev": true, "requires": { "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" + "jsprim": "^2.0.2", + "sshpk": "^1.14.1" } }, "ignore": { @@ -3319,6 +4151,15 @@ "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", "dev": true }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "requires": { + "argparse": "^2.0.1" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", @@ -3359,9 +4200,9 @@ } }, "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-2.0.2.tgz", + "integrity": "sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==", "dev": true, "requires": { "assert-plus": "1.0.0", @@ -3388,6 +4229,12 @@ "integrity": "sha512-A4miz97dNF+EbNgQdayPAEtud5eRpCGPwJy7JQFD1hBQcOzOgBS4m721zoREuPqpz1yKm8hYT2ANlh7pirapsA==", "dev": true }, + "lcov-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcov-parse/-/lcov-parse-1.0.0.tgz", + "integrity": "sha512-aprLII/vPzuQvYZnDRU78Fns9I2Ag3gi4Ipga/hxnVMCZC8DnR2nI7XBqrPoywGfxqIx/DgarGvDJZAD3YBTgQ==", + "dev": true + }, "lie": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz", @@ -3412,25 +4259,31 @@ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, + "log-driver": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/log-driver/-/log-driver-1.2.7.tgz", + "integrity": "sha512-U7KCmLdqsGHBLeWqYlFA0V0Sl6P08EE1ZrmA9cxjUE0WVqT9qnyVDPz1kzpFEP0jdJuFnasWIfSd7fsaNXkpbg==", + "dev": true + }, "long": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", "integrity": "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg==", "dev": true }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "loupe": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz", + "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==", "dev": true, "requires": { - "yallist": "^4.0.0" + "get-func-name": "^2.0.1" } }, - "luxon": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/luxon/-/luxon-1.28.1.tgz", - "integrity": "sha512-gYHAa180mKrNIUJCbwpmD0aTu9kV0dREDrwNnuyFAsO1Wt0EVYSZelPnJlbj9HplzXX/YWXHFTL45kvZ53M0pw==", + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, "merge2": { @@ -3473,6 +4326,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, "moment": { "version": "2.29.4", "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", @@ -3623,6 +4482,12 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "dev": true + }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -3635,6 +4500,44 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "postman-request": { + "version": "2.88.1-postman.36", + "resolved": "https://registry.npmjs.org/postman-request/-/postman-request-2.88.1-postman.36.tgz", + "integrity": "sha512-frYz62rp/C9Ip+l0KrOuPuFfv9UhkczCUK6sITc+0AZ1z/8Lcr7brs8AQ38VjxBFmaEyL/ITjy6u0uHyFLV5RQ==", + "dev": true, + "requires": { + "@postman/form-data": "~3.1.1", + "@postman/tough-cookie": "~4.1.3-postman.1", + "@postman/tunnel-agent": "^0.6.4", + "aws-sign2": "~0.7.0", + "aws4": "^1.12.0", + "brotli": "^1.3.3", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "har-validator": "~5.1.3", + "http-signature": "~1.3.1", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "^2.1.35", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.3", + "safe-buffer": "^5.1.2", + "stream-length": "^1.0.2", + "uuid": "^8.3.2" + }, + "dependencies": { + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true + } + } + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -3648,9 +4551,9 @@ "dev": true }, "punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true }, "qs": { @@ -3659,6 +4562,12 @@ "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", "dev": true }, + "querystringify": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", + "dev": true + }, "queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -3689,40 +4598,24 @@ "picomatch": "^2.2.1" } }, + "readline": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/readline/-/readline-1.3.0.tgz", + "integrity": "sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==", + "dev": true + }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "regexp-to-ast": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz", "integrity": "sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==", "dev": true }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3741,6 +4634,12 @@ "integrity": "sha512-AKGr4qvHiryxRb19m3PsLRGuKVAbJLUD7E6eOaHkfKhwc+vSgVOCY5xNvm9EkolBKTOf0GrQAZKLimOCz81Khg==", "dev": true }, + "requires-port": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", + "dev": true + }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -3757,9 +4656,9 @@ } }, "roku-deploy": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.10.0.tgz", - "integrity": "sha512-qifRe8xmX0g1bBJoin6wC4IYiLoFGU4PU9CRGdsV25Sv35TPFuz1FLBMIBEieBg8pHoATUa+jyPfs7upHxq9Yw==", + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/roku-deploy/-/roku-deploy-3.12.1.tgz", + "integrity": "sha512-PEOdiFKGW1jrcoC9zjb+9kOWC/Q3eH7dzPvSi5kKignjNcyDiyJi+/wINwNrzw9SsxAVtw+NLvYueyZi9wQVsw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -3770,12 +4669,13 @@ "is-glob": "^4.0.3", "jsonc-parser": "^2.3.0", "jszip": "^3.6.0", + "lodash": "^4.17.21", "micromatch": "^4.0.4", "moment": "^2.29.1", "parse-ms": "^2.1.0", - "request": "^2.88.0", + "postman-request": "^2.88.1-postman.32", "temp-dir": "^2.0.0", - "xml2js": "^0.4.23" + "xml2js": "^0.5.0" }, "dependencies": { "fs-extra": { @@ -3855,6 +4755,12 @@ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-json-stringify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/safe-json-stringify/-/safe-json-stringify-1.2.0.tgz", + "integrity": "sha512-gH8eh2nZudPQO6TytOvbxnuhYBOvDBBLW52tz5q6X58lJcd/tkmqFR+5Z9adS8aJtURSXWThWy/xJtJwixErvg==", + "dev": true + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -3862,19 +4768,16 @@ "dev": true }, "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", "dev": true }, "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true }, "serialize-error": { "version": "7.0.1", @@ -3910,9 +4813,9 @@ "dev": true }, "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.18.0.tgz", + "integrity": "sha512-2p2KJZTSqQ/I3+HX42EpYOa2l3f8Erv8MWKsy2I9uf4wA7yFIkXRffYdsx86y6z4vHtV8u7g+pPlr8/4ouAxsQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -3926,6 +4829,15 @@ "tweetnacl": "~0.14.0" } }, + "stream-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-length/-/stream-length-1.0.2.tgz", + "integrity": "sha512-aI+qKFiwoDV4rsXiS7WRoCt+v2RX1nUj17+KJC5r2gfh5xoSJIfP6Y3Do/HtvesFcTSWthIuJ3l1cvKQY/+nZg==", + "dev": true, + "requires": { + "bluebird": "^2.6.2" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -3970,6 +4882,12 @@ "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==", "dev": true }, + "thenby": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/thenby/-/thenby-1.3.4.tgz", + "integrity": "sha512-89Gi5raiWA3QZ4b2ePcEwswC3me9JIg+ToSgtE0JWeCynLnLxNr/f9G+xfo9K+Oj4AFdom8YNJjibIARTJmapQ==", + "dev": true + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -3979,23 +4897,25 @@ "is-number": "^7.0.0" } }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "ts-node": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", + "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" } }, "tweetnacl": { @@ -4004,12 +4924,31 @@ "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", "dev": true }, + "type-detect": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz", + "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", + "dev": true + }, "type-fest": { "version": "0.13.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", "dev": true }, + "typescript": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", + "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "dev": true, + "peer": true + }, + "undent": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/undent/-/undent-0.1.0.tgz", + "integrity": "sha512-vohX7ywgBjRxDNw+f3wHclSXmO0z9HsEfmGObOuG7G0yi7kZ6OtCG8kAxtDSNklmua5KR6ev2drTFqMGqpYEbg==", + "dev": true + }, "universalify": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", @@ -4025,6 +4964,16 @@ "punycode": "^2.1.0" } }, + "url-parse": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", + "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", + "dev": true, + "requires": { + "querystringify": "^2.1.1", + "requires-port": "^1.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -4032,9 +4981,15 @@ "dev": true }, "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true + }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", "dev": true }, "verror": { @@ -4057,46 +5012,46 @@ } }, "vscode-jsonrpc": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-6.0.0.tgz", - "integrity": "sha512-wnJA4BnEjOSyFMvjZdpiOwhSq9uDoK8e/kpRJDTaMYzwlkrhG1fwDIZI94CLsLzlCK5cIbMMtFlJlfR57Lavmg==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.2.0.tgz", + "integrity": "sha512-C+r0eKJUIfiDIfwJhria30+TYWPtuHJXHtI7J0YlOmKAo7ogxP20T0zxB7HZQIFhIyvoBPwWskjxrvAtfjyZfA==", "dev": true }, "vscode-languageserver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-7.0.0.tgz", - "integrity": "sha512-60HTx5ID+fLRcgdHfmz0LDZAXYEV68fzwG0JWwEPBode9NuMYTIxuYXPg4ngO8i8+Ou0lM7y6GzaYWbiDL0drw==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-9.0.1.tgz", + "integrity": "sha512-woByF3PDpkHFUreUa7Hos7+pUWdeWMXRd26+ZX2A8cFx6v/JPTtd4/uN0/jB6XQHYaOlHbio03NTHCqrgG5n7g==", "dev": true, "requires": { - "vscode-languageserver-protocol": "3.16.0" + "vscode-languageserver-protocol": "3.17.5" } }, "vscode-languageserver-protocol": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.16.0.tgz", - "integrity": "sha512-sdeUoAawceQdgIfTI+sdcwkiK2KU+2cbEYA0agzM2uqaUy2UpnnGHtWTHVEtS0ES4zHU0eMFRGN+oQgDxlD66A==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.5.tgz", + "integrity": "sha512-mb1bvRJN8SVznADSGWM9u/b07H7Ecg0I3OgXDuLdn307rl/J3A9YD6/eYOssqhecL27hK1IPZAsaqh00i/Jljg==", "dev": true, "requires": { - "vscode-jsonrpc": "6.0.0", - "vscode-languageserver-types": "3.16.0" + "vscode-jsonrpc": "8.2.0", + "vscode-languageserver-types": "3.17.5" } }, "vscode-languageserver-textdocument": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.8.tgz", - "integrity": "sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==", + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", "dev": true }, "vscode-languageserver-types": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.16.0.tgz", - "integrity": "sha512-k8luDIWJWyenLc5ToFQQMaSrqCHiLwyKPHKPQZ5zz21vM+vIVUSvsRpcbiECH4WR88K2XZqc4ScRcZ7nk/jbeA==", + "version": "3.17.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.5.tgz", + "integrity": "sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==", "dev": true }, "vscode-uri": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-2.1.2.tgz", - "integrity": "sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", "dev": true }, "which-module": { @@ -4149,9 +5104,9 @@ "dev": true }, "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.5.0.tgz", + "integrity": "sha512-drPFnkQJik/O+uPKpqSgr22mpuFHqKdbS835iAQrUC73L2F5WkboIRd63ai/2Yg6I1jzifPFKH2NTK+cfglkIA==", "dev": true, "requires": { "sax": ">=0.6.0", @@ -4170,12 +5125,6 @@ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", @@ -4264,6 +5213,12 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index 0846feab..a7d7e5e0 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,14 @@ "dist/**/!(manifest)*" ], "devDependencies": { - "@rokucommunity/bslint": "^0.5.0", - "brighterscript": "^0.61.3", - "ropm": "^0.5.0" + "@rokucommunity/bslint": "../bslint", + "@types/chai": "^4.1.2", + "@types/mocha": "^5.2.5", + "brighterscript": "^1.0.0-alpha.35", + "chai": "^4.2.0", + "ropm": "^0.5.0", + "ts-node": "^10.9.2", + "undent": "^0.1.0" }, "repository": { "type": "git", diff --git a/tests/bsconfig.json b/tests/bsconfig.json index 891684c7..01369b3e 100644 --- a/tests/bsconfig.json +++ b/tests/bsconfig.json @@ -3,7 +3,8 @@ "files": [ "manifest", "source/**/*.*", - "components/**/*.*" + "components/**/*.*", + { "src": "../../framework/src/source/**/*", "dest": "source/rooibos" } ], "autoImportComponentScript": true, "createPackage": false, diff --git a/tests/package.json b/tests/package.json index 7d99af4f..23d59253 100644 --- a/tests/package.json +++ b/tests/package.json @@ -7,7 +7,7 @@ "watch": "npx bsc --project bsconfig.json --watch" }, "devDependencies": { - "brighterscript": "^0.65.22", + "brighterscript": "^1.0.0.alpha-35", "ts-node": "^10.7.0", "typescript": "^4.6.4" }, diff --git a/tests/src/source/Assertion.spec.bs b/tests/src/source/Assertion.spec.bs index 3557c7d4..44fb666f 100644 --- a/tests/src/source/Assertion.spec.bs +++ b/tests/src/source/Assertion.spec.bs @@ -1,5 +1,6 @@ import "pkg:/source/rooibos/BaseTestSuite.bs" + namespace tests @noEarlyExit @@ -11,7 +12,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("Fail") - function _() + function _() 'bs:disable-line 1026 m.Fail("reason") @@ -23,7 +24,7 @@ namespace tests end function @it("FailCrash") - function _() + function _() 'bs:disable-line 1026 try result = 2 / 0 @@ -46,7 +47,7 @@ namespace tests @params(0, false) @params(1, false) @params("test", false) - function _(value, expectedAssertResult) + function _(value, expectedAssertResult) 'bs:disable-line 1026 m.assertTrue(value) isFail = m.currentResult.isFail @@ -64,7 +65,7 @@ namespace tests @params(0, false) @params(1, false) @params("test", false) - function _(value, expectedAssertResult) + function _(value, expectedAssertResult) 'bs:disable-line 1026 m.assertFalse(value) @@ -80,23 +81,23 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("Fail") - @params([{ "one": 1 }], [{ "one": 2 }]) - @params([{ "one": 1 }], [{ "one": "a" }]) - @params([{ "one": 1 }], [{}]) - @params([{ "one": 1 }], [invalid]) - @params([{ "one": 1 }], []) - @params([{ "one": 1 }], invalid) - @params([{ "one": 1 }], [[]]) - @params([{ "one": 1 }], ["wrong"]) - @params([{ "one": 1 }], [2]) - @params([{ "one": "a" }], [{ "one": 1 }]) - @params([{ "two": 1 }], [{ "one": 1 }]) - @params([invalid], [{ "one": 1 }]) - @params(invalid, [{ "one": 1 }]) - @params([{ "one": 1, "two": 2 }], [{ "one": "1" }]) - @params([{ "one": 1 }, { "two": 2 }], [{ "one": "1" }, { "two": "a" }]) - @params([{ "one": 1 }, { "two": 2 }], [{ "a": 1 }, { "a": 1 }, { "a": 1 }]) - function _(expectedAAs, items) + @params([{"one": 1}], [{"one": 2}]) + @params([{"one": 1}], [{"one": "a"}]) + @params([{"one": 1}], [{}]) + @params([{"one": 1}], [invalid]) + @params([{"one": 1}], []) + @params([{"one": 1}], invalid) + @params([{"one": 1}], [[]]) + @params([{"one": 1}], ["wrong"]) + @params([{"one": 1}], [2]) + @params([{"one": "a"}], [{"one": 1}]) + @params([{"two": 1}], [{"one": 1}]) + @params([invalid], [{"one": 1}]) + @params(invalid, [{"one": 1}]) + @params([{"one": 1, "two": 2}], [{"one": "1"}]) + @params([{"one": 1}, {"two": 2}], [{"one": "1"}, {"two": "a"}]) + @params([{"one": 1}, {"two": 2}], [{"a": 1}, {"a": 1}, {"a": 1}]) + function _(expectedAAs, items) 'bs:disable-line 1026 m.assertArrayContainsAAs(items, expectedAAs) @@ -111,12 +112,12 @@ namespace tests @it("pass") @params([], []) @params([{}], [{}]) - @params([{ "one": 1 }], [{ "one": 1 }]) - @params([{ "one": 1, "two": 2 }], [{ "one": 1, "two": 2 }]) - @params([{ "one": 1, "two": 2 }], [{ "two": 2, "one": 1 }]) - @params([{ "one": 1, "two": 2 }, { "one": 1 }], [{ "one": 1 }, { "two": 2, "one": 1 }]) - @params([{ "one": 1, "two": 2 }, { "one": 1 }, { "three": 3 }], [{ "one": 1 }, { "three": 3 }, { "two": 2, "one": 1 }]) - function _(expectedAAs, items) + @params([{"one": 1}], [{"one": 1}]) + @params([{"one": 1, "two": 2}], [{"one": 1, "two": 2}]) + @params([{"one": 1, "two": 2}], [{"two": 2, "one": 1}]) + @params([{"one": 1, "two": 2}, {"one": 1}], [{"one": 1}, {"two": 2, "one": 1}]) + @params([{"one": 1, "two": 2}, {"one": 1}, {"three": 3}], [{"one": 1}, {"three": 3}, {"two": 2, "one": 1}]) + function _(expectedAAs, items) 'bs:disable-line 1026 m.assertArrayContainsAAs(items, expectedAAs) @@ -142,12 +143,12 @@ namespace tests end function @it("global is in test") - function _() + function _() 'bs:disable-line 1026 m.assertNotInvalid(m.global) end function @it("global is in before each and after each") - function _() + function _() 'bs:disable-line 1026 m.assertNotInvalid(m.global) m.assertNotInvalid(m.beforeEachGlobal) m.assertNotInvalid(m.afterEachGlobal) @@ -162,8 +163,8 @@ namespace tests @params([1, 2, 3], "Integer") @params([true, true, false], "Boolean") @params([[true, true], [false, false]], "Array") - @params([{ "test": 1 }, { "test": 1 }], "AssociativeArray") - function _(values, typeName) + @params([{"test": 1}, {"test": 1}], "AssociativeArray") + function _(values, typeName) 'bs:disable-line 1026 m.assertArrayContainsOnlyValuesOfType(values, typeName) isFail = m.currentResult.isFail @@ -179,14 +180,14 @@ namespace tests @params([1, "two", 3], "Integer") @params([true, "true", false], "Boolean") @params([[true, true], false, false], "Array") - @params([{ "test": 1 }, "notAA"], "AssociativeArray") + @params([{"test": 1}, "notAA"], "AssociativeArray") @params(["one", "two", "three"], "UnknownType") @params(["one", "two", "three"], "Integer") @params([1, 2, 3], "String") @params([true, true, false], "String") @params([[true, true], [false, false]], "AssociativeArray") - @params([{ "test": 1 }, { "test": 1 }], "Array") - function _(values, typeName) + @params([{"test": 1}, {"test": 1}], "Array") + function _(values, typeName) 'bs:disable-line 1026 m.assertArrayContainsOnlyValuesOfType(values, typeName) isFail = m.currentResult.isFail @@ -207,10 +208,10 @@ namespace tests @params([1, 2, 3]) @params([true]) @params([[true, true], [false, false]]) - @params([{ "test": 1 }]) + @params([{"test": 1}]) @params("not empty") @params([invalid]) - function _(values) + function _(values) 'bs:disable-line 1026 m.assertNotEmpty(values) isFail = m.currentResult.isFail @@ -227,7 +228,7 @@ namespace tests @params({}) @params(1) @params("") - function _(values) + function _(values) 'bs:disable-line 1026 m.assertNotEmpty(values) isFail = m.currentResult.isFail @@ -246,7 +247,7 @@ namespace tests @params([]) @params({}) @params("") - function _(values) + function _(values) 'bs:disable-line 1026 m.assertEmpty(values) isFail = m.currentResult.isFail @@ -264,10 +265,10 @@ namespace tests @params([1, 2, 3]) @params([true]) @params([[true, true], [false, false]]) - @params([{ "test": 1 }]) + @params([{"test": 1}]) @params("not empty") @params([invalid]) - function _(values) + function _(values) 'bs:disable-line 1026 m.assertEmpty(values) isFail = m.currentResult.isFail @@ -283,9 +284,9 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("multi return values") - function _() + function _() 'bs:disable-line 1026 obj = {} - m.expect(obj, "mockMethod", 5, invalid, { "multiResult": ["one", 2, invalid, "last"] }, true) + m.expect(obj, "mockMethod", 5, invalid, {"multiResult": ["one", 2, invalid, "last"]}, true) result = obj.mockMethod() m.assertEqual(result, "one") @@ -315,7 +316,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple test") - function _() + function _() 'bs:disable-line 1026 obj = {} arg1 = "arg1" arg2 = "arg2" @@ -346,7 +347,7 @@ namespace tests @it("can set up multi expects on same method - one invocation with any args") - function _() + function _() 'bs:disable-line 1026 obj = {} arg1 = "arg1" arg2 = "arg2" @@ -377,7 +378,7 @@ namespace tests end function @it("can set up multi expects on same method - multi params") - function _() + function _() 'bs:disable-line 1026 obj = {} arg1 = "arg1" arg2 = "arg2" @@ -408,7 +409,7 @@ namespace tests end function @it("multi test, multi params with other expects") - function _() + function _() 'bs:disable-line 1026 obj = {} arg1 = "arg1" arg2 = "arg2" @@ -447,7 +448,7 @@ namespace tests end function @it("multi test, multi params with other expects - fail others") - function _() + function _() 'bs:disable-line 1026 obj = {} arg1 = "arg1" arg2 = "arg2" @@ -492,7 +493,7 @@ namespace tests @params("arg1", "arg2", "arg3") @params("arg1", "arg2", "arg3") @params("arg1", invalid, "arg3") - function _(call1, call2, call3) + function _(call1, call2, call3) 'bs:disable-line 1026 obj = {} arg1 = "arg1" arg2 = "arg2" @@ -526,7 +527,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("success") - function _() + function _() 'bs:disable-line 1026 obj = {} obj2 = {} arg1 = "arg1" @@ -558,7 +559,7 @@ namespace tests end function @it("fail to match") - function _() + function _() 'bs:disable-line 1026 obj = {} obj2 = {} arg1 = "arg1" diff --git a/tests/src/source/Async.spec.bs b/tests/src/source/Async.spec.bs index 49e78337..efd05c08 100644 --- a/tests/src/source/Async.spec.bs +++ b/tests/src/source/Async.spec.bs @@ -15,7 +15,7 @@ namespace tests @async @it("normal async test") - function _() + function _() 'bs:disable-line 1026 callbackFunction = sub() m.wasCalled = true m.testSuite.assertTrue(true) @@ -23,12 +23,12 @@ namespace tests ? "done one" end sub - delayCall(0.02, callbackFunction) + delayCall(0.02, callbackFunction) 'bs:disable-line 1140 end function @async @it("async with stub call for source function") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(globalFunctionWithoutReturn, function() m.wasCalled = true @@ -37,12 +37,12 @@ namespace tests ? "done two" end function) - delayCall(0.02, globalFunctionWithoutReturn) + delayCall(0.02, globalFunctionWithoutReturn) 'bs:disable-line 1140 end function @async @it("async with stub call for node function") - function _() + function _() 'bs:disable-line 1026 m.stubCall(SetLabelText, function(text) m.wasCalled = true m.testSuite.assertEqual(text, "") @@ -51,7 +51,7 @@ namespace tests ? "done three" end function) - delayCall(0.02, SetLabelText) + delayCall(0.02, SetLabelText) 'bs:disable-line 1140 end function end class end namespace diff --git a/tests/src/source/Basic.spec.bs b/tests/src/source/Basic.spec.bs index 04af20b6..ece94c06 100644 --- a/tests/src/source/Basic.spec.bs +++ b/tests/src/source/Basic.spec.bs @@ -9,8 +9,8 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("tests aa's with a mock will not crash the box!") - function _() - aa = { "test": "value" } + function _() 'bs:disable-line 1026 + aa = {"test": "value"} m.expectOnce(aa, "getStubbedObject", [aa]) aa.getStubbedObject(aa) @@ -21,9 +21,9 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("tests aa's that get printed as failures don't crash box") - function _() - aa = { "test": "value" } - bb = { "other": "value" } + function _() 'bs:disable-line 1026 + aa = {"test": "value"} + bb = {"other": "value"} m.expectOnce(bb, "getStubbedObject", [aa]) m.assertEqual(aa, bb) 'not crashing on printing the wrong output is a pass @@ -37,14 +37,14 @@ namespace tests @it("works for simple case") @params("http://101.rooibos.com") - function _(url) + function _(url) 'bs:disable-line 1026 m.assertEqual(url, "http://101.rooibos.com") end function @it("on objects") - @params({ "url": "http://101.rooibos.com", "othervalue": 2 }) - @params({ url: "http://101.rooibos.com", "othervalue": 2 }) - @params({ url: "http://101.rooibos.com", othervalue: 2 }) + @params({"url": "http://101.rooibos.com", "othervalue": 2}) + @params({url: "http://101.rooibos.com", "othervalue": 2}) + @params({url: "http://101.rooibos.com", othervalue: 2}) function urlParams_objects(aa) m.assertEqual(aa.url, "http://101.rooibos.com") m.assertEqual(aa.othervalue, 2) @@ -56,8 +56,8 @@ namespace tests @ignore("takes ages") @it("times out") - function _() - item = { "id": "item" } + function _() 'bs:disable-line 1026 + item = {"id": "item"} m.assertAsyncField(item, "id") isFail = m.currentResult.isFail @@ -73,7 +73,7 @@ namespace tests @params(invalid) @params([]) @params("wrong") - function _(value) + function _(value) 'bs:disable-line 1026 m.assertClass(value, "myClass") isFail = m.currentResult.isFail @@ -84,9 +84,9 @@ namespace tests @it("fails if wrong class name") @params({}) - @params({ __classname: invalid }) - @params({ __classname: "other" }) - function _(value) + @params({__classname: invalid}) + @params({__classname: "other"}) + function _(value) 'bs:disable-line 1026 m.assertClass(value, "myClass") isFail = m.currentResult.isFail @@ -96,7 +96,7 @@ namespace tests end function @it("passes If Is correct Class") - function _() + function _() 'bs:disable-line 1026 m.assertClass({ __classname: "myClass" }, "myClass") @@ -108,7 +108,7 @@ namespace tests end function @it("passes If Is correct Class - with namespace") - function _() + function _() 'bs:disable-line 1026 m.assertClass({ __classname: "namespace.myClass" }, "namespace.myClass") @@ -120,7 +120,7 @@ namespace tests end function @it("passes If Is correct Class as reference") - function _() + function _() 'bs:disable-line 1026 m.assertClass({ __classname: "rooibos.BaseTestSuite" }, rooibos.BaseTestSuite) @@ -138,8 +138,8 @@ namespace tests @params(invalid) @params([]) @params("wrong") - function _(value) - m.assertAAContainsSubset(value, { a: 1 }) + function _(value) 'bs:disable-line 1026 + m.assertAAContainsSubset(value, {a: 1}) isFail = m.currentResult.isFail m.currentResult.Reset() @@ -151,8 +151,8 @@ namespace tests @params(invalid) @params([]) @params("wrong") - function _(value) - m.assertAAContainsSubset({ a: 1 }, value) + function _(value) 'bs:disable-line 1026 + m.assertAAContainsSubset({a: 1}, value) isFail = m.currentResult.isFail m.currentResult.Reset() @@ -161,10 +161,10 @@ namespace tests end function @it("passes if subset is present") - function _() + function _() 'bs:disable-line 1026 m.assertAAContainsSubset({ a: 1 - }, { a: 1 }) + }, {a: 1}) isFail = m.currentResult.isFail m.currentResult.Reset() @@ -177,7 +177,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("prints strings for failed array tests - simple") - function _() + function _() 'bs:disable-line 1026 arr1 = [ "one", "two", "three" ] @@ -198,10 +198,10 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("does not fail on like values") - @params({ id: 10 }, { id: 10.0 }) + @params({id: 10}, {id: 10.0}) @params([10], [10.0]) @params(10, 10.0) - function _(value1, value2) + function _(value1, value2) 'bs:disable-line 1026 m.assertLike(value1, value2) end function @@ -212,9 +212,9 @@ namespace tests @params(false, "false") @params(true, "true") @params(10, "10.0") - @params({ id: "10" }, { id: 10 }) - @params({ id: "10" }, { id: 10.0 }) - function _(value1, value2) + @params({id: "10"}, {id: 10}) + @params({id: "10"}, {id: 10.0}) + function _(value1, value2) 'bs:disable-line 1026 m.assertLike(value1, value2) isFail = m.currentResult.isFail msg = m.currentResult.getMessage() diff --git a/tests/src/source/Charlies-Issues.spec.bs b/tests/src/source/Charlies-Issues.spec.bs index 889f2913..86bb6fe9 100644 --- a/tests/src/source/Charlies-Issues.spec.bs +++ b/tests/src/source/Charlies-Issues.spec.bs @@ -29,7 +29,7 @@ namespace tests @it("globalMockExample2_crashing_due_to_returnValue") @params("stubCall dynamic title") - function _(manifestValue as string) + function _(manifestValue as string) 'bs:disable-line 1026 m.stubCall(getManifestValue, manifestValue) m.SUT.globalMockExample() m.assertEqual(m.SUT.appTitle, manifestValue) @@ -37,7 +37,7 @@ namespace tests @it("stubExample1_passing") @params({ configSetVia_config: true }, { configSetViaStub: true }) - function _(config1 as object, config2 as object) + function _(config1 as object, config2 as object) 'bs:disable-line 1026 m.SUT._config = config1 m.stub(m.SUT, "_getConfig", config2) m.SUT.setUpdatedConfig1() @@ -49,7 +49,7 @@ namespace tests @ignore("this is not supported - we do not support mocking singleton objects between test runs") @it("stubExample2_crashing_stub_from_stubExample1_persisting") @params({ configSetVia_config: true }, { configSetViaStub: true }) - function _(config1 as object, config2 as object) + function _(config1 as object, config2 as object) 'bs:disable-line 1026 m.SUT._config = config1 m.SUT.setUpdatedConfig2() expectedKeyNameConfig1 = config1.keys()[0] diff --git a/tests/src/source/Common.spec.bs b/tests/src/source/Common.spec.bs index 209ca6d9..de4990ee 100644 --- a/tests/src/source/Common.spec.bs +++ b/tests/src/source/Common.spec.bs @@ -19,7 +19,7 @@ namespace tests @params([1, 2, 3], [1, 2, 3], true) @params([1, invalid, "3"], [1, invalid, "3"], true) @params([3, 2, 1], [1, 2, 3], false) - function _(values, values2, expected) + function _(values, values2, expected) 'bs:disable-line 1026 result = rooibos.common.eqArray(values, values2) m.assertEqual(result, expected) @@ -30,7 +30,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("makes a simple path stubbable") - function _() + function _() 'bs:disable-line 1026 manager = invalid newManager = rooibos.common.makePathStubbable(manager, "manager") @@ -39,7 +39,7 @@ namespace tests end function @it("makes a simple node stubbable") - function _() + function _() 'bs:disable-line 1026 manager = createObject("roSGnode", "ContentNode") newManager = rooibos.common.makePathStubbable(manager, "manager") @@ -48,7 +48,7 @@ namespace tests end function @it("makes a path on an existing object stubbable") - function _() + function _() 'bs:disable-line 1026 manager = { id: "man" } newManager = rooibos.common.makePathStubbable(manager, "manager.item.data") @@ -67,7 +67,7 @@ namespace tests end function @it("makes a path including an aa on an existing object stubbable") - function _() + function _() 'bs:disable-line 1026 manager = { id: "man" item: { diff --git a/tests/src/source/Expect.spec.bs b/tests/src/source/Expect.spec.bs index 2f207a49..2bc16803 100644 --- a/tests/src/source/Expect.spec.bs +++ b/tests/src/source/Expect.spec.bs @@ -43,7 +43,7 @@ namespace tests @params([invalid], true) @params(["42"], true) @params([42], false) - function _(expectedValue, expectMockFail) + function _(expectedValue, expectMockFail) 'bs:disable-line 1026 obj = { foo: function(arg0) : return arg0 : end function } @@ -65,7 +65,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("mock count limit at least 25") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 instance = {} @@ -90,7 +90,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("converts invalids") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: invalid } @@ -100,7 +100,7 @@ namespace tests end function @it("works for nested invalids") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: { caller: invalid @@ -112,7 +112,7 @@ namespace tests end function @it("supports callfunc invalid") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: invalid } @@ -122,7 +122,7 @@ namespace tests end function @it("works for nested callfunc") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: { caller: invalid @@ -138,7 +138,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("converts invalids") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: invalid } @@ -148,7 +148,7 @@ namespace tests end function @it("works for nested invalids") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: { caller: invalid @@ -160,7 +160,7 @@ namespace tests end function @it("supports callfunc invalid") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: invalid } @@ -170,7 +170,7 @@ namespace tests end function @it("works for nested callfunc") - function _() + function _() 'bs:disable-line 1026 'bs:disable-line 1026 item = { service: { caller: invalid diff --git a/tests/src/source/Infinite-looping-fixes.spec.bs b/tests/src/source/Infinite-looping-fixes.spec.bs index 6aae1818..862d2968 100644 --- a/tests/src/source/Infinite-looping-fixes.spec.bs +++ b/tests/src/source/Infinite-looping-fixes.spec.bs @@ -8,7 +8,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("should ignore __mocks on both sides") - function _() + function _() 'bs:disable-line 1026 a = { __mocks: { @@ -32,7 +32,7 @@ namespace tests end function @it("should ignore __stubs on both sides") - function _() + function _() 'bs:disable-line 1026 a = { __stubs: { @@ -56,7 +56,7 @@ namespace tests end function @it("should account for __rooibosSkipFields on both sides - one field") - function _() + function _() 'bs:disable-line 1026 a = { top: { @@ -82,7 +82,7 @@ namespace tests end function @it("should account for __rooibosSkipFields on both sides - two fields") - function _() + function _() 'bs:disable-line 1026 a = { top: { @@ -118,7 +118,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("ignores special fields in output, and skipped fields") - function _() + function _() 'bs:disable-line 1026 a = { top: { diff --git a/tests/src/source/Matcher.spec.bs b/tests/src/source/Matcher.spec.bs index 2abb9c6c..7ea7dc53 100644 --- a/tests/src/source/Matcher.spec.bs +++ b/tests/src/source/Matcher.spec.bs @@ -18,7 +18,7 @@ namespace tests @params(false, true, true) @params(false, false, true) @params(true, true, true) - function _(v1, v2, expectedFail) + function _(v1, v2, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [{ "matcher": m.match_true }, { "matcher": m.match_false }], returnValue) @@ -40,7 +40,7 @@ namespace tests @params(false, true, true) @params(false, false, true) @params(true, true, true) - function _(v1, v2, expectedFail) + function _(v1, v2, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [{ "matcher": function(value) return value = true @@ -70,7 +70,7 @@ namespace tests @params([], true) @params(false, false) @params(true, false) - function _(v1, expectedFail) + function _(v1, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [m.anyBoolMatcher], returnValue) @@ -92,7 +92,7 @@ namespace tests @params([], true) @params(false, true) @params(true, true) - function _(v1, expectedFail) + function _(v1, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [m.anyStringMatcher], returnValue) @@ -117,7 +117,7 @@ namespace tests @params([], true) @params(false, true) @params(true, true) - function _(v1, expectedFail) + function _(v1, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [m.anyNumberMatcher], returnValue) @@ -139,7 +139,7 @@ namespace tests @params([], true) @params(false, true) @params(true, true) - function _(v1, expectedFail) + function _(v1, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [m.anyAAMatcher], returnValue) @@ -161,7 +161,7 @@ namespace tests @params([], false) @params(false, true) @params(true, true) - function _(v1, expectedFail) + function _(v1, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [m.anyArrayMatcher], returnValue) @@ -184,7 +184,7 @@ namespace tests @params([], true) @params(false, true) @params(true, true) - function _(v1, expectedFail) + function _(v1, expectedFail) 'bs:disable-line 1026 returnValue = "notBroken" m.expectOnce(m.myClass, "doWork", [m.anyNodeMatcher], returnValue) diff --git a/tests/src/source/NewExpectSyntax.spec.bs b/tests/src/source/NewExpectSyntax.spec.bs index e67c4c92..df24c7e8 100644 --- a/tests/src/source/NewExpectSyntax.spec.bs +++ b/tests/src/source/NewExpectSyntax.spec.bs @@ -35,14 +35,14 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectCalled(item.getText(), "test") m.assertEqual(item.getText(), "test") end function @it("expected param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectCalled(item.getText("expected"), "test") m.assertEqual(item.getText("expected"), "test") @@ -51,7 +51,7 @@ namespace tests end function @it("not matching on param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectCalled(item.getText("expected"), "test") @@ -65,7 +65,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("supports function pointer - therefore ignoring the params") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } 'don't care about the args @@ -95,14 +95,14 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectCalled(item@.getText(), "test") m.assertEqual(item@.getText(), "test") end function @it("expected param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectCalled(item@.getText("expected"), "test") m.assertEqual(item@.getText("expected"), "test") @@ -111,7 +111,7 @@ namespace tests end function @it("not matching on param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectCalled(item@.getText("expected"), "test") @@ -125,14 +125,14 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item.getText(), "test") m.assertEqual(item.getText(), "test") end function @it("expected param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item.getText("expected"), "test") m.assertEqual(item.getText("expected"), "test") @@ -141,7 +141,7 @@ namespace tests end function @it("not matching on param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item.getText("expected"), "test") @@ -155,7 +155,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("supports function pointer - therefore ignoring the params") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item.getText, "test") @@ -169,7 +169,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("stubs global with inline anon with return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(globalFunctionWithReturn, function() m.wasCalled = true @@ -182,7 +182,7 @@ namespace tests end function @it("stubs global with anon from variable with return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false stub = function() m.wasCalled = true @@ -196,7 +196,7 @@ namespace tests end function @it("stubs global with inline anon without return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(globalFunctionWithoutReturn, sub() m.wasCalled = true @@ -208,7 +208,7 @@ namespace tests end function @it("stubs global with anon from variable without return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(globalFunctionWithoutReturn, sub() m.wasCalled = true @@ -224,7 +224,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("stubs namespace with inline anon with return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(testNamespace.functionWithReturn, function() m.wasCalled = true @@ -236,7 +236,7 @@ namespace tests end function @it("stubs namespace with anon from variable with return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false stub = function() m.wasCalled = true @@ -250,7 +250,7 @@ namespace tests end function @it("stubs namespace with inline anon without return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(testNamespace.functionWithoutReturn, sub() m.wasCalled = true @@ -261,7 +261,7 @@ namespace tests end function @it("stubs namespace with anon from variable without return value") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(testNamespace.functionWithoutReturn, sub() m.wasCalled = true @@ -276,7 +276,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("stubs namespace multiple times in one test") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(testNamespace.functionWithoutReturn, sub() m.wasCalled = true @@ -295,7 +295,7 @@ namespace tests end function @it("stubs global multiple times in one test") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(testNamespace.functionWithoutReturn, sub() m.wasCalled = true @@ -318,7 +318,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("stubs namespace and then cleans it") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(testNamespace.functionWithReturn, function() m.wasCalled = true @@ -349,7 +349,7 @@ namespace tests end function @it("stubs global and then cleans it") - function _() + function _() 'bs:disable-line 1026 getGlobalAA().wasCalled = false m.stubCall(globalFunctionWithReturn, function() m.wasCalled = true @@ -384,7 +384,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("not matching on param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item@.getText("expected"), "test") @@ -394,14 +394,14 @@ namespace tests end function @it("simple") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item@.getText(), "test") m.assertEqual(item@.getText(), "test") end function @it("expected param") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.stubCall(item@.getText("expected"), "test") m.assertEqual(item@.getText("expected"), "test") @@ -414,14 +414,14 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("passes when not called") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText()) m.assertRunningTestIsPassed() end function @it("fails when called") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText()) item.getText() @@ -430,7 +430,7 @@ namespace tests end function @it("fails when called, with params") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText()) item.getText("expected") @@ -439,7 +439,7 @@ namespace tests end function @it("fails when called, with params on expect too") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText("expected")) item.getText("not expected") @@ -452,14 +452,14 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("passes when not called") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item@.getText()) m.assertRunningTestIsPassed() end function @it("fails when called") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item@.getText()) item@.getText() @@ -468,7 +468,7 @@ namespace tests end function @it("fails when called, with params") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item@.getText()) item@.getText("expected") @@ -477,7 +477,7 @@ namespace tests end function @it("fails when called, with params on expect too") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item@.getText("expected")) item@.getText("not expected") @@ -490,14 +490,14 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("passes when not called") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText) m.assertRunningTestIsPassed() end function @it("fails when called") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText) item.getText() @@ -506,7 +506,7 @@ namespace tests end function @it("fails when called, with params") - function _() + function _() 'bs:disable-line 1026 item = { "id": "node" } m.expectNotCalled(item.getText) item.getText("expected") @@ -519,7 +519,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("throws exceptions") - function _() + function _() 'bs:disable-line 1026 thing = { "id": "thing" } error = { message: "error" } @@ -539,55 +539,55 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("uses default implementation on global functions") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(utils.sayHello("John", "Lennon"), "John, Lennon") end function @it("uses default implementation on namespaced functions") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(globalSayHello("John", "Lennon"), "John, Lennon") end function @it("supports mocks on global functions") - function _() + function _() 'bs:disable-line 1026 m.expectCalled(globalSayHello("John", "Lennon"), "john") m.assertEqual(globalSayHello("John", "Lennon"), "john") end function @it("supports mocks on namespaced functions") - function _() + function _() 'bs:disable-line 1026 m.expectCalled(utils.sayHello("Paul", "McCartney"), "paul") m.assertEqual(utils.sayHello("Paul", "McCartney"), "paul") end function @it("reports uncalled mocks on global functions") - function _() + function _() 'bs:disable-line 1026 m.expectCalled(globalSayHello("John", "Lennon"), "john") m.assertRunningTestIsFailed() end function @it("reports uncalled mocks on namespaced functions") - function _() + function _() 'bs:disable-line 1026 m.expectCalled(utils.sayHello("Paul", "McCartney"), "paul") m.assertRunningTestIsFailed() end function @it("resets to default implementation on global functions") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(utils.sayHello("John", "Lennon"), "John, Lennon") end function @it("resets to default implementation on namespaced functions") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(globalSayHello("John", "Lennon"), "John, Lennon") end function @it("supports overloaded mocks on global functions") - function _() + function _() 'bs:disable-line 1026 m.expectCalled(globalSayHello("John", "Lennon"), "john") m.expectCalled(globalSayHello("John", "Lennon"), "john2") @@ -596,7 +596,7 @@ namespace tests end function @it("supports overloaded mocks on namespaced functions") - function _() + function _() 'bs:disable-line 1026 m.expectCalled(utils.sayHello("Paul", "McCartney"), "paul1") m.expectCalled(utils.sayHello("Paul", "McCartney"), "paul2") diff --git a/tests/src/source/NodeExample.spec.bs b/tests/src/source/NodeExample.spec.bs index f635ed08..d9ebe4a6 100644 --- a/tests/src/source/NodeExample.spec.bs +++ b/tests/src/source/NodeExample.spec.bs @@ -16,7 +16,7 @@ namespace tests @async @it("HelloFromNode") - function _() + function _() 'bs:disable-line 1026 'bs:disable-next-line text = HelloFromNode("rokucommunity", 12) m.AssertEqual(text, "HELLO rokucommunity" + " age:" + stri(12)) @@ -35,7 +35,7 @@ namespace tests @params("ringo", 24) @params("george", 40) @params("paul", 50) - function _(name, age) + function _(name, age) 'bs:disable-line 1026 'bs:disable-next-line text = HelloFromNode(name, age) m.AssertEqual(text, "HELLO " + name + " age:" + stri(age)) @@ -53,7 +53,7 @@ namespace tests @params("ringo", 24) @params("george", 40) @params("paul", 50) - function _(name, age) + function _(name, age) 'bs:disable-line 1026 m.age = age callback = function() @@ -73,9 +73,9 @@ namespace tests @params("start") @params("stop") @params("error") - function _(state) + function _(state) 'bs:disable-line 1026 m.node.top.state = "" - UpdateState(state) + UpdateState(state) 'bs:disable-line 1140 m.assertEqual(m.node.top.state, state) end function @@ -86,9 +86,9 @@ namespace tests @params("ringo") @params("george") @params("paul") - function _(text) + function _(text) 'bs:disable-line 1026 m.node.nameText.text = "" - SetLabelText(text) + SetLabelText(text) 'bs:disable-line 1140 m.assertEqual(m.node.nameText.text, text) end function end class diff --git a/tests/src/source/Params.spec.bs b/tests/src/source/Params.spec.bs index 5335bdac..8fb660e0 100644 --- a/tests/src/source/Params.spec.bs +++ b/tests/src/source/Params.spec.bs @@ -10,7 +10,7 @@ namespace tests @params("#RBSNode", "ContentNode") @params("#RBSNode|Group", "Group") @params("#RBSNode|Label", "Label") - function _(node, expectedNodeType) + function _(node, expectedNodeType) 'bs:disable-line 1026 m.assertSubType(node, expectedNodeType) end function @@ -18,7 +18,7 @@ namespace tests @params(1, 2, 3, "#RBSNode", "ContentNode") @params(1, 2, 3, "#RBSNode|Group", "Group") @params(1, 2, 3, "#RBSNode|Label", "Label") - function _(arg1, arg2, arg3, node, expectedNodeType) + function _(arg1, arg2, arg3, node, expectedNodeType) 'bs:disable-line 1026 m.assertSubType(node, expectedNodeType) m.assertEqual(arg1, 1) m.assertEqual(arg2, 2) @@ -29,7 +29,7 @@ namespace tests @params("#someValue", "#someValue") @params(22, 22) @params([1,2,3], [1,2,3]) - function _(arg1, expectedValue) + function _(arg1, expectedValue) 'bs:disable-line 1026 m.assertEqual(arg1, expectedValue) end function end class diff --git a/tests/src/source/issue_13_afterEach_not_running.spec.bs b/tests/src/source/issue_13_afterEach_not_running.spec.bs index 41c9bd58..090d159e 100644 --- a/tests/src/source/issue_13_afterEach_not_running.spec.bs +++ b/tests/src/source/issue_13_afterEach_not_running.spec.bs @@ -10,7 +10,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @@ -19,7 +19,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @@ -29,7 +29,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple2") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @@ -39,7 +39,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @@ -48,12 +48,12 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("simple") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @it("simple2") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function end class diff --git a/tests/src/source/issue_15_tests_only_on_groups.spec.bs b/tests/src/source/issue_15_tests_only_on_groups.spec.bs index c3aea09b..e098a80a 100644 --- a/tests/src/source/issue_15_tests_only_on_groups.spec.bs +++ b/tests/src/source/issue_15_tests_only_on_groups.spec.bs @@ -7,7 +7,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("it test one") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @@ -16,7 +16,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("it test two") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function @@ -26,7 +26,7 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("it test three") - function _() + function _() 'bs:disable-line 1026 m.assertTrue(true) end function end class diff --git a/tests/src/source/verifyBeforeEachAfterEach.spec.bs b/tests/src/source/verifyBeforeEachAfterEach.spec.bs index 9ed3a676..c92f0837 100644 --- a/tests/src/source/verifyBeforeEachAfterEach.spec.bs +++ b/tests/src/source/verifyBeforeEachAfterEach.spec.bs @@ -32,7 +32,7 @@ namespace tests end function @it("2") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 1) end function @@ -40,7 +40,7 @@ namespace tests @params("a") @params("b") @params("c") - function _(values) + function _(values) 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 1) end function @@ -60,12 +60,12 @@ namespace tests end function @it("1 ") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 2) end function @it("2") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 2) end function @@ -73,7 +73,7 @@ namespace tests @params("a") @params("b") @params("c") - function _(values) + function _(values) 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 2) end function @@ -82,12 +82,12 @@ namespace tests '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @it("1 ") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 1) end function @it("2") - function _() + function _() 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 1) end function @@ -95,7 +95,7 @@ namespace tests @params("a") @params("b") @params("c") - function _(values) + function _(values) 'bs:disable-line 1026 m.assertEqual(m.beforeEachValue, 1) end function diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..b7e778b5 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "./bsc-plugin/tsconfig.json" +} From b62a5152c9e8c4c0c81d7c7d151481ef74aec2d2 Mon Sep 17 00:00:00 2001 From: Mark Pearce Date: Wed, 7 Aug 2024 15:30:47 -0300 Subject: [PATCH 02/15] Fixed all tests (except for known bugs with brighterscript-1.0.0-alpha.35) --- .../lib/rooibos/CodeCoverageProcessor.spec.ts | 75 +++- .../src/lib/rooibos/CodeCoverageProcessor.ts | 41 +- bsc-plugin/src/lib/rooibos/FileFactory.ts | 2 +- bsc-plugin/src/lib/rooibos/MockUtil.spec.ts | 26 +- bsc-plugin/src/lib/rooibos/RooibosSession.ts | 20 +- bsc-plugin/src/lib/rooibos/TestGroup.ts | 11 +- bsc-plugin/src/lib/rooibos/TestSuite.ts | 4 + .../src/lib/rooibos/TestSuiteBuilder.ts | 7 +- bsc-plugin/src/lib/rooibos/Utils.ts | 20 + bsc-plugin/src/lib/utils/Diagnostics.ts | 6 +- bsc-plugin/src/plugin.spec.ts | 400 ++++++++---------- bsc-plugin/src/plugin.ts | 83 ++-- framework/src/source/BaseTestSuite.bs | 23 +- framework/src/source/RuntimeConfig.bs | 4 +- framework/src/source/TestConstructorData.bs | 20 +- framework/src/source/TestRunner.bs | 6 +- tests/src/source/Expect.spec.bs | 24 +- tests/src/source/NewExpectSyntax.spec.bs | 153 +++---- 18 files changed, 538 insertions(+), 387 deletions(-) diff --git a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts index 0357a39e..980130a9 100644 --- a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts +++ b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts @@ -5,6 +5,7 @@ import PluginInterface from 'brighterscript/dist/PluginInterface'; import * as fsExtra from 'fs-extra'; import { RooibosPlugin } from '../../plugin'; import undent from 'undent'; +import * as path from 'path'; let tmpPath = s`${process.cwd()}/tmp`; let _rootDir = s`${tmpPath}/rootDir`; @@ -27,7 +28,7 @@ describe('RooibosPlugin', () => { plugin = new RooibosPlugin(); options = { rootDir: _rootDir, - stagingFolderPath: _stagingFolderPath, + stagingDir: _stagingFolderPath, rooibos: { isRecordingCodeCoverage: true, coverageExcludedFiles: [ @@ -46,10 +47,10 @@ describe('RooibosPlugin', () => { builder.program = new Program(builder.options); program = builder.program; program.logger = builder.logger; - builder.plugins = new PluginInterface([plugin], { logger: builder.logger }); - program.plugins = new PluginInterface([plugin], { logger: builder.logger }); + program.plugins.add(plugin); program.createSourceScope(); //ensure source scope is created plugin.beforeProgramCreate({ builder: builder }); + plugin.afterProgramCreate({ program: program, builder: builder }); }); afterEach(() => { @@ -87,7 +88,7 @@ describe('RooibosPlugin', () => { `); program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); let a = getContents('source/code.brs'); let b = undent(` function new(a1, a2) @@ -171,7 +172,7 @@ describe('RooibosPlugin', () => { `); program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); let a = getContents('source/code.brs'); let b = undent(` function new(a1, a2) @@ -264,7 +265,7 @@ describe('RooibosPlugin', () => { `); program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); let a = getContents('source/code.brs'); let b = undent(` function __BasicClass_builder() @@ -346,7 +347,7 @@ describe('RooibosPlugin', () => { program.setFile('source/code.bs', source); program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); let a = getContents('source/code.brs'); let b = undent(` @@ -420,7 +421,7 @@ describe('RooibosPlugin', () => { program.setFile('source/code.bs', source); program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); let a = getContents('source/code.brs'); let b = undent(` @@ -496,6 +497,62 @@ describe('RooibosPlugin', () => { }); }); + it('adds code coverage in conditional compile statements', async () => { + program.setFile('source/code.bs', ` + #const DEBUG = true + sub test() + #if DEBUG + print "debug" + #else + print "not debug" + #end if + end sub + `); + program.validate(); + expect(program.getDiagnostics()).to.be.empty; + await builder.build(); + let a = getContents('source/code.brs'); + let b = undent(` + #const DEBUG = true + + sub test() + #if DEBUG + RBS_CC_1_reportLine("3", 4) + RBS_CC_1_reportLine("4", 1) + print "debug" + #else + RBS_CC_1_reportLine("5", 4) + RBS_CC_1_reportLine("6", 1) + print "not debug" + #end if + end sub + + function RBS_CC_1_reportLine(lineNumber, reportType = 1) + _rbs_ccn = m._rbs_ccn + if _rbs_ccn <> invalid + _rbs_ccn.entry = { + "f": "1" + "l": lineNumber + "r": reportType + } + return true + end if + _rbs_ccn = m?.global?._rbs_ccn + if _rbs_ccn <> invalid + _rbs_ccn.entry = { + "f": "1" + "l": lineNumber + "r": reportType + } + m._rbs_ccn = _rbs_ccn + return true + end if + return true + end function + `); + expect(a).to.equal(b); + }); + it('excludes files from coverage', async () => { const source = `sub foo() x = function(y) @@ -509,7 +566,7 @@ describe('RooibosPlugin', () => { program.setFile('source/code.coverageExcluded.bs', source); program.validate(); expect(program.getDiagnostics()).to.be.empty; - await builder.transpile(); + await builder.build(); let a = getContents('source/code.coverageExcluded.brs'); let b = undent(` diff --git a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts index d3fd18e2..f4a2645a 100644 --- a/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts +++ b/bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-var-requires */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import type { BrsFile, Editor, ExpressionStatement, Program, ProgramBuilder, Statement } from 'brighterscript'; -import { Parser, WalkMode, createVisitor, BinaryExpression, createToken, TokenKind, GroupingExpression, isForStatement, isBlock } from 'brighterscript'; +import { Parser, WalkMode, createVisitor, BinaryExpression, createToken, TokenKind, GroupingExpression, isForStatement, isBlock, InternalWalkMode } from 'brighterscript'; import type { RooibosConfig } from './RooibosConfig'; import { RawCodeStatement } from './RawCodeStatement'; import { BrsTranspileState } from 'brighterscript/dist/parser/BrsTranspileState'; @@ -12,7 +12,8 @@ export enum CodeCoverageLineType { noCode = 0, code = 1, condition = 2, - branch = 3 + branch = 3, + conditionalCompile = 4 } export class CodeCoverageProcessor { @@ -102,7 +103,12 @@ export class CodeCoverageProcessor { // Handle the else blocks let elseBlock = ifStatement.elseBranch; if (isBlock(elseBlock) && elseBlock.statements) { - let coverageStatement = new RawCodeStatement(this.getFuncCallText(elseBlock.location.range.start.line - 1, CodeCoverageLineType.branch)); + let startRangeLine = elseBlock.location.range.start.line; + if (elseBlock.statements.length > 0) { + // if the else block has statements, then the coverage statement should be inserted before the first statement + startRangeLine -= 1; + } + let coverageStatement = new RawCodeStatement(this.getFuncCallText(startRangeLine, CodeCoverageLineType.branch)); elseBlock.statements.splice(0, 0, coverageStatement); } @@ -150,13 +156,38 @@ export class CodeCoverageProcessor { this.addStatement(ds); this.convertStatementToCoverageStatement(ds, CodeCoverageLineType.code, owner, key); } - + }, + AugmentedAssignmentStatement: (ds, parent, owner, key) => { + this.addStatement(ds); + this.convertStatementToCoverageStatement(ds, CodeCoverageLineType.code, owner, key); }, ExpressionStatement: (ds, parent, owner, key) => { this.addStatement(ds); this.convertStatementToCoverageStatement(ds, CodeCoverageLineType.code, owner, key); + }, + ConditionalCompileStatement: (ccStmt, parent, owner, key) => { + this.addStatement(ccStmt); + + let blockStatements = ccStmt.thenBranch?.statements; + if (blockStatements) { + let coverageStatement = new RawCodeStatement(this.getFuncCallText(ccStmt.location.range.start.line, CodeCoverageLineType.conditionalCompile)); + blockStatements.splice(0, 0, coverageStatement); + } + + // Handle the else blocks + let elseBlock = ccStmt.elseBranch; + if (isBlock(elseBlock) && elseBlock.statements) { + let startRangeLine = elseBlock.location.range.start.line; + if (elseBlock.statements.length > 0) { + // if the else block has statements, then the coverage statement should be inserted before the first statement + startRangeLine -= 1; + } + let coverageStatement = new RawCodeStatement(this.getFuncCallText(startRangeLine, CodeCoverageLineType.conditionalCompile)); + elseBlock.statements.splice(0, 0, coverageStatement); + } } - }), { walkMode: WalkMode.visitAllRecursive }); + // eslint-disable-next-line no-bitwise + }), { walkMode: WalkMode.visitAllRecursive | InternalWalkMode.visitFalseConditionalCompilationBlocks }); const coverageMapObject = {}; for (let key of this.coverageMap.keys()) { diff --git a/bsc-plugin/src/lib/rooibos/FileFactory.ts b/bsc-plugin/src/lib/rooibos/FileFactory.ts index f21a3ca8..bd462c5a 100644 --- a/bsc-plugin/src/lib/rooibos/FileFactory.ts +++ b/bsc-plugin/src/lib/rooibos/FileFactory.ts @@ -80,7 +80,7 @@ export class FileFactory { // Add the test spec file rather then relying on auto imports if (suite) { - scriptImports.push(`