diff --git a/.eslintrc b/.eslintrc index 62e2aa6c52ba..03bfab0d4710 100644 --- a/.eslintrc +++ b/.eslintrc @@ -69,6 +69,7 @@ "no-control-regex": "off", "no-extend-native": "off", "no-multi-str": "off", + "no-shadow": "off", "no-param-reassign": "off", "no-prototype-builtins": "off", "no-restricted-syntax": [ diff --git a/.github/actions/smoke-tests/action.yml b/.github/actions/smoke-tests/action.yml index cc2912115176..d4ac73b1a803 100644 --- a/.github/actions/smoke-tests/action.yml +++ b/.github/actions/smoke-tests/action.yml @@ -43,7 +43,7 @@ runs: # Bits from the VSIX are reused by smokeTest.ts to speed things up. - name: Download VSIX - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: ${{ inputs.artifact_name }} diff --git a/.gitignore b/.gitignore index f703e34173fd..1b47f15705bb 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,8 @@ dist/** package.nls.*.json l10n/ python-env-tools/** +# coverage files produced as test output +python_files/tests/*/.data/.coverage* +python_files/tests/*/.data/*/.coverage* +src/testTestingRootWkspc/coverageWorkspace/.coverage + diff --git a/.vscode/launch.json b/.vscode/launch.json index 4dc107853fc6..1e983413c8d4 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -127,6 +127,9 @@ "--extensionDevelopmentPath=${workspaceFolder}", "--extensionTestsPath=${workspaceFolder}/out/test" ], + "env": { + "VSC_PYTHON_CI_TEST_GREP": "" // Modify this to run a subset of the single workspace tests + }, "sourceMaps": true, "smartStep": true, "outFiles": ["${workspaceFolder}/out/**/*", "!${workspaceFolder}/**/node_modules**/*"], diff --git a/build/azure-pipeline.pre-release.yml b/build/azure-pipeline.pre-release.yml index 56bed785588f..c6de846ee851 100644 --- a/build/azure-pipeline.pre-release.yml +++ b/build/azure-pipeline.pre-release.yml @@ -31,7 +31,6 @@ extends: ghCreateTag: false standardizedVersioning: true l10nSourcePaths: ./src/client - needsTools: true buildPlatforms: - name: Linux @@ -98,27 +97,30 @@ extends: - script: npx gulp prePublishBundle displayName: Build - - script: nox --session azure_pet_checkout - displayName: Checkout python-environment-tools - env: - PYTHON_ENV_TOOLS_DEST: $(Build.SourcesDirectory) - PYTHON_ENV_TOOLS_REF: main - PYTHON_ENV_TOOLS_TEMP: $(Agent.TempDirectory) - - - script: nox --session azure_pet_build_before - displayName: Enable cargo config for azure - - - template: azure-pipelines/extension/templates/steps/build-extension-rust-package.yml@templates - parameters: - vsceTarget: $(vsceTarget) - binaryName: pet - signing: true - workingDirectory: $(Build.SourcesDirectory)/python-env-tools - buildWasm: false - runTest: false - - - script: nox --session azure_pet_build_after - displayName: Move bin to final location + - bash: | + mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin + chmod +x $(Build.SourcesDirectory)/python-env-tools/bin + displayName: Make Directory for python-env-tool binary + + - task: DownloadPipelineArtifact@2 + inputs: + buildType: 'specific' + project: 'Monaco' + definition: 591 + buildVersionToDownload: 'latestFromBranch' + branchName: 'refs/heads/main' + targetPath: '$(Build.SourcesDirectory)/python-env-tools/bin' + artifactName: 'bin-$(vsceTarget)' + itemPattern: | + pet.exe + pet + ThirdPartyNotices.txt + + - bash: | + ls -lf ./python-env-tools/bin + chmod +x ./python-env-tools/bin/pet* + ls -lf ./python-env-tools/bin + displayName: Set chmod for pet binary - script: python -c "import shutil; shutil.rmtree('.nox', ignore_errors=True)" displayName: Clean up Nox diff --git a/build/azure-pipeline.stable.yml b/build/azure-pipeline.stable.yml index 4cd0567ec8c1..5f7536efbe2a 100644 --- a/build/azure-pipeline.stable.yml +++ b/build/azure-pipeline.stable.yml @@ -92,27 +92,30 @@ extends: - script: npx gulp prePublishBundle displayName: Build - - script: nox --session azure_pet_checkout - displayName: Checkout python-environment-tools - env: - PYTHON_ENV_TOOLS_DEST: $(Build.SourcesDirectory) - PYTHON_ENV_TOOLS_REF: release/2024.12 - PYTHON_ENV_TOOLS_TEMP: $(Agent.TempDirectory) - - - script: nox --session azure_pet_build_before - displayName: Enable cargo config for azure - - - template: azure-pipelines/extension/templates/steps/build-extension-rust-package.yml@templates - parameters: - vsceTarget: $(vsceTarget) - binaryName: pet - signing: true - workingDirectory: $(Build.SourcesDirectory)/python-env-tools - buildWasm: false - runTest: false - - - script: nox --session azure_pet_build_after - displayName: Move bin to final location + - bash: | + mkdir -p $(Build.SourcesDirectory)/python-env-tools/bin + chmod +x $(Build.SourcesDirectory)/python-env-tools/bin + displayName: Make Directory for python-env-tool binary + + - task: DownloadPipelineArtifact@2 + inputs: + buildType: 'specific' + project: 'Monaco' + definition: 593 + buildVersionToDownload: 'latestFromBranch' + branchName: 'refs/heads/release/2024.14' + targetPath: '$(Build.SourcesDirectory)/python-env-tools/bin' + artifactName: 'bin-$(vsceTarget)' + itemPattern: | + pet.exe + pet + ThirdPartyNotices.txt + + - bash: | + ls -lf ./python-env-tools/bin + chmod +x ./python-env-tools/bin/pet* + ls -lf ./python-env-tools/bin + displayName: Set chmod for pet binary - script: python -c "import shutil; shutil.rmtree('.nox', ignore_errors=True)" displayName: Clean up Nox diff --git a/build/functional-test-requirements.txt b/build/functional-test-requirements.txt index d45208f671f4..5c3a9e3116ed 100644 --- a/build/functional-test-requirements.txt +++ b/build/functional-test-requirements.txt @@ -1,3 +1,5 @@ # List of requirements for functional tests versioneer numpy +pytest +pytest-cov diff --git a/build/test-requirements.txt b/build/test-requirements.txt index 4229104ddcc9..c5c18a048f56 100644 --- a/build/test-requirements.txt +++ b/build/test-requirements.txt @@ -27,3 +27,7 @@ namedpipe; platform_system == "Windows" # typing for Django files django-stubs + +# for coverage +coverage +pytest-cov diff --git a/noxfile.py b/noxfile.py index 58ac6f1206aa..60e22d461074 100644 --- a/noxfile.py +++ b/noxfile.py @@ -27,6 +27,7 @@ def delete_dir(path: pathlib.Path, ignore_errors=None): shutil.rmtree(os.fspath(path)) + @nox.session() def install_python_libs(session: nox.Session): requirements = [ @@ -63,79 +64,6 @@ def install_python_libs(session: nox.Session): if pathlib.Path("./python_files/lib/temp").exists(): shutil.rmtree("./python_files/lib/temp") -@nox.session() -def azure_pet_checkout(session: nox.Session): - branch = os.getenv("PYTHON_ENV_TOOLS_REF", "main") - - # dest dir should be /python-env-tools - dest_dir = (pathlib.Path(os.getenv("PYTHON_ENV_TOOLS_DEST")) / "python-env-tools").resolve() - - # temp dir should be - temp_dir = (pathlib.Path(os.getenv("PYTHON_ENV_TOOLS_TEMP")) / "python-env-tools").resolve() - session.log(f"Cloning python-environment-tools to {temp_dir}") - temp_dir.mkdir(0o766, parents=True, exist_ok=True) - - try: - with session.cd(temp_dir): - session.run("git", "init", external=True) - session.run( - "git", - "remote", - "add", - "origin", - "https://github.com/microsoft/python-environment-tools", - external=True, - ) - session.run("git", "fetch", "origin", branch, external=True) - session.run( - "git", "checkout", "--force", "-B", branch, f"origin/{branch}", external=True - ) - delete_dir(temp_dir / ".git") - delete_dir(temp_dir / ".github") - delete_dir(temp_dir / ".vscode") - (temp_dir / "CODE_OF_CONDUCT.md").unlink() - shutil.move(os.fspath(temp_dir), os.fspath(dest_dir)) - except PermissionError as e: - print(f"Permission error: {e}") - if not dest_dir.exists(): - raise - finally: - delete_dir(temp_dir, ignore_errors=True) - - -@nox.session() -def azure_pet_build_before(session: nox.Session): - source_dir = pathlib.Path(pathlib.Path.cwd() / "python-env-tools").resolve() - config_toml_disabled = source_dir / ".cargo" / "config.toml.disabled" - config_toml = source_dir / ".cargo" / "config.toml" - if config_toml_disabled.exists() and not config_toml.exists(): - config_toml.write_bytes(config_toml_disabled.read_bytes()) - - -@nox.session() -def azure_pet_build_after(session: nox.Session): - source_dir = pathlib.Path(pathlib.Path.cwd() / "python-env-tools").resolve() - ext = sysconfig.get_config_var("EXE") or "" - bin_name = f"pet{ext}" - - abs_bin_path = None - for root, _, files in os.walk(os.fspath(source_dir / "target")): - bin_path = pathlib.Path(root) / "release" / bin_name - if bin_path.exists(): - abs_bin_path = bin_path.absolute() - break - - assert abs_bin_path - - dest_dir = pathlib.Path(pathlib.Path.cwd() / "python-env-tools").resolve() - if not pathlib.Path(dest_dir / "bin").exists(): - pathlib.Path(dest_dir / "bin").mkdir() - bin_dest = dest_dir / "bin" / bin_name - shutil.copyfile(abs_bin_path, bin_dest) - - if sys.platform != "win32": - os.chmod(os.fspath(bin_dest), 0o755) - @nox.session() def native_build(session: nox.Session): diff --git a/package-lock.json b/package-lock.json index 73b3b4431bb1..db4f8dcab84f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,25 +1,25 @@ { "name": "python", - "version": "2024.13.0-dev", + "version": "2024.15.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "python", - "version": "2024.13.0-dev", + "version": "2024.15.0-dev", "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", "@vscode/extension-telemetry": "^0.8.4", "arch": "^2.1.0", - "fs-extra": "^10.0.1", + "fs-extra": "^11.2.0", "glob": "^7.2.0", "hash.js": "^1.1.7", "iconv-lite": "^0.6.3", - "inversify": "^5.0.4", + "inversify": "^6.0.2", "jsonc-parser": "^3.0.0", "lodash": "^4.17.21", - "minimatch": "^5.0.1", + "minimatch": "^5.1.6", "named-js-regexp": "^1.3.3", "node-stream-zip": "^1.6.0", "reflect-metadata": "^0.1.12", @@ -31,11 +31,10 @@ "tmp": "^0.0.33", "uint64be": "^3.0.0", "unicode": "^14.0.0", - "untildify": "^4.0.0", "vscode-debugprotocol": "^1.28.0", - "vscode-jsonrpc": "^9.0.0-next.2", - "vscode-languageclient": "^10.0.0-next.2", - "vscode-languageserver-protocol": "^3.17.6-next.3", + "vscode-jsonrpc": "^9.0.0-next.5", + "vscode-languageclient": "^10.0.0-next.12", + "vscode-languageserver-protocol": "^3.17.6-next.10", "vscode-tas-client": "^0.1.84", "which": "^2.0.2", "winreg": "^1.2.4", @@ -48,22 +47,22 @@ "@types/chai-arrays": "^2.0.0", "@types/chai-as-promised": "^7.1.0", "@types/download": "^8.0.1", - "@types/fs-extra": "^9.0.13", + "@types/fs-extra": "^11.0.4", "@types/glob": "^7.2.0", "@types/lodash": "^4.14.104", "@types/mocha": "^9.1.0", - "@types/node": "^18.17.1", + "@types/node": "^22.5.0", "@types/semver": "^5.5.0", "@types/shortid": "^0.0.29", - "@types/sinon": "^10.0.11", + "@types/sinon": "^17.0.3", "@types/stack-trace": "0.0.29", "@types/tmp": "^0.0.33", - "@types/vscode": "^1.81.0", + "@types/vscode": "^1.93.0", "@types/which": "^2.0.1", "@types/winreg": "^1.2.30", "@types/xml2js": "^0.4.2", - "@typescript-eslint/eslint-plugin": "^3.7.0", - "@typescript-eslint/parser": "^3.7.0", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "@vscode/test-electron": "^2.3.8", "@vscode/vsce": "^2.27.0", "bent": "^7.3.12", @@ -71,13 +70,14 @@ "chai-arrays": "^2.0.0", "chai-as-promised": "^7.1.1", "copy-webpack-plugin": "^9.1.0", + "cross-env": "^7.0.3", "cross-spawn": "^6.0.5", "del": "^6.0.0", "download": "^8.0.0", "eslint": "^7.2.0", "eslint-config-airbnb": "^18.2.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.4", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.3.1", "eslint-plugin-react": "^7.20.3", "eslint-plugin-react-hooks": "^4.0.0", @@ -96,14 +96,14 @@ "prettier": "^2.0.2", "rewiremock": "^3.13.0", "shortid": "^2.2.8", - "sinon": "^13.0.1", + "sinon": "^18.0.0", "source-map-support": "^0.5.12", "ts-loader": "^9.2.8", "ts-mockito": "^2.5.0", "ts-node": "^10.7.0", "tsconfig-paths-webpack-plugin": "^3.2.0", "typemoq": "^2.1.0", - "typescript": "4.5.5", + "typescript": "~5.2", "uuid": "^8.3.2", "webpack": "^5.76.0", "webpack-bundle-analyzer": "^4.5.0", @@ -116,7 +116,7 @@ "yargs": "^15.3.1" }, "engines": { - "vscode": "^1.89.0-20240415" + "vscode": "^1.94.0-20240918" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -882,6 +882,42 @@ "node": ">=10.0.0" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, "node_modules/@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -1082,14 +1118,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -1105,22 +1141,22 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" } }, "node_modules/@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "node_modules/@jridgewell/sourcemap-codec": { @@ -1130,13 +1166,13 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "node_modules/@microsoft/1ds-core-js": { @@ -1475,38 +1511,47 @@ } }, "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "dependencies": { "type-detect": "4.0.8" } }, "node_modules/@sinonjs/fake-timers": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.1.tgz", - "integrity": "sha512-Wp5vwlZ0lOqpSYGKqr53INws9HLkt6JDc/pDZcPf7bchQnrXJMXPns8CXx0hFikMSGSWfvtvvpb2gtMVfkWagA==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", + "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "node_modules/@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.6.0", + "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" } }, + "node_modules/@sinonjs/samsam/node_modules/@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", + "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", "dev": true }, "node_modules/@tootallnate/once": { @@ -1601,44 +1646,19 @@ "@types/node": "*" } }, - "node_modules/@types/eslint": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz", - "integrity": "sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==", - "dev": true, - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", - "dev": true, - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "node_modules/@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "node_modules/@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "node_modules/@types/fs-extra": { - "version": "9.0.13", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", - "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "dependencies": { + "@types/jsonfile": "*", "@types/node": "*" } }, @@ -1678,9 +1698,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/json5": { @@ -1689,6 +1709,15 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "node_modules/@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/lodash": { "version": "4.14.181", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.181.tgz", @@ -1708,10 +1737,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "18.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.14.tgz", - "integrity": "sha512-ZE/5aB73CyGqgQULkLG87N9GnyGe5TcQjv34pwS8tfBs1IkCh0ASM69mydb2znqd6v0eX+9Ytvk6oQRqu8T1Vw==", - "dev": true + "version": "22.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz", + "integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } }, "node_modules/@types/semver": { "version": "5.5.0", @@ -1731,9 +1763,9 @@ "dev": true }, "node_modules/@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", + "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -1764,9 +1796,9 @@ "dev": true }, "node_modules/@types/vscode": { - "version": "1.81.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.81.0.tgz", - "integrity": "sha512-YIaCwpT+O2E7WOMq0eCgBEABE++SX3Yl/O02GoMIF2DO3qAtvw7m6BXFYsxnc6XyzwZgh6/s/UG78LSSombl2w==", + "version": "1.93.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.93.0.tgz", + "integrity": "sha512-kUK6jAHSR5zY8ps42xuW89NLcBpw1kOabah7yv38J8MyiYuOHxLQBi0e7zeXbQgVefDy/mZZetqEFC+Fl5eIEQ==", "dev": true }, "node_modules/@types/which": { @@ -1791,28 +1823,33 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/experimental-utils": "3.10.1", - "debug": "^4.1.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^3.0.0", - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1821,9 +1858,9 @@ } }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1837,50 +1874,88 @@ } } }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "node_modules/@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "dependencies": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, - "node_modules/@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", + "node_modules/@typescript-eslint/parser/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" + "ms": "2.1.2" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1888,13 +1963,30 @@ } } }, + "node_modules/@typescript-eslint/type-utils/node_modules/debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1902,22 +1994,22 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1929,10 +2021,19 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "dependencies": { "ms": "2.1.2" @@ -1946,22 +2047,81 @@ } } }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, "dependencies": { - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, "node_modules/@ungap/promise-all-settled": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", @@ -2219,148 +2379,148 @@ } }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "dependencies": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "node_modules/@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "node_modules/@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "node_modules/@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "dependencies": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "dependencies": { "@xtuc/ieee754": "^1.2.0" } }, "node_modules/@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "dependencies": { "@xtuc/long": "4.2.2" } }, "node_modules/@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "dependencies": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -2431,6 +2591,15 @@ "acorn": "^8" } }, + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -2712,6 +2881,22 @@ "node": ">=0.10.0" } }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", @@ -2722,15 +2907,16 @@ } }, "node_modules/array-includes": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", - "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -2758,15 +2944,36 @@ "node": ">=8" } }, - "node_modules/array.prototype.flat": { + "node_modules/array.prototype.findlastindex": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -2776,14 +2983,37 @@ } }, "node_modules/array.prototype.flatmap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz", - "integrity": "sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -2931,10 +3161,13 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -3274,9 +3507,9 @@ } }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "funding": [ { @@ -3293,10 +3526,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -3458,9 +3691,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001512", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001512.tgz", - "integrity": "sha512-2S9nK0G/mE+jasCUsMPlARhRCts1ebcp2Ji8Y8PWi4NDE1iRdLCnEPHkEfeBrGC45L4isBx5ur3IQ6yTE2mRZw==", + "version": "1.0.30001655", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz", + "integrity": "sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==", "dev": true, "funding": [ { @@ -4180,6 +4413,68 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, + "node_modules/cross-env/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-env/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-env/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cross-env/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -4254,6 +4549,57 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -4541,15 +4887,20 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "dependencies": { - "object-keys": "^1.0.12" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/del": { @@ -4803,15 +5154,15 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.450", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.450.tgz", - "integrity": "sha512-BLG5HxSELlrMx7dJ2s+8SFlsCtJp37Zpk2VAxyC6CZtbc+9AJeZHfYHbrlSgdXp6saQ8StMqOTEDaBKgA7u1sw==", + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", + "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", "dev": true }, "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.7", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", + "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", "dev": true, "dependencies": { "bn.js": "^4.11.9", @@ -4862,9 +5213,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "dependencies": { "graceful-fs": "^4.2.4", @@ -4917,31 +5268,57 @@ } }, "node_modules/es-abstract": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.2.tgz", - "integrity": "sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -4971,12 +5348,47 @@ "node": ">= 0.4" } }, - "node_modules/es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", - "dev": true - }, + "node_modules/es-module-lexer": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -5007,9 +5419,9 @@ "dev": true }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -5133,13 +5545,14 @@ } }, "node_modules/eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "dependencies": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" } }, "node_modules/eslint-import-resolver-node/node_modules/debug": { @@ -5152,16 +5565,20 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", - "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "dependencies": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "engines": { "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } } }, "node_modules/eslint-module-utils/node_modules/debug": { @@ -5173,83 +5590,29 @@ "ms": "^2.1.1" } }, - "node_modules/eslint-module-utils/node_modules/find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "dependencies": { - "locate-path": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "dependencies": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "dependencies": { - "p-try": "^1.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "dependencies": { - "p-limit": "^1.1.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/eslint-module-utils/node_modules/p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/eslint-plugin-import": { - "version": "2.25.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", - "integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, "dependencies": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.2", - "has": "^1.0.3", - "is-core-module": "^2.8.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.5", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.12.0" + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" }, "engines": { "node": ">=4" @@ -5258,6 +5621,15 @@ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" } }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/eslint-plugin-import/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5270,6 +5642,15 @@ "node": "*" } }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-jsx-a11y": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz", @@ -6238,6 +6619,15 @@ "readable-stream": "^2.3.6" } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -6259,12 +6649,6 @@ "node": ">=0.10.0" } }, - "node_modules/foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "node_modules/foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -6358,16 +6742,16 @@ "dev": true }, "node_modules/fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=12" + "node": ">=14.14" } }, "node_modules/fs-extra/node_modules/jsonfile": { @@ -6438,12 +6822,39 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -6521,13 +6932,14 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -6686,6 +7098,22 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -6778,6 +7206,12 @@ "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "dev": true }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "node_modules/growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -7178,6 +7612,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "dependencies": { "function-bind": "^1.1.1" }, @@ -7186,9 +7621,9 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7261,12 +7696,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -7323,7 +7758,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "dependencies": { "function-bind": "^1.1.2" }, @@ -7481,9 +7915,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -7589,13 +8023,13 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" }, "engines": { @@ -7625,9 +8059,9 @@ } }, "node_modules/inversify": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/inversify/-/inversify-5.0.5.tgz", - "integrity": "sha512-60QsfPz8NAU/GZqXu8hJ+BhNf/C/c+Hp0eDc6XMIJTxBiP36AQyyQKpBkOVTLWBFDQWYVHpbbEuIsHu9dLuJDA==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/inversify/-/inversify-6.0.2.tgz", + "integrity": "sha512-i9m8j/7YIv4mDuYXUAcrpKPSaju/CIly9AHK5jvCBeoiM/2KEsuCQTTP+rzSWWpLYWRukdXFSl6ZTk2/uumbiA==" }, "node_modules/is-absolute": { "version": "1.0.0", @@ -7658,11 +8092,30 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7679,6 +8132,22 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -7686,9 +8155,9 @@ "dev": true }, "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, "engines": { "node": ">= 0.4" @@ -7698,11 +8167,29 @@ } }, "node_modules/is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, "dependencies": { - "has": "^1.0.3" + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7815,9 +8302,9 @@ } }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true, "engines": { "node": ">= 0.4" @@ -7835,6 +8322,21 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", @@ -7918,10 +8420,16 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -7966,16 +8474,12 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -8484,9 +8988,9 @@ } }, "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", "dev": true }, "node_modules/jwa": { @@ -8710,7 +9214,7 @@ "node_modules/lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "node_modules/lodash.includes": { @@ -9023,9 +9527,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -9109,9 +9613,10 @@ "dev": true }, "node_modules/minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -9537,16 +10042,16 @@ "dev": true }, "node_modules/nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-6.0.0.tgz", + "integrity": "sha512-K8ePqo9BFvN31HXwEtTNGzgrPpmvgciDsFz8aztFjt4LqKO/JeFD8tBOeuDiCMXrIl/m1YvfH8auSpxfaD09wg==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/text-encoding": "^0.7.2", + "just-extend": "^6.2.0", + "path-to-regexp": "^6.2.1" } }, "node_modules/node-abi": { @@ -9811,9 +10316,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/node-stream-zip": { @@ -10005,14 +10510,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -10052,14 +10557,15 @@ } }, "node_modules/object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -10068,6 +10574,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object.hasown": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz", @@ -10094,14 +10614,14 @@ } }, "node_modules/object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -10424,15 +10944,6 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -10477,18 +10988,9 @@ } }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/path-to-regexp/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", "dev": true }, "node_modules/path-type": { @@ -10532,9 +11034,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true }, "node_modules/picomatch": { @@ -10603,7 +11105,16 @@ "extend-shallow": "^3.0.2" }, "engines": { - "node": ">= 0.10" + "node": ">= 0.10" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" } }, "node_modules/postinstall-build": { @@ -10963,13 +11474,15 @@ "dev": true }, "node_modules/regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -11261,12 +11774,53 @@ "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.6.7.tgz", "integrity": "sha512-szN4fK+TqBPOFBcBcsR0g2cmTTUF/vaFEOZNuSdfU8/pGFnNmmn2u8SystYXG1QMrjOPBc6XTKHMVfENDf6hHw==" }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -11278,9 +11832,9 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.8", @@ -11378,6 +11932,21 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -11545,17 +12114,17 @@ } }, "node_modules/sinon": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", - "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", + "integrity": "sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA==", "dev": true, "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.0.0", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.2.0", + "nise": "^6.0.0", + "supports-color": "^7" }, "funding": { "type": "opencollective", @@ -11563,9 +12132,9 @@ } }, "node_modules/sinon/node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true, "engines": { "node": ">=0.3.1" @@ -11892,27 +12461,50 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -12167,13 +12759,13 @@ } }, "node_modules/terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", "dev": true, "dependencies": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" }, @@ -12185,16 +12777,16 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz", - "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "dependencies": { + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -12218,6 +12810,15 @@ } } }, + "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, "node_modules/test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -12396,6 +12997,18 @@ "node": ">=0.10.0" } }, + "node_modules/ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "engines": { + "node": ">=16" + }, + "peerDependencies": { + "typescript": ">=4.2.0" + } + }, "node_modules/ts-loader": { "version": "9.2.8", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.8.tgz", @@ -12538,13 +13151,13 @@ } }, "node_modules/tsconfig-paths": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", - "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "dependencies": { "@types/json5": "^0.0.29", - "json5": "^1.0.1", + "json5": "^1.0.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" } @@ -12656,21 +13269,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, - "engines": { - "node": ">= 6" - }, - "peerDependencies": { - "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" - } - }, "node_modules/tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -12729,6 +13327,79 @@ "node": ">=8" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typed-rest-client": { "version": "1.8.11", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", @@ -12765,16 +13436,16 @@ } }, "node_modules/typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/uc.micro": { @@ -12789,14 +13460,14 @@ "integrity": "sha512-mliiCSrsE29aNBI7O9W5gGv6WmA9kBR8PtTt6Apaxns076IRdYrrtFhXHEWMj5CSum3U7cv7/pi4xmi4XsIOqg==" }, "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -12861,6 +13532,12 @@ "fastest-levenshtein": "^1.0.7" } }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, "node_modules/unicode": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/unicode/-/unicode-14.0.0.tgz", @@ -12879,18 +13556,10 @@ "through2-filter": "^3.0.0" } }, - "node_modules/untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", - "engines": { - "node": ">=8" - } - }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "funding": [ { @@ -12907,8 +13576,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" }, "bin": { "update-browserslist-db": "cli.js" @@ -13203,24 +13872,24 @@ "deprecated": "This package has been renamed to @vscode/debugprotocol, please update to the new name" }, "node_modules/vscode-jsonrpc": { - "version": "9.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz", - "integrity": "sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==", + "version": "9.0.0-next.5", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.5.tgz", + "integrity": "sha512-Sl/8RAJtfF/2x/TPBVRuhzRAcqYR/QDjEjNqMcoKFfqsxfVUPzikupRDQYB77Gkbt1RrW43sSuZ5uLtNAcikQQ==", "engines": { "node": ">=14.0.0" } }, "node_modules/vscode-languageclient": { - "version": "10.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.2.tgz", - "integrity": "sha512-ERKtgOkto4pHCxC2u1K3FfsYHSt8AeuZJjg1u/3TvnrCbBkMxrpn5mHWkh4m3rl6qo2Wk4m9YFgU6F7KCWQNZw==", + "version": "10.0.0-next.12", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.12.tgz", + "integrity": "sha512-q7cVYCcYiv+a+fJYCbjMMScOGBnX162IBeUMFg31mvnN7RHKx5/CwKaCz+r+RciJrRXMqS8y8qpEVGgeIPnbxg==", "dependencies": { "minimatch": "^9.0.3", "semver": "^7.6.0", - "vscode-languageserver-protocol": "3.17.6-next.3" + "vscode-languageserver-protocol": "3.17.6-next.10" }, "engines": { - "vscode": "^1.86.0" + "vscode": "^1.91.0" } }, "node_modules/vscode-languageclient/node_modules/brace-expansion": { @@ -13246,18 +13915,18 @@ } }, "node_modules/vscode-languageserver-protocol": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.3.tgz", - "integrity": "sha512-H8ATH5SAvc3JzttS+AL6g681PiBOZM/l34WP2JZk4akY3y7NqTP+f9cJ+MhrVBbD3aDS8bdAKewZgbFLW6M8Pg==", + "version": "3.17.6-next.10", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.10.tgz", + "integrity": "sha512-KOrrWn4NVC5jnFC5N6y/fyNKtx8rVYr67lhL/Z0P4ZBAN27aBsCnLBWAMIkYyJ1K8EZaE5r7gqdxrS9JPB6LIg==", "dependencies": { - "vscode-jsonrpc": "9.0.0-next.2", - "vscode-languageserver-types": "3.17.6-next.3" + "vscode-jsonrpc": "9.0.0-next.5", + "vscode-languageserver-types": "3.17.6-next.5" } }, "node_modules/vscode-languageserver-types": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz", - "integrity": "sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==" + "version": "3.17.6-next.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.5.tgz", + "integrity": "sha512-QFmf3Yl1tCgUQfA77N9Me/LXldJXkIVypQbty2rJ1DNHQkC+iwvm4Z2tXg9czSwlhvv0pD4pbF5mT7WhAglolw==" }, "node_modules/vscode-tas-client": { "version": "0.1.84", @@ -13271,9 +13940,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dev": true, "dependencies": { "glob-to-regexp": "^0.4.1", @@ -13284,34 +13953,33 @@ } }, "node_modules/webpack": { - "version": "5.76.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", - "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { @@ -13581,45 +14249,17 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/which-boxed-primitive/node_modules/is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-boxed-primitive/node_modules/is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/which-typed-array": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -14634,6 +15274,29 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + } + } + }, + "@eslint-community/regexpp": { + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.0.tgz", + "integrity": "sha512-G/M/tIiMrTAxEWRfLfQJMmGNX28IxBg4PBz8XqQhqUHLFI6TL2htpIB1iQCj144V5ee/JaKyT9/WZ0MGZWfA7A==", + "dev": true + }, "@eslint/eslintrc": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", @@ -14777,14 +15440,14 @@ "dev": true }, "@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "requires": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" } }, "@jridgewell/resolve-uri": { @@ -14794,19 +15457,19 @@ "dev": true }, "@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true }, "@jridgewell/source-map": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", - "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", "dev": true, "requires": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" } }, "@jridgewell/sourcemap-codec": { @@ -14816,13 +15479,13 @@ "dev": true }, "@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "requires": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, "@microsoft/1ds-core-js": { @@ -15101,38 +15764,49 @@ "dev": true }, "@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", "dev": true, "requires": { "type-detect": "4.0.8" } }, "@sinonjs/fake-timers": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.1.tgz", - "integrity": "sha512-Wp5vwlZ0lOqpSYGKqr53INws9HLkt6JDc/pDZcPf7bchQnrXJMXPns8CXx0hFikMSGSWfvtvvpb2gtMVfkWagA==", + "version": "11.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-11.2.2.tgz", + "integrity": "sha512-G2piCSxQ7oWOxwGSAyFHfPIsyeJGXYtc6mFbnFA+kRXkiEnTl8c/8jul2S329iFBnDI9HGoeWWAZvuvOkZccgw==", "dev": true, "requires": { - "@sinonjs/commons": "^1.7.0" + "@sinonjs/commons": "^3.0.0" } }, "@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-8.0.0.tgz", + "integrity": "sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew==", "dev": true, "requires": { - "@sinonjs/commons": "^1.6.0", + "@sinonjs/commons": "^2.0.0", "lodash.get": "^4.4.2", "type-detect": "^4.0.8" + }, + "dependencies": { + "@sinonjs/commons": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-2.0.0.tgz", + "integrity": "sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + } } }, "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.3.tgz", + "integrity": "sha512-DE427ROAphMQzU4ENbliGYrBSYPXF+TtLg9S8vzeA+OF4ZKzoDdzfL8sxuMUGS/lgRhM6j1URSk9ghf7Xo1tyA==", "dev": true }, "@tootallnate/once": { @@ -15224,44 +15898,19 @@ "@types/node": "*" } }, - "@types/eslint": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.1.tgz", - "integrity": "sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==", - "dev": true, - "requires": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "@types/eslint-scope": { - "version": "3.7.3", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", - "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", - "dev": true, - "requires": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, "@types/estree": { - "version": "0.0.51", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", - "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==", "dev": true }, "@types/fs-extra": { - "version": "9.0.13", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz", - "integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz", + "integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==", "dev": true, "requires": { + "@types/jsonfile": "*", "@types/node": "*" } }, @@ -15300,9 +15949,9 @@ } }, "@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "@types/json5": { @@ -15311,6 +15960,15 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/jsonfile": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz", + "integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/lodash": { "version": "4.14.181", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.181.tgz", @@ -15330,10 +15988,13 @@ "dev": true }, "@types/node": { - "version": "18.17.14", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.17.14.tgz", - "integrity": "sha512-ZE/5aB73CyGqgQULkLG87N9GnyGe5TcQjv34pwS8tfBs1IkCh0ASM69mydb2znqd6v0eX+9Ytvk6oQRqu8T1Vw==", - "dev": true + "version": "22.5.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz", + "integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==", + "dev": true, + "requires": { + "undici-types": "~6.19.2" + } }, "@types/semver": { "version": "5.5.0", @@ -15353,9 +16014,9 @@ "dev": true }, "@types/sinon": { - "version": "10.0.11", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.11.tgz", - "integrity": "sha512-dmZsHlBsKUtBpHriNjlK0ndlvEh8dcb9uV9Afsbt89QIyydpC7NcR+nWlAhASfy3GHnxTl4FX/aKE7XZUt/B4g==", + "version": "17.0.3", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-17.0.3.tgz", + "integrity": "sha512-j3uovdn8ewky9kRBG19bOwaZbexJu/XjtkHyjvUgt4xfPFz18dcORIMqnYh66Fx3Powhcr85NT5+er3+oViapw==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -15386,9 +16047,9 @@ "dev": true }, "@types/vscode": { - "version": "1.81.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.81.0.tgz", - "integrity": "sha512-YIaCwpT+O2E7WOMq0eCgBEABE++SX3Yl/O02GoMIF2DO3qAtvw7m6BXFYsxnc6XyzwZgh6/s/UG78LSSombl2w==", + "version": "1.93.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.93.0.tgz", + "integrity": "sha512-kUK6jAHSR5zY8ps42xuW89NLcBpw1kOabah7yv38J8MyiYuOHxLQBi0e7zeXbQgVefDy/mZZetqEFC+Fl5eIEQ==", "dev": true }, "@types/which": { @@ -15412,24 +16073,53 @@ "@types/node": "*" } }, - "@typescript-eslint/eslint-plugin": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.1.tgz", - "integrity": "sha512-PQg0emRtzZFWq6PxBcdxRH3QIQiyFO3WCVpRL3fgj5oQS3CDs3AeAKfv4DxNhzn8ITdNJGJ4D3Qw8eAJf3lXeQ==", + "@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "requires": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.21.0.tgz", + "integrity": "sha512-tbsV1jPne5CkFQCgPBcDOt30ItF7aJoZL997JSF7MhGQqOeT3svWRYxiqlfA5RUdlHN6Fi+EI9bxqbdyAUZjYQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "3.10.1", - "debug": "^4.1.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^3.0.0", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4" }, "dependencies": { "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "requires": { "ms": "2.1.2" @@ -15437,72 +16127,129 @@ } } }, - "@typescript-eslint/experimental-utils": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.1.tgz", - "integrity": "sha512-DewqIgscDzmAfd5nOGe4zm6Bl7PKtMG2Ad0KG8CUZAHlXfAKTF9Ol5PXhiMh39yRL2ChRH1cuuUGOcVyyrhQIw==", + "@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", "dev": true, "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" } }, - "@typescript-eslint/parser": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.10.1.tgz", - "integrity": "sha512-Ug1RcWcrJP02hmtaXVS3axPPTTPnZjupqhgj+NnZ6BCkwSImWk/283347+x9wN+lqOdK9Eo3vsyiyDHgsmiEJw==", + "@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", "dev": true, "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.10.1", - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/typescript-estree": "3.10.1", - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + } } }, "@typescript-eslint/types": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", - "integrity": "sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.1.tgz", - "integrity": "sha512-QbcXOuq6WYvnB3XPsZpIwztBoquEYLXh2MtwVU+kO8jgYCiv4G5xrSP/1wg4tkvrEE+esZVquIPX/dxPlePk1w==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, "requires": { - "@typescript-eslint/types": "3.10.1", - "@typescript-eslint/visitor-keys": "3.10.1", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" }, "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, "debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz", + "integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==", "dev": true, "requires": { "ms": "2.1.2" } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, + "@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "dependencies": { + "@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true } } }, "@typescript-eslint/visitor-keys": { - "version": "3.10.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.1.tgz", - "integrity": "sha512-9JgC82AaQeglebjZMgYR5wgmfUdUc+EitGUUMW8u2nDckaeimzW+VsoLV6FoimPv2id3VQzfjwBxEMVz08ameQ==", + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true + } } }, "@ungap/promise-all-settled": { @@ -15683,148 +16430,148 @@ "optional": true }, "@webassemblyjs/ast": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", - "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dev": true, "requires": { - "@webassemblyjs/helper-numbers": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + "@webassemblyjs/helper-numbers": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", - "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz", + "integrity": "sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", - "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz", + "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", - "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==", "dev": true }, "@webassemblyjs/helper-numbers": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", - "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz", + "integrity": "sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g==", "dev": true, "requires": { - "@webassemblyjs/floating-point-hex-parser": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/floating-point-hex-parser": "1.11.6", + "@webassemblyjs/helper-api-error": "1.11.6", "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", - "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz", + "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", - "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/wasm-gen": "1.12.1" } }, "@webassemblyjs/ieee754": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", - "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz", + "integrity": "sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", - "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz", + "integrity": "sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ==", "dev": true, "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", - "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "version": "1.11.6", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz", + "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", - "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/helper-wasm-section": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-opt": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", - "@webassemblyjs/wast-printer": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "@webassemblyjs/wasm-gen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", - "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wasm-opt": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", - "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-buffer": "1.11.1", - "@webassemblyjs/wasm-gen": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "@webassemblyjs/wasm-parser": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", - "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/helper-api-error": "1.11.1", - "@webassemblyjs/helper-wasm-bytecode": "1.11.1", - "@webassemblyjs/ieee754": "1.11.1", - "@webassemblyjs/leb128": "1.11.1", - "@webassemblyjs/utf8": "1.11.1" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-api-error": "1.11.6", + "@webassemblyjs/helper-wasm-bytecode": "1.11.6", + "@webassemblyjs/ieee754": "1.11.6", + "@webassemblyjs/leb128": "1.11.6", + "@webassemblyjs/utf8": "1.11.6" } }, "@webassemblyjs/wast-printer": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", - "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -15874,6 +16621,13 @@ "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", "requires": {} }, + "acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", + "dev": true, + "requires": {} + }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", @@ -16075,6 +16829,16 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dev": true, + "requires": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + } + }, "array-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", @@ -16082,15 +16846,16 @@ "dev": true }, "array-includes": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz", - "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "get-intrinsic": "^1.1.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" } }, @@ -16106,26 +16871,58 @@ "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, - "array.prototype.flat": { + "array.prototype.findlastindex": { "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz", - "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + } + }, + "array.prototype.flat": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz", + "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" } }, "array.prototype.flatmap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz", - "integrity": "sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz", + "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.0" + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0" + } + }, + "arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" } }, "asn1.js": { @@ -16247,10 +17044,13 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "requires": { + "possible-typed-array-names": "^1.0.0" + } }, "axe-core": { "version": "4.4.1", @@ -16534,15 +17334,15 @@ } }, "browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", "dev": true, "requires": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" } }, "buffer": { @@ -16668,9 +17468,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30001512", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001512.tgz", - "integrity": "sha512-2S9nK0G/mE+jasCUsMPlARhRCts1ebcp2Ji8Y8PWi4NDE1iRdLCnEPHkEfeBrGC45L4isBx5ur3IQ6yTE2mRZw==", + "version": "1.0.30001655", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001655.tgz", + "integrity": "sha512-jRGVy3iSGO5Uutn2owlb5gR6qsGngTw9ZTb4ali9f3glshcNmJ2noam4Mo9zia5P9Dk3jNNydy7vQjuE5dQmfg==", "dev": true }, "caseless": { @@ -17238,6 +18038,49 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -17299,6 +18142,39 @@ "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==", "dev": true }, + "data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, + "data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -17530,12 +18406,14 @@ "dev": true }, "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "del": { @@ -17745,15 +18623,15 @@ } }, "electron-to-chromium": { - "version": "1.4.450", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.450.tgz", - "integrity": "sha512-BLG5HxSELlrMx7dJ2s+8SFlsCtJp37Zpk2VAxyC6CZtbc+9AJeZHfYHbrlSgdXp6saQ8StMqOTEDaBKgA7u1sw==", + "version": "1.5.13", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.13.tgz", + "integrity": "sha512-lbBcvtIJ4J6sS4tb5TLp1b4LyfCdMkwStzXPyAgVgTRAsep4bvrAGaBOP7ZJtQMNJpSQ9SqG4brWOroNaQtm7Q==", "dev": true }, "elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", + "version": "6.5.7", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.7.tgz", + "integrity": "sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==", "dev": true, "requires": { "bn.js": "^4.11.9", @@ -17803,9 +18681,9 @@ } }, "enhanced-resolve": { - "version": "5.12.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.12.0.tgz", - "integrity": "sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dev": true, "requires": { "graceful-fs": "^4.2.4", @@ -17842,31 +18720,57 @@ "dev": true }, "es-abstract": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.2.tgz", - "integrity": "sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dev": true, "requires": { - "call-bind": "^1.0.2", + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" } }, "es-define-property": { @@ -17885,11 +18789,40 @@ "dev": true }, "es-module-lexer": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", - "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "dev": true }, + "es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dev": true, + "requires": { + "es-errors": "^1.3.0" + } + }, + "es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + } + }, + "es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "requires": { + "hasown": "^2.0.0" + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", @@ -17914,9 +18847,9 @@ "dev": true }, "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true }, "escape-string-regexp": { @@ -18162,13 +19095,14 @@ "requires": {} }, "eslint-import-resolver-node": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", - "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", "dev": true, "requires": { "debug": "^3.2.7", - "resolve": "^1.20.0" + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" }, "dependencies": { "debug": { @@ -18183,13 +19117,12 @@ } }, "eslint-module-utils": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz", - "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", + "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", "dev": true, "requires": { - "debug": "^3.2.7", - "find-up": "^2.1.0" + "debug": "^3.2.7" }, "dependencies": { "debug": { @@ -18200,73 +19133,43 @@ "requires": { "ms": "^2.1.1" } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true } } }, "eslint-plugin-import": { - "version": "2.25.4", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", - "integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", + "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", "dev": true, "requires": { - "array-includes": "^3.1.4", - "array.prototype.flat": "^1.2.5", - "debug": "^2.6.9", + "array-includes": "^3.1.7", + "array.prototype.findlastindex": "^1.2.3", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", "doctrine": "^2.1.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-module-utils": "^2.7.2", - "has": "^1.0.3", - "is-core-module": "^2.8.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.8.0", + "hasown": "^2.0.0", + "is-core-module": "^2.13.1", "is-glob": "^4.0.3", - "minimatch": "^3.0.4", - "object.values": "^1.1.5", - "resolve": "^1.20.0", - "tsconfig-paths": "^3.12.0" + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.7", + "object.groupby": "^1.0.1", + "object.values": "^1.1.7", + "semver": "^6.3.1", + "tsconfig-paths": "^3.15.0" }, "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -18275,6 +19178,12 @@ "requires": { "brace-expansion": "^1.1.7" } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true } } }, @@ -18840,8 +19749,17 @@ "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", "dev": true, "requires": { - "inherits": "^2.0.3", - "readable-stream": "^2.3.6" + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" } }, "for-in": { @@ -18859,12 +19777,6 @@ "for-in": "^1.0.1" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -18942,9 +19854,9 @@ "dev": true }, "fs-extra": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz", - "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", + "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", "requires": { "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", @@ -19003,12 +19915,30 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==" }, + "function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + } + }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -19059,13 +19989,14 @@ "dev": true }, "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" } }, "github-from-package": { @@ -19194,6 +20125,16 @@ "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true }, + "globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "requires": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + } + }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -19270,6 +20211,12 @@ "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -19577,14 +20524,15 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, "requires": { "function-bind": "^1.1.1" } }, "has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, "has-flag": { @@ -19630,12 +20578,12 @@ } }, "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "requires": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" } }, "hash-base": { @@ -19679,7 +20627,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", - "dev": true, "requires": { "function-bind": "^1.1.2" } @@ -19790,9 +20737,9 @@ "dev": true }, "ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true }, "immediate": { @@ -19873,13 +20820,13 @@ "dev": true }, "internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", + "es-errors": "^1.3.0", + "hasown": "^2.0.0", "side-channel": "^1.0.4" } }, @@ -19900,9 +20847,9 @@ } }, "inversify": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/inversify/-/inversify-5.0.5.tgz", - "integrity": "sha512-60QsfPz8NAU/GZqXu8hJ+BhNf/C/c+Hp0eDc6XMIJTxBiP36AQyyQKpBkOVTLWBFDQWYVHpbbEuIsHu9dLuJDA==" + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/inversify/-/inversify-6.0.2.tgz", + "integrity": "sha512-i9m8j/7YIv4mDuYXUAcrpKPSaju/CIly9AHK5jvCBeoiM/2KEsuCQTTP+rzSWWpLYWRukdXFSl6ZTk2/uumbiA==" }, "is-absolute": { "version": "1.0.0", @@ -19924,11 +20871,24 @@ "has-tostringtag": "^1.0.0" } }, + "is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + } + }, "is-bigint": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", - "dev": true + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } }, "is-binary-path": { "version": "2.1.0", @@ -19939,6 +20899,16 @@ "binary-extensions": "^2.0.0" } }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -19946,17 +20916,26 @@ "dev": true }, "is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, "is-core-module": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", - "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "requires": { + "hasown": "^2.0.2" + } + }, + "is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dev": true, "requires": { - "has": "^1.0.3" + "is-typed-array": "^1.1.13" } }, "is-date-object": { @@ -20027,9 +21006,9 @@ "dev": true }, "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "dev": true }, "is-number": { @@ -20038,6 +21017,15 @@ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } + }, "is-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", @@ -20097,10 +21085,13 @@ "dev": true }, "is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dev": true, + "requires": { + "call-bind": "^1.0.7" + } }, "is-stream": { "version": "1.1.0", @@ -20127,16 +21118,12 @@ } }, "is-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" + "which-typed-array": "^1.1.14" } }, "is-typedarray": { @@ -20532,9 +21519,9 @@ } }, "just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-6.2.0.tgz", + "integrity": "sha512-cYofQu2Xpom82S6qD778jBDpwvvy39s1l/hrYij2u9AMdQcGRpaBu6kY4mVhuno5kJVi1DAz4aiphA2WI1/OAw==", "dev": true }, "jwa": { @@ -20726,7 +21713,7 @@ "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", "dev": true }, "lodash.includes": { @@ -20991,9 +21978,9 @@ "dev": true }, "micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { "braces": "^3.0.3", @@ -21053,9 +22040,9 @@ "dev": true }, "minimatch": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.0.tgz", - "integrity": "sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "requires": { "brace-expansion": "^2.0.1" }, @@ -21375,16 +22362,16 @@ "dev": true }, "nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nise/-/nise-6.0.0.tgz", + "integrity": "sha512-K8ePqo9BFvN31HXwEtTNGzgrPpmvgciDsFz8aztFjt4LqKO/JeFD8tBOeuDiCMXrIl/m1YvfH8auSpxfaD09wg==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" + "@sinonjs/commons": "^3.0.0", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/text-encoding": "^0.7.2", + "just-extend": "^6.2.0", + "path-to-regexp": "^6.2.1" } }, "node-abi": { @@ -21604,9 +22591,9 @@ } }, "node-releases": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.12.tgz", - "integrity": "sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node-stream-zip": { @@ -21752,14 +22739,14 @@ "dev": true }, "object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, @@ -21787,14 +22774,26 @@ } }, "object.fromentries": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz", - "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + } + }, + "object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" } }, "object.hasown": { @@ -21817,14 +22816,14 @@ } }, "object.values": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz", - "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" } }, "once": { @@ -22075,12 +23074,6 @@ "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", "dev": true }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -22113,21 +23106,10 @@ "dev": true }, "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - } - } + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", + "dev": true }, "path-type": { "version": "4.0.0", @@ -22161,9 +23143,9 @@ "dev": true }, "picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true }, "picomatch": { @@ -22214,6 +23196,12 @@ "extend-shallow": "^3.0.2" } }, + "possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true + }, "postinstall-build": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/postinstall-build/-/postinstall-build-5.0.3.tgz", @@ -22501,13 +23489,15 @@ "dev": true }, "regexp.prototype.flags": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", - "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" } }, "regexpp": { @@ -22712,12 +23702,43 @@ "resolved": "https://registry.npmjs.org/rxjs-compat/-/rxjs-compat-6.6.7.tgz", "integrity": "sha512-szN4fK+TqBPOFBcBcsR0g2cmTTUF/vaFEOZNuSdfU8/pGFnNmmn2u8SystYXG1QMrjOPBc6XTKHMVfENDf6hHw==" }, + "safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, + "safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dev": true, + "requires": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -22729,9 +23750,9 @@ "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" }, "schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, "requires": { "@types/json-schema": "^7.0.8", @@ -22805,6 +23826,18 @@ "has-property-descriptors": "^1.0.2" } }, + "set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dev": true, + "requires": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + } + }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", @@ -22916,23 +23949,23 @@ } }, "sinon": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", - "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", + "version": "18.0.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-18.0.0.tgz", + "integrity": "sha512-+dXDXzD1sBO6HlmZDd7mXZCR/y5ECiEiGCBSGuFD/kZ0bDTofPYc6JaeGmPSF+1j1MejGUWkORbYOLDyvqCWpA==", "dev": true, "requires": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.0.0", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" + "@sinonjs/commons": "^3.0.1", + "@sinonjs/fake-timers": "^11.2.2", + "@sinonjs/samsam": "^8.0.0", + "diff": "^5.2.0", + "nise": "^6.0.0", + "supports-color": "^7" }, "dependencies": { "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.2.0.tgz", + "integrity": "sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==", "dev": true }, "has-flag": { @@ -23188,24 +24221,38 @@ "side-channel": "^1.0.4" } }, + "string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" + } + }, "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" } }, "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" } }, "strip-ansi": { @@ -23417,28 +24464,39 @@ } }, "terser": { - "version": "5.14.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", - "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", + "version": "5.31.6", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz", + "integrity": "sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg==", "dev": true, "requires": { - "@jridgewell/source-map": "^0.3.2", - "acorn": "^8.5.0", + "@jridgewell/source-map": "^0.3.3", + "acorn": "^8.8.2", "commander": "^2.20.0", "source-map-support": "~0.5.20" } }, "terser-webpack-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz", - "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dev": true, "requires": { + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", - "serialize-javascript": "^6.0.0", - "source-map": "^0.6.1", - "terser": "^5.7.2" + "serialize-javascript": "^6.0.1", + "terser": "^5.26.0" + }, + "dependencies": { + "serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + } } }, "test-exclude": { @@ -23588,6 +24646,13 @@ "escape-string-regexp": "^1.0.2" } }, + "ts-api-utils": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", + "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", + "dev": true, + "requires": {} + }, "ts-loader": { "version": "9.2.8", "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.2.8.tgz", @@ -23682,13 +24747,13 @@ } }, "tsconfig-paths": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz", - "integrity": "sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ==", + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", "dev": true, "requires": { "@types/json5": "^0.0.29", - "json5": "^1.0.1", + "json5": "^1.0.2", "minimist": "^1.2.6", "strip-bom": "^3.0.0" }, @@ -23777,15 +24842,6 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, - "tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", @@ -23829,6 +24885,58 @@ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", "dev": true }, + "typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + } + }, + "typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dev": true, + "requires": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + } + }, "typed-rest-client": { "version": "1.8.11", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.11.tgz", @@ -23861,9 +24969,9 @@ } }, "typescript": { - "version": "4.5.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", - "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "dev": true }, "uc.micro": { @@ -23878,14 +24986,14 @@ "integrity": "sha512-mliiCSrsE29aNBI7O9W5gGv6WmA9kBR8PtTt6Apaxns076IRdYrrtFhXHEWMj5CSum3U7cv7/pi4xmi4XsIOqg==" }, "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, @@ -23940,6 +25048,12 @@ "integrity": "sha512-+hhVICbnp+rlzZMgxXenpvTxpuvA67Bfgtt+O9WOE5jo7w/dyiF1VmoZVIHvP2EkUjsyKyTwYKlLhA+j47m1Ew==", "dev": true }, + "undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, "unicode": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/unicode/-/unicode-14.0.0.tgz", @@ -23955,19 +25069,14 @@ "through2-filter": "^3.0.0" } }, - "untildify": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", - "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==" - }, "update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", "dev": true, "requires": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.1.2", + "picocolors": "^1.0.1" } }, "uri-js": { @@ -24210,18 +25319,18 @@ "integrity": "sha512-+OMm11R1bGYbpIJ5eQIkwoDGFF4GvBz3Ztl6/VM+/RNNb2Gjk2c0Ku+oMmfhlTmTlPCpgHBsH4JqVCbUYhu5bA==" }, "vscode-jsonrpc": { - "version": "9.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.2.tgz", - "integrity": "sha512-meIaXAgChCHzWy45QGU8YpCNyqnZQ/sYeCj32OLDDbUYsCF7AvgpdXx3nnZn9yzr8ed0Od9bW+NGphEmXsqvIQ==" + "version": "9.0.0-next.5", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-9.0.0-next.5.tgz", + "integrity": "sha512-Sl/8RAJtfF/2x/TPBVRuhzRAcqYR/QDjEjNqMcoKFfqsxfVUPzikupRDQYB77Gkbt1RrW43sSuZ5uLtNAcikQQ==" }, "vscode-languageclient": { - "version": "10.0.0-next.2", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.2.tgz", - "integrity": "sha512-ERKtgOkto4pHCxC2u1K3FfsYHSt8AeuZJjg1u/3TvnrCbBkMxrpn5mHWkh4m3rl6qo2Wk4m9YFgU6F7KCWQNZw==", + "version": "10.0.0-next.12", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-10.0.0-next.12.tgz", + "integrity": "sha512-q7cVYCcYiv+a+fJYCbjMMScOGBnX162IBeUMFg31mvnN7RHKx5/CwKaCz+r+RciJrRXMqS8y8qpEVGgeIPnbxg==", "requires": { "minimatch": "^9.0.3", "semver": "^7.6.0", - "vscode-languageserver-protocol": "3.17.6-next.3" + "vscode-languageserver-protocol": "3.17.6-next.10" }, "dependencies": { "brace-expansion": { @@ -24243,18 +25352,18 @@ } }, "vscode-languageserver-protocol": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.3.tgz", - "integrity": "sha512-H8ATH5SAvc3JzttS+AL6g681PiBOZM/l34WP2JZk4akY3y7NqTP+f9cJ+MhrVBbD3aDS8bdAKewZgbFLW6M8Pg==", + "version": "3.17.6-next.10", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.6-next.10.tgz", + "integrity": "sha512-KOrrWn4NVC5jnFC5N6y/fyNKtx8rVYr67lhL/Z0P4ZBAN27aBsCnLBWAMIkYyJ1K8EZaE5r7gqdxrS9JPB6LIg==", "requires": { - "vscode-jsonrpc": "9.0.0-next.2", - "vscode-languageserver-types": "3.17.6-next.3" + "vscode-jsonrpc": "9.0.0-next.5", + "vscode-languageserver-types": "3.17.6-next.5" } }, "vscode-languageserver-types": { - "version": "3.17.6-next.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.3.tgz", - "integrity": "sha512-l5kNFXFRQGuzriXpuBqFpRmkf6f6A4VoU3h95OsVkqIOoi1k7KbwSo600cIdsKSJWrPg/+vX+QMPcMw1oI7ItA==" + "version": "3.17.6-next.5", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.6-next.5.tgz", + "integrity": "sha512-QFmf3Yl1tCgUQfA77N9Me/LXldJXkIVypQbty2rJ1DNHQkC+iwvm4Z2tXg9czSwlhvv0pD4pbF5mT7WhAglolw==" }, "vscode-tas-client": { "version": "0.1.84", @@ -24265,9 +25374,9 @@ } }, "watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dev": true, "requires": { "glob-to-regexp": "^0.4.1", @@ -24275,34 +25384,33 @@ } }, "webpack": { - "version": "5.76.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.76.0.tgz", - "integrity": "sha512-l5sOdYBDunyf72HW8dF23rFtWq/7Zgvt/9ftMof71E/yUb1YLOBmTgA2K4vQthB3kotMrSj609txVE0dnr2fjA==", + "version": "5.94.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz", + "integrity": "sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==", "dev": true, "requires": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^0.0.51", - "@webassemblyjs/ast": "1.11.1", - "@webassemblyjs/wasm-edit": "1.11.1", - "@webassemblyjs/wasm-parser": "1.11.1", + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.7.6", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.10.0", - "es-module-lexer": "^0.9.0", + "enhanced-resolve": "^5.17.1", + "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "schema-utils": "^3.1.0", + "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.1.3", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" } }, @@ -24477,37 +25585,19 @@ "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" - }, - "dependencies": { - "is-boolean-object": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", - "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", - "dev": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-number-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", - "dev": true - } } }, "which-typed-array": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" } }, "wildcard": { diff --git a/package.json b/package.json index 42b1a03ff281..613b965a4246 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "python", "displayName": "Python", "description": "Python language support with extension access points for IntelliSense (Pylance), Debugging (Python Debugger), linting, formatting, refactoring, unit tests, and more.", - "version": "2024.13.0-dev", + "version": "2024.15.0-dev", "featureFlags": { "usingNewInterpreterStorage": true }, @@ -24,7 +24,10 @@ "quickPickItemTooltip", "terminalDataWriteEvent", "terminalExecuteCommandEvent", - "contribIssueReporter" + "contribIssueReporter", + "codeActionAI", + "notebookReplDocument", + "notebookVariableProvider" ], "author": { "name": "Microsoft Corporation" @@ -45,7 +48,7 @@ "theme": "dark" }, "engines": { - "vscode": "^1.89.0-20240415" + "vscode": "^1.94.0-20240918" }, "enableTelemetry": false, "keywords": [ @@ -65,6 +68,7 @@ "onDebugInitialConfigurations", "onLanguage:python", "onDebugResolve:python", + "onCommand:python.copilotSetupTests", "workspaceContains:mspythonconfig.json", "workspaceContains:pyproject.toml", "workspaceContains:Pipfile", @@ -79,6 +83,30 @@ "browser": "./dist/extension.browser.js", "l10n": "./l10n", "contributes": { + "problemMatchers": + [ + { + "name": "python", + "owner": "python", + "source": "python", + "fileLocation": "autoDetect", + "pattern": [ + { + "regexp": "^.*File \\\"([^\\\"]|.*)\\\", line (\\d+).*", + "file": 1, + "line": 2 + }, + { + "regexp": "^\\s*(.*)\\s*$" + + }, + { + "regexp": "^\\s*(.*Error.*)$", + "message": 1 + } + ] + } + ], "walkthroughs": [ { "id": "pythonWelcome", @@ -630,6 +658,15 @@ "scope": "resource", "type": "array" }, + "python.terminal.shellIntegration.enabled": { + "default": false, + "description": "%python.terminal.shellIntegration.enabled.description%", + "scope": "resource", + "type": "boolean", + "tags": [ + "experimental" + ] + }, "python.REPL.enableREPLSmartSend": { "default": true, "description": "%python.EnableREPLSmartSend.description%", @@ -1125,17 +1162,22 @@ { "command": "python.execSelectionInTerminal", "key": "shift+enter", - "when": "editorTextFocus && editorLangId == python && !findInputFocussed && !replaceInputFocussed && !jupyter.ownsSelection && !notebookEditorFocused && activeEditor != 'workbench.editor.interactive'" + "when": "editorTextFocus && editorLangId == python && !findInputFocussed && !replaceInputFocussed && !jupyter.ownsSelection && !notebookEditorFocused && !isCompositeNotebook" }, { "command": "python.execInREPL", "key": "shift+enter", - "when": "!accessibilityModeEnabled && config.python.REPL.sendToNativeREPL && activeEditor != 'workbench.editor.interactive'&& editorLangId == python && editorTextFocus && !jupyter.ownsSelection && !notebookEditorFocused" + "when": "!accessibilityModeEnabled && config.python.REPL.sendToNativeREPL && editorLangId == python && editorTextFocus && !jupyter.ownsSelection && !notebookEditorFocused && !isCompositeNotebook" }, { "command": "python.execInREPLEnter", "key": "enter", - "when": "!config.interactiveWindow.executeWithShiftEnter && activeEditor == 'workbench.editor.interactive'" + "when": "!config.interactiveWindow.executeWithShiftEnter && activeEditor == 'workbench.editor.repl' && !inlineChatFocused" + }, + { + "command": "python.execInInteractiveWindowEnter", + "key": "enter", + "when": "!config.interactiveWindow.executeWithShiftEnter && activeEditor == 'workbench.editor.interactive' && !inlineChatFocused" }, { "command": "python.refreshTensorBoard", @@ -1192,7 +1234,8 @@ { "filenames": [ "Pipfile", - "poetry.lock" + "poetry.lock", + "uv.lock" ], "id": "toml" }, @@ -1484,6 +1527,11 @@ } ] }, + "copilot": { + "tests": { + "getSetupConfirmation": "python.copilotSetupTests" + } + }, "scripts": { "package": "gulp clean && gulp prePublishBundle && vsce package -o ms-python-insiders.vsix", "prePublish": "gulp clean && gulp prePublishNonBundle", @@ -1525,14 +1573,14 @@ "@iarna/toml": "^2.2.5", "@vscode/extension-telemetry": "^0.8.4", "arch": "^2.1.0", - "fs-extra": "^10.0.1", + "fs-extra": "^11.2.0", "glob": "^7.2.0", "hash.js": "^1.1.7", "iconv-lite": "^0.6.3", - "inversify": "^5.0.4", + "inversify": "^6.0.2", "jsonc-parser": "^3.0.0", "lodash": "^4.17.21", - "minimatch": "^5.0.1", + "minimatch": "^5.1.6", "named-js-regexp": "^1.3.3", "node-stream-zip": "^1.6.0", "reflect-metadata": "^0.1.12", @@ -1544,11 +1592,10 @@ "tmp": "^0.0.33", "uint64be": "^3.0.0", "unicode": "^14.0.0", - "untildify": "^4.0.0", "vscode-debugprotocol": "^1.28.0", - "vscode-jsonrpc": "^9.0.0-next.2", - "vscode-languageclient": "^10.0.0-next.2", - "vscode-languageserver-protocol": "^3.17.6-next.3", + "vscode-jsonrpc": "^9.0.0-next.5", + "vscode-languageclient": "^10.0.0-next.12", + "vscode-languageserver-protocol": "^3.17.6-next.10", "vscode-tas-client": "^0.1.84", "which": "^2.0.2", "winreg": "^1.2.4", @@ -1561,22 +1608,22 @@ "@types/chai-arrays": "^2.0.0", "@types/chai-as-promised": "^7.1.0", "@types/download": "^8.0.1", - "@types/fs-extra": "^9.0.13", + "@types/fs-extra": "^11.0.4", "@types/glob": "^7.2.0", "@types/lodash": "^4.14.104", "@types/mocha": "^9.1.0", - "@types/node": "^18.17.1", + "@types/node": "^22.5.0", "@types/semver": "^5.5.0", "@types/shortid": "^0.0.29", - "@types/sinon": "^10.0.11", + "@types/sinon": "^17.0.3", "@types/stack-trace": "0.0.29", "@types/tmp": "^0.0.33", - "@types/vscode": "^1.81.0", + "@types/vscode": "^1.93.0", "@types/which": "^2.0.1", "@types/winreg": "^1.2.30", "@types/xml2js": "^0.4.2", - "@typescript-eslint/eslint-plugin": "^3.7.0", - "@typescript-eslint/parser": "^3.7.0", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", "@vscode/test-electron": "^2.3.8", "@vscode/vsce": "^2.27.0", "bent": "^7.3.12", @@ -1584,13 +1631,14 @@ "chai-arrays": "^2.0.0", "chai-as-promised": "^7.1.1", "copy-webpack-plugin": "^9.1.0", + "cross-env": "^7.0.3", "cross-spawn": "^6.0.5", "del": "^6.0.0", "download": "^8.0.0", "eslint": "^7.2.0", "eslint-config-airbnb": "^18.2.0", "eslint-config-prettier": "^8.3.0", - "eslint-plugin-import": "^2.25.4", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.3.1", "eslint-plugin-react": "^7.20.3", "eslint-plugin-react-hooks": "^4.0.0", @@ -1609,14 +1657,14 @@ "prettier": "^2.0.2", "rewiremock": "^3.13.0", "shortid": "^2.2.8", - "sinon": "^13.0.1", + "sinon": "^18.0.0", "source-map-support": "^0.5.12", "ts-loader": "^9.2.8", "ts-mockito": "^2.5.0", "ts-node": "^10.7.0", "tsconfig-paths-webpack-plugin": "^3.2.0", "typemoq": "^2.1.0", - "typescript": "4.5.5", + "typescript": "~5.2", "uuid": "^8.3.2", "webpack": "^5.76.0", "webpack-bundle-analyzer": "^4.5.0", diff --git a/package.nls.json b/package.nls.json index 5a5029231b17..c92e21be5b61 100644 --- a/package.nls.json +++ b/package.nls.json @@ -68,6 +68,7 @@ "python.tensorBoard.logDirectory.description": "Set this setting to your preferred TensorBoard log directory to skip log directory prompt when starting TensorBoard.", "python.tensorBoard.logDirectory.markdownDeprecationMessage": "Tensorboard support has been moved to the extension [Tensorboard extension](https://marketplace.visualstudio.com/items?itemName=ms-toolsai.tensorboard). Instead use the setting `tensorBoard.logDirectory`.", "python.tensorBoard.logDirectory.deprecationMessage": "Tensorboard support has been moved to the extension Tensorboard extension. Instead use the setting `tensorBoard.logDirectory`.", + "python.terminal.shellIntegration.enabled.description": "Enable [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) for the terminals running python. Shell integration enhances the terminal experience by enabling command decorations, run recent command, improving accessibility among other things.", "python.terminal.activateEnvInCurrentTerminal.description": "Activate Python Environment in the current Terminal on load of the Extension.", "python.terminal.activateEnvironment.description": "Activate Python Environment in all Terminals created.", "python.terminal.executeInFileDir.description": "When executing a file in the terminal, whether to use execute in the file's directory, instead of the current open folder.", diff --git a/python_files/create_venv.py b/python_files/create_venv.py index 020c119fc1d5..fd1ff9ab1a47 100644 --- a/python_files/create_venv.py +++ b/python_files/create_venv.py @@ -78,6 +78,10 @@ def file_exists(path: Union[str, pathlib.PurePath]) -> bool: return pathlib.Path(path).exists() +def is_file(path: Union[str, pathlib.PurePath]) -> bool: + return pathlib.Path(path).is_file() + + def venv_exists(name: str) -> bool: return ( (CWD / name).exists() @@ -134,11 +138,15 @@ def upgrade_pip(venv_path: str) -> None: print("CREATE_VENV.UPGRADED_PIP") +def create_gitignore(git_ignore: Union[str, pathlib.PurePath]): + print("Creating:", os.fspath(git_ignore)) + pathlib.Path(git_ignore).write_text("*") + + def add_gitignore(name: str) -> None: git_ignore = CWD / name / ".gitignore" - if git_ignore.is_file(): - print("Creating:", os.fspath(git_ignore)) - git_ignore.write_text("*") + if not is_file(git_ignore): + create_gitignore(git_ignore) def download_pip_pyz(name: str): diff --git a/python_files/get_variable_info.py b/python_files/get_variable_info.py new file mode 100644 index 000000000000..d60795982617 --- /dev/null +++ b/python_files/get_variable_info.py @@ -0,0 +1,539 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root +# for license information. + +import locale +import sys +from typing import ClassVar + + +# this class is from in ptvsd/debugpy tools +class SafeRepr(object): # noqa: UP004 + # Can be used to override the encoding from locale.getpreferredencoding() + locale_preferred_encoding = None + + # Can be used to override the encoding used for sys.stdout.encoding + sys_stdout_encoding = None + + # String types are truncated to maxstring_outer when at the outer- + # most level, and truncated to maxstring_inner characters inside + # collections. + maxstring_outer = 2**16 + maxstring_inner = 128 + string_types = (str, bytes) + bytes = bytes + set_info = (set, "{", "}", False) + frozenset_info = (frozenset, "frozenset({", "})", False) + int_types = (int,) + long_iter_types = (list, tuple, bytearray, range, dict, set, frozenset) + + # Collection types are recursively iterated for each limit in + # maxcollection. + maxcollection = (60, 20) + + # Specifies type, prefix string, suffix string, and whether to include a + # comma if there is only one element. (Using a sequence rather than a + # mapping because we use isinstance() to determine the matching type.) + collection_types = [ # noqa: RUF012 + (tuple, "(", ")", True), + (list, "[", "]", False), + frozenset_info, + set_info, + ] + try: + from collections import deque + + collection_types.append((deque, "deque([", "])", False)) + except Exception: + pass + + # type, prefix string, suffix string, item prefix string, + # item key/value separator, item suffix string + dict_types: ClassVar[list] = [(dict, "{", "}", "", ": ", "")] + try: + from collections import OrderedDict + + dict_types.append((OrderedDict, "OrderedDict([", "])", "(", ", ", ")")) + except Exception: + pass + + # All other types are treated identically to strings, but using + # different limits. + maxother_outer = 2**16 + maxother_inner = 128 + + convert_to_hex = False + raw_value = False + + def __call__(self, obj): + """ + :param object obj: + The object for which we want a representation. + + :return str: + Returns bytes encoded as utf-8 on py2 and str on py3. + """ # noqa: D205 + try: + return "".join(self._repr(obj, 0)) + except Exception: + try: + return f"An exception was raised: {sys.exc_info()[1]!r}" + except Exception: + return "An exception was raised" + + def _repr(self, obj, level): + """Returns an iterable of the parts in the final repr string.""" + try: + obj_repr = type(obj).__repr__ + except Exception: + obj_repr = None + + def has_obj_repr(t): + r = t.__repr__ + try: + return obj_repr == r + except Exception: + return obj_repr is r + + for t, prefix, suffix, comma in self.collection_types: + if isinstance(obj, t) and has_obj_repr(t): + return self._repr_iter(obj, level, prefix, suffix, comma) + + for ( + t, + prefix, + suffix, + item_prefix, + item_sep, + item_suffix, + ) in self.dict_types: + if isinstance(obj, t) and has_obj_repr(t): + return self._repr_dict( + obj, level, prefix, suffix, item_prefix, item_sep, item_suffix + ) + + for t in self.string_types: + if isinstance(obj, t) and has_obj_repr(t): + return self._repr_str(obj, level) + + if self._is_long_iter(obj): + return self._repr_long_iter(obj) + + return self._repr_other(obj, level) + + # Determines whether an iterable exceeds the limits set in + # maxlimits, and is therefore unsafe to repr(). + def _is_long_iter(self, obj, level=0): + try: + # Strings have their own limits (and do not nest). Because + # they don't have __iter__ in 2.x, this check goes before + # the next one. + if isinstance(obj, self.string_types): + return len(obj) > self.maxstring_inner + + # If it's not an iterable (and not a string), it's fine. + if not hasattr(obj, "__iter__"): + return False + + # If it's not an instance of these collection types then it + # is fine. Note: this is a fix for + # https://github.com/Microsoft/ptvsd/issues/406 + if not isinstance(obj, self.long_iter_types): + return False + + # Iterable is its own iterator - this is a one-off iterable + # like generator or enumerate(). We can't really count that, + # but repr() for these should not include any elements anyway, + # so we can treat it the same as non-iterables. + if obj is iter(obj): + return False + + # range reprs fine regardless of length. + if isinstance(obj, range): + return False + + # numpy and scipy collections (ndarray etc) have + # self-truncating repr, so they're always safe. + try: + module = type(obj).__module__.partition(".")[0] + if module in ("numpy", "scipy"): + return False + except Exception: + pass + + # Iterables that nest too deep are considered long. + if level >= len(self.maxcollection): + return True + + # It is too long if the length exceeds the limit, or any + # of its elements are long iterables. + if hasattr(obj, "__len__"): + try: + size = len(obj) + except Exception: + size = None + if size is not None and size > self.maxcollection[level]: + return True + return any(self._is_long_iter(item, level + 1) for item in obj) + return any( + i > self.maxcollection[level] or self._is_long_iter(item, level + 1) + for i, item in enumerate(obj) + ) + + except Exception: + # If anything breaks, assume the worst case. + return True + + def _repr_iter(self, obj, level, prefix, suffix, comma_after_single_element=False): # noqa: FBT002 + yield prefix + + if level >= len(self.maxcollection): + yield "..." + else: + count = self.maxcollection[level] + yield_comma = False + for item in obj: + if yield_comma: + yield ", " + yield_comma = True + + count -= 1 + if count <= 0: + yield "..." + break + + yield from self._repr(item, 100 if item is obj else level + 1) + else: + if comma_after_single_element: # noqa: SIM102 + if count == self.maxcollection[level] - 1: + yield "," + yield suffix + + def _repr_long_iter(self, obj): + try: + length = hex(len(obj)) if self.convert_to_hex else len(obj) + obj_repr = f"<{type(obj).__name__}, len() = {length}>" + except Exception: + try: + obj_repr = "<" + type(obj).__name__ + ">" + except Exception: + obj_repr = "" + yield obj_repr + + def _repr_dict(self, obj, level, prefix, suffix, item_prefix, item_sep, item_suffix): + if not obj: + yield prefix + suffix + return + if level >= len(self.maxcollection): + yield prefix + "..." + suffix + return + + yield prefix + + count = self.maxcollection[level] + yield_comma = False + + obj_keys = list(obj) + + for key in obj_keys: + if yield_comma: + yield ", " + yield_comma = True + + count -= 1 + if count <= 0: + yield "..." + break + + yield item_prefix + for p in self._repr(key, level + 1): + yield p + + yield item_sep + + try: + item = obj[key] + except Exception: + yield "" + else: + for p in self._repr(item, 100 if item is obj else level + 1): + yield p + yield item_suffix + + yield suffix + + def _repr_str(self, obj, level): + try: + if self.raw_value: + # For raw value retrieval, ignore all limits. + if isinstance(obj, bytes): + yield obj.decode("latin-1") + else: + yield obj + return + + limit_inner = self.maxother_inner + limit_outer = self.maxother_outer + limit = limit_inner if level > 0 else limit_outer + if len(obj) <= limit: + # Note that we check the limit before doing the repr (so, the final string + # may actually be considerably bigger on some cases, as besides + # the additional u, b, ' chars, some chars may be escaped in repr, so + # even a single char such as \U0010ffff may end up adding more + # chars than expected). + yield self._convert_to_unicode_or_bytes_repr(repr(obj)) + return + + # Slightly imprecise calculations - we may end up with a string that is + # up to 6 characters longer than limit. If you need precise formatting, + # you are using the wrong class. + left_count, right_count = max(1, int(2 * limit / 3)), max(1, int(limit / 3)) + + # Important: only do repr after slicing to avoid duplicating a byte array that could be + # huge. + + # Note: we don't deal with high surrogates here because we're not dealing with the + # repr() of a random object. + # i.e.: A high surrogate unicode char may be splitted on Py2, but as we do a `repr` + # afterwards, that's ok. + + # Also, we just show the unicode/string/bytes repr() directly to make clear what the + # input type was (so, on py2 a unicode would start with u' and on py3 a bytes would + # start with b'). + + part1 = obj[:left_count] + part1 = repr(part1) + part1 = part1[: part1.rindex("'")] # Remove the last ' + + part2 = obj[-right_count:] + part2 = repr(part2) + part2 = part2[part2.index("'") + 1 :] # Remove the first ' (and possibly u or b). + + yield part1 + yield "..." + yield part2 + except: # noqa: E722 + # This shouldn't really happen, but let's play it safe. + # exception('Error getting string representation to show.') + yield from self._repr_obj(obj, level, self.maxother_inner, self.maxother_outer) + + def _repr_other(self, obj, level): + return self._repr_obj(obj, level, self.maxother_inner, self.maxother_outer) + + def _repr_obj(self, obj, level, limit_inner, limit_outer): + try: + if self.raw_value: + # For raw value retrieval, ignore all limits. + if isinstance(obj, bytes): + yield obj.decode("latin-1") + return + + try: + mv = memoryview(obj) + except Exception: + yield self._convert_to_unicode_or_bytes_repr(repr(obj)) + return + else: + # Map bytes to Unicode codepoints with same values. + yield mv.tobytes().decode("latin-1") + return + elif self.convert_to_hex and isinstance(obj, self.int_types): + obj_repr = hex(obj) + else: + obj_repr = repr(obj) + except Exception: + try: + obj_repr = object.__repr__(obj) + except Exception: + try: + obj_repr = "" + except Exception: + obj_repr = "" + + limit = limit_inner if level > 0 else limit_outer + + if limit >= len(obj_repr): + yield self._convert_to_unicode_or_bytes_repr(obj_repr) + return + + # Slightly imprecise calculations - we may end up with a string that is + # up to 3 characters longer than limit. If you need precise formatting, + # you are using the wrong class. + left_count, right_count = max(1, int(2 * limit / 3)), max(1, int(limit / 3)) + + yield obj_repr[:left_count] + yield "..." + yield obj_repr[-right_count:] + + def _convert_to_unicode_or_bytes_repr(self, obj_repr): + return obj_repr + + def _bytes_as_unicode_if_possible(self, obj_repr): + # We try to decode with 3 possible encoding (sys.stdout.encoding, + # locale.getpreferredencoding() and 'utf-8). If no encoding can decode + # the input, we return the original bytes. + try_encodings = [] + encoding = self.sys_stdout_encoding or getattr(sys.stdout, "encoding", None) + if encoding: + try_encodings.append(encoding.lower()) + + preferred_encoding = self.locale_preferred_encoding or locale.getpreferredencoding() + if preferred_encoding: + preferred_encoding = preferred_encoding.lower() + if preferred_encoding not in try_encodings: + try_encodings.append(preferred_encoding) + + if "utf-8" not in try_encodings: + try_encodings.append("utf-8") + + for encoding in try_encodings: + try: + return obj_repr.decode(encoding) + except UnicodeDecodeError: # noqa: PERF203 + pass + + return obj_repr # Return the original version (in bytes) + + +class DisplayOptions: + def __init__(self, width, max_columns): + self.width = width + self.max_columns = max_columns + + +_safe_repr = SafeRepr() +_collection_types = ["list", "tuple", "set"] +_array_page_size = 50 + + +def _get_value(variable): + return _safe_repr(variable) + + +def _get_property_names(variable): + props = [] + private_props = [] + for prop in dir(variable): + if not prop.startswith("_"): + props.append(prop) + elif not prop.startswith("__"): + private_props.append(prop) + return props + private_props + + +def _get_full_type(var_type): + module = "" + if hasattr(var_type, "__module__") and var_type.__module__ != "builtins": + module = var_type.__module__ + "." + if hasattr(var_type, "__qualname__"): + return module + var_type.__qualname__ + elif hasattr(var_type, "__name__"): + return module + var_type.__name__ + return None + + +def _get_variable_description(variable): + result = {} + + var_type = type(variable) + result["type"] = _get_full_type(var_type) + if hasattr(var_type, "__mro__"): + result["interfaces"] = [_get_full_type(t) for t in var_type.__mro__] + + if hasattr(variable, "__len__") and result["type"] in _collection_types: + result["count"] = len(variable) + + result["hasNamedChildren"] = hasattr(variable, "__dict__") or isinstance(variable, dict) + + result["value"] = _get_value(variable) + return result + + +def _get_child_property(root, property_chain): + try: + variable = root + for prop in property_chain: + if isinstance(prop, int): + if hasattr(variable, "__getitem__"): + variable = variable[prop] + elif isinstance(variable, set): + variable = list(variable)[prop] + else: + return None + elif hasattr(variable, prop): + variable = getattr(variable, prop) + elif isinstance(variable, dict) and prop in variable: + variable = variable[prop] + else: + return None + except Exception: + return None + + return variable + + +types_to_exclude = ["module", "function", "method", "class", "type"] + + +### Get info on variables at the root level +def getVariableDescriptions(): # noqa: N802 + return [ + { + "name": varName, + **_get_variable_description(globals()[varName]), + "root": varName, + "propertyChain": [], + "language": "python", + } + for varName in globals() + if type(globals()[varName]).__name__ not in types_to_exclude + and not varName.startswith("__") + ] + + +### Get info on children of a variable reached through the given property chain +def getAllChildrenDescriptions(root_var_name, property_chain, start_index): # noqa: N802 + root = globals()[root_var_name] + if root is None: + return [] + + parent = root + if len(property_chain) > 0: + parent = _get_child_property(root, property_chain) + + children = [] + parent_info = _get_variable_description(parent) + if "count" in parent_info: + if parent_info["count"] > 0: + last_item = min(parent_info["count"], start_index + _array_page_size) + index_range = range(start_index, last_item) + children = [ + { + **_get_variable_description(_get_child_property(parent, [i])), + "name": str(i), + "root": root_var_name, + "propertyChain": [*property_chain, i], + "language": "python", + } + for i in index_range + ] + elif parent_info["hasNamedChildren"]: + children_names = [] + if hasattr(parent, "__dict__"): + children_names = _get_property_names(parent) + elif isinstance(parent, dict): + children_names = list(parent.keys()) + + children = [] + for prop in children_names: + child_property = _get_child_property(parent, [prop]) + if child_property is not None and type(child_property).__name__ not in types_to_exclude: + child = { + **_get_variable_description(child_property), + "name": prop, + "root": root_var_name, + "propertyChain": [*property_chain, prop], + } + children.append(child) + + return children diff --git a/python_files/tests/pytestadapter/.data/coverage_gen/__init__.py b/python_files/tests/pytestadapter/.data/coverage_gen/__init__.py new file mode 100644 index 000000000000..5b7f7a925cc0 --- /dev/null +++ b/python_files/tests/pytestadapter/.data/coverage_gen/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. diff --git a/python_files/tests/pytestadapter/.data/coverage_gen/reverse.py b/python_files/tests/pytestadapter/.data/coverage_gen/reverse.py new file mode 100644 index 000000000000..cb6755a3a369 --- /dev/null +++ b/python_files/tests/pytestadapter/.data/coverage_gen/reverse.py @@ -0,0 +1,19 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +def reverse_string(s): + if s is None or s == "": + return "Error: Input is None" + return s[::-1] + +def reverse_sentence(sentence): + if sentence is None or sentence == "": + return "Error: Input is None" + words = sentence.split() + reversed_words = [reverse_string(word) for word in words] + return " ".join(reversed_words) + +# Example usage +if __name__ == "__main__": + sample_string = "hello" + print(reverse_string(sample_string)) # Output: "olleh" diff --git a/python_files/tests/pytestadapter/.data/coverage_gen/test_reverse.py b/python_files/tests/pytestadapter/.data/coverage_gen/test_reverse.py new file mode 100644 index 000000000000..e7319f143608 --- /dev/null +++ b/python_files/tests/pytestadapter/.data/coverage_gen/test_reverse.py @@ -0,0 +1,28 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from .reverse import reverse_sentence, reverse_string + + +def test_reverse_sentence(): + """ + Tests the reverse_sentence function to ensure it correctly reverses each word in a sentence. + + Test cases: + - "hello world" should be reversed to "olleh dlrow" + - "Python is fun" should be reversed to "nohtyP si nuf" + - "a b c" should remain "a b c" as each character is a single word + """ + assert reverse_sentence("hello world") == "olleh dlrow" + assert reverse_sentence("Python is fun") == "nohtyP si nuf" + assert reverse_sentence("a b c") == "a b c" + +def test_reverse_sentence_error(): + assert reverse_sentence("") == "Error: Input is None" + assert reverse_sentence(None) == "Error: Input is None" + + +def test_reverse_string(): + assert reverse_string("hello") == "olleh" + assert reverse_string("Python") == "nohtyP" + # this test specifically does not cover the error cases diff --git a/python_files/tests/pytestadapter/helpers.py b/python_files/tests/pytestadapter/helpers.py index 4f6631a44c00..991c7efbc60c 100644 --- a/python_files/tests/pytestadapter/helpers.py +++ b/python_files/tests/pytestadapter/helpers.py @@ -203,6 +203,26 @@ def runner_with_cwd(args: List[str], path: pathlib.Path) -> Optional[List[Dict[s return runner_with_cwd_env(args, path, {}) +def split_array_at_item(arr: List[str], item: str) -> Tuple[List[str], List[str]]: + """ + Splits an array into two subarrays at the specified item. + + Args: + arr (List[str]): The array to be split. + item (str): The item at which to split the array. + + Returns: + Tuple[List[str], List[str]]: A tuple containing two subarrays. The first subarray includes the item and all elements before it. The second subarray includes all elements after the item. If the item is not found, the first subarray is the original array and the second subarray is empty. + """ + if item in arr: + index = arr.index(item) + before = arr[: index + 1] + after = arr[index + 1 :] + return before, after + else: + return arr, [] + + def runner_with_cwd_env( args: List[str], path: pathlib.Path, env_add: Dict[str, str] ) -> Optional[List[Dict[str, Any]]]: @@ -217,10 +237,34 @@ def runner_with_cwd_env( # If we are running Django, generate a unittest-specific pipe name. process_args = [sys.executable, *args] pipe_name = generate_random_pipe_name("unittest-discovery-test") + elif "_TEST_VAR_UNITTEST" in env_add: + before_args, after_ids = split_array_at_item(args, "*test*.py") + process_args = [sys.executable, *before_args] + pipe_name = generate_random_pipe_name("unittest-execution-test") + test_ids_pipe = os.fspath( + script_dir / "tests" / "unittestadapter" / ".data" / "coverage_ex" / "10943021.txt" + ) + env_add.update({"RUN_TEST_IDS_PIPE": test_ids_pipe}) + test_ids_arr = after_ids + with open(test_ids_pipe, "w") as f: # noqa: PTH123 + f.write("\n".join(test_ids_arr)) else: process_args = [sys.executable, "-m", "pytest", "-p", "vscode_pytest", "-s", *args] pipe_name = generate_random_pipe_name("pytest-discovery-test") + if "COVERAGE_ENABLED" in env_add and "_TEST_VAR_UNITTEST" not in env_add: + process_args = [ + sys.executable, + "-m", + "pytest", + "-p", + "vscode_pytest", + "--cov=.", + "--cov-branch", + "-s", + *args, + ] + # Generate pipe name, pipe name specific per OS type. # Windows design diff --git a/python_files/tests/pytestadapter/test_coverage.py b/python_files/tests/pytestadapter/test_coverage.py new file mode 100644 index 000000000000..31e2be24437e --- /dev/null +++ b/python_files/tests/pytestadapter/test_coverage.py @@ -0,0 +1,50 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. +import os +import pathlib +import sys + +script_dir = pathlib.Path(__file__).parent.parent +sys.path.append(os.fspath(script_dir)) + +from .helpers import ( # noqa: E402 + TEST_DATA_PATH, + runner_with_cwd_env, +) + + +def test_simple_pytest_coverage(): + """ + Test coverage payload is correct for simple pytest example. Output of coverage run is below. + + Name Stmts Miss Branch BrPart Cover + --------------------------------------------------- + __init__.py 0 0 0 0 100% + reverse.py 13 3 8 2 76% + test_reverse.py 11 0 0 0 100% + --------------------------------------------------- + TOTAL 24 3 8 2 84% + + """ + args = [] + env_add = {"COVERAGE_ENABLED": "True"} + cov_folder_path = TEST_DATA_PATH / "coverage_gen" + actual = runner_with_cwd_env(args, cov_folder_path, env_add) + assert actual + coverage = actual[-1] + assert coverage + results = coverage["result"] + assert results + assert len(results) == 3 + focal_function_coverage = results.get(os.fspath(TEST_DATA_PATH / "coverage_gen" / "reverse.py")) + assert focal_function_coverage + assert focal_function_coverage.get("lines_covered") is not None + assert focal_function_coverage.get("lines_missed") is not None + assert set(focal_function_coverage.get("lines_covered")) == {4, 5, 7, 9, 10, 11, 12, 13, 14, 17} + assert set(focal_function_coverage.get("lines_missed")) == {18, 19, 6} + assert ( + focal_function_coverage.get("executed_branches") > 0 + ), "executed_branches are a number greater than 0." + assert ( + focal_function_coverage.get("total_branches") > 0 + ), "total_branches are a number greater than 0." diff --git a/python_files/tests/test_create_venv.py b/python_files/tests/test_create_venv.py index 2387f099140f..72fabdaaecac 100644 --- a/python_files/tests/test_create_venv.py +++ b/python_files/tests/test_create_venv.py @@ -51,13 +51,14 @@ def test_venv_not_installed_windows(): @pytest.mark.parametrize("env_exists", ["hasEnv", "noEnv"]) -@pytest.mark.parametrize("git_ignore", ["useGitIgnore", "skipGitIgnore"]) +@pytest.mark.parametrize("git_ignore", ["useGitIgnore", "skipGitIgnore", "gitIgnoreExists"]) @pytest.mark.parametrize("install", ["requirements", "toml", "skipInstall"]) def test_create_env(env_exists, git_ignore, install): importlib.reload(create_venv) create_venv.is_installed = lambda _x: True create_venv.venv_exists = lambda _n: env_exists == "hasEnv" create_venv.upgrade_pip = lambda _x: None + create_venv.is_file = lambda _x: git_ignore == "gitIgnoreExists" install_packages_called = False @@ -84,9 +85,19 @@ def run_process(args, error_message): def add_gitignore(_name): nonlocal add_gitignore_called add_gitignore_called = True + if not create_venv.is_file(_name): + create_venv.create_gitignore(_name) create_venv.add_gitignore = add_gitignore + create_gitignore_called = False + + def create_gitignore(_p): + nonlocal create_gitignore_called + create_gitignore_called = True + + create_venv.create_gitignore = create_gitignore + args = [] if git_ignore == "useGitIgnore": args += ["--git-ignore"] @@ -104,6 +115,8 @@ def add_gitignore(_name): # add_gitignore is called when new venv is created and git_ignore is True assert add_gitignore_called == ((env_exists == "noEnv") and (git_ignore == "useGitIgnore")) + assert create_gitignore_called == (add_gitignore_called and (git_ignore != "gitIgnoreExists")) + @pytest.mark.parametrize("install_type", ["requirements", "pyproject", "both"]) def test_install_packages(install_type): diff --git a/python_files/tests/test_get_variable_info.py b/python_files/tests/test_get_variable_info.py new file mode 100644 index 000000000000..73f94fe26f06 --- /dev/null +++ b/python_files/tests/test_get_variable_info.py @@ -0,0 +1,114 @@ +import get_variable_info + + +def set_global_variable(value): + # setting on the module allows tests to set a variable that the module under test can access + get_variable_info.test_variable = value # pyright: ignore[reportGeneralTypeIssues] + + +def get_global_variable(): + results = get_variable_info.getVariableDescriptions() + for variable in results: + if variable["name"] == "test_variable": + return variable + return None + + +def assert_variable_found(variable, expected_value, expected_type, expected_count=None): + set_global_variable(variable) + variable = get_global_variable() + assert variable is not None + if expected_value is not None: + assert variable["value"] == expected_value + assert variable["type"] == expected_type + if expected_count is not None: + assert variable["count"] == expected_count + else: + assert "count" not in variable + return variable + + +def assert_indexed_child(variable, start_index, expected_index, expected_child_value=None): + children = get_variable_info.getAllChildrenDescriptions( + variable["root"], variable["propertyChain"], start_index + ) + child = children[expected_index] + + if expected_child_value is not None: + assert child["value"] == expected_child_value + return child + + +def assert_property(variable, expected_property_name, expected_property_value=None): + children = get_variable_info.getAllChildrenDescriptions( + variable["root"], variable["propertyChain"], 0 + ) + found = None + for child in children: + chain = child["propertyChain"] + property_name = chain[-1] if chain else None + if property_name == expected_property_name: + found = child + break + + assert found is not None + if expected_property_value is not None: + assert found["value"] == expected_property_value + return found + + +def test_simple(): + assert_variable_found(1, "1", "int", None) + + +def test_list(): + found = assert_variable_found([1, 2, 3], "[1, 2, 3]", "list", 3) + assert_indexed_child(found, 0, 0, "1") + + +def test_dict(): + found = assert_variable_found({"a": 1, "b": 2}, "{'a': 1, 'b': 2}", "dict", None) + assert found["hasNamedChildren"] + assert_property(found, "a", "1") + assert_property(found, "b", "2") + + +def test_tuple(): + found = assert_variable_found((1, 2, 3), "(1, 2, 3)", "tuple", 3) + assert_indexed_child(found, 0, 0, "1") + + +def test_set(): + found = assert_variable_found({1, 2, 3}, "{1, 2, 3}", "set", 3) + assert_indexed_child(found, 0, 0, "1") + + +def test_self_referencing_dict(): + d = {} + d["self"] = d + found = assert_variable_found(d, "{'self': {...}}", "dict", None) + assert_property(found, "self", "{'self': {...}}") + + +def test_nested_list(): + found = assert_variable_found([[1, 2], [3, 4]], "[[1, 2], [3, 4]]", "list", 2) + assert_indexed_child(found, 0, 0, "[1, 2]") + + +def test_long_list(): + child = assert_variable_found(list(range(1_000_000)), None, "list", 1_000_000) + value = child["value"] + assert value.startswith("[0, 1, 2, 3") + assert value.endswith("...]") + assert_indexed_child(child, 400_000, 10, "400010") + assert_indexed_child(child, 999_950, 10, "999960") + + +def test_get_nested_children(): + d = [{"a": {("hello")}}] + found = assert_variable_found(d, "[{'a': {...}}]", "list", 1) + + found = assert_indexed_child(found, 0, 0) + found = assert_property(found, "a") + found = assert_indexed_child(found, 0, 0) + assert found["value"] == "'hello'" diff --git a/python_files/tests/unittestadapter/.data/coverage_ex/__init__.py b/python_files/tests/unittestadapter/.data/coverage_ex/__init__.py new file mode 100644 index 000000000000..5b7f7a925cc0 --- /dev/null +++ b/python_files/tests/unittestadapter/.data/coverage_ex/__init__.py @@ -0,0 +1,2 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. diff --git a/python_files/tests/unittestadapter/.data/coverage_ex/reverse.py b/python_files/tests/unittestadapter/.data/coverage_ex/reverse.py new file mode 100644 index 000000000000..4840b7d05bf3 --- /dev/null +++ b/python_files/tests/unittestadapter/.data/coverage_ex/reverse.py @@ -0,0 +1,14 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +def reverse_string(s): + if s is None or s == "": + return "Error: Input is None" + return s[::-1] + +def reverse_sentence(sentence): + if sentence is None or sentence == "": + return "Error: Input is None" + words = sentence.split() + reversed_words = [reverse_string(word) for word in words] + return " ".join(reversed_words) diff --git a/python_files/tests/unittestadapter/.data/coverage_ex/test_reverse.py b/python_files/tests/unittestadapter/.data/coverage_ex/test_reverse.py new file mode 100644 index 000000000000..2521e3dc1935 --- /dev/null +++ b/python_files/tests/unittestadapter/.data/coverage_ex/test_reverse.py @@ -0,0 +1,32 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import unittest +from reverse import reverse_sentence, reverse_string + +class TestReverseFunctions(unittest.TestCase): + + def test_reverse_sentence(self): + """ + Tests the reverse_sentence function to ensure it correctly reverses each word in a sentence. + + Test cases: + - "hello world" should be reversed to "olleh dlrow" + - "Python is fun" should be reversed to "nohtyP si nuf" + - "a b c" should remain "a b c" as each character is a single word + """ + self.assertEqual(reverse_sentence("hello world"), "olleh dlrow") + self.assertEqual(reverse_sentence("Python is fun"), "nohtyP si nuf") + self.assertEqual(reverse_sentence("a b c"), "a b c") + + def test_reverse_sentence_error(self): + self.assertEqual(reverse_sentence(""), "Error: Input is None") + self.assertEqual(reverse_sentence(None), "Error: Input is None") + + def test_reverse_string(self): + self.assertEqual(reverse_string("hello"), "olleh") + self.assertEqual(reverse_string("Python"), "nohtyP") + # this test specifically does not cover the error cases + +if __name__ == '__main__': + unittest.main() diff --git a/python_files/tests/unittestadapter/conftest.py b/python_files/tests/unittestadapter/conftest.py index 19af85d1e095..5b7f7a925cc0 100644 --- a/python_files/tests/unittestadapter/conftest.py +++ b/python_files/tests/unittestadapter/conftest.py @@ -1,8 +1,2 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. - -import sys - -# Ignore the contents of this folder for Python 2 tests. -if sys.version_info[0] < 3: - collect_ignore_glob = ["*.py"] diff --git a/python_files/tests/unittestadapter/test_coverage.py b/python_files/tests/unittestadapter/test_coverage.py new file mode 100644 index 000000000000..0089e9ae5504 --- /dev/null +++ b/python_files/tests/unittestadapter/test_coverage.py @@ -0,0 +1,57 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +import os +import pathlib +import sys + +sys.path.append(os.fspath(pathlib.Path(__file__).parent)) + +python_files_path = pathlib.Path(__file__).parent.parent.parent +sys.path.insert(0, os.fspath(python_files_path)) +sys.path.insert(0, os.fspath(python_files_path / "lib" / "python")) + +from tests.pytestadapter import helpers # noqa: E402 + +TEST_DATA_PATH = pathlib.Path(__file__).parent / ".data" + + +def test_basic_coverage(): + """This test runs on a simple django project with three tests, two of which pass and one that fails.""" + coverage_ex_folder: pathlib.Path = TEST_DATA_PATH / "coverage_ex" + execution_script: pathlib.Path = python_files_path / "unittestadapter" / "execution.py" + test_ids = [ + "test_reverse.TestReverseFunctions.test_reverse_sentence", + "test_reverse.TestReverseFunctions.test_reverse_sentence_error", + "test_reverse.TestReverseFunctions.test_reverse_string", + ] + argv = [os.fsdecode(execution_script), "--udiscovery", "-vv", "-s", ".", "-p", "*test*.py"] + argv = argv + test_ids + + actual = helpers.runner_with_cwd_env( + argv, + coverage_ex_folder, + {"COVERAGE_ENABLED": os.fspath(coverage_ex_folder), "_TEST_VAR_UNITTEST": "True"}, + ) + + assert actual + coverage = actual[-1] + assert coverage + results = coverage["result"] + assert results + assert len(results) == 3 + focal_function_coverage = results.get(os.fspath(TEST_DATA_PATH / "coverage_ex" / "reverse.py")) + assert focal_function_coverage + assert focal_function_coverage.get("lines_covered") is not None + assert focal_function_coverage.get("lines_missed") is not None + assert set(focal_function_coverage.get("lines_covered")) == {4, 5, 7, 9, 10, 11, 12, 13, 14} + assert set(focal_function_coverage.get("lines_missed")) == {6} + assert ( + focal_function_coverage.get("executed_branches") > 0 + ), "executed_branches are a number greater than 0." + assert ( + focal_function_coverage.get("total_branches") > 0 + ), "total_branches are a number greater than 0." diff --git a/python_files/unittestadapter/django_handler.py b/python_files/unittestadapter/django_handler.py index dc520c13aff1..9daa816d0918 100644 --- a/python_files/unittestadapter/django_handler.py +++ b/python_files/unittestadapter/django_handler.py @@ -18,10 +18,8 @@ def django_discovery_runner(manage_py_path: str, args: List[str]) -> None: # Attempt a small amount of validation on the manage.py path. - try: - pathlib.Path(manage_py_path) - except Exception as e: - raise VSCodeUnittestError(f"Error running Django, manage.py path is not a valid path: {e}") # noqa: B904 + if not pathlib.Path(manage_py_path).exists(): + raise VSCodeUnittestError("Error running Django, manage.py path does not exist.") try: # Get path to the custom_test_runner.py parent folder, add to sys.path and new environment used for subprocess. @@ -61,10 +59,8 @@ def django_discovery_runner(manage_py_path: str, args: List[str]) -> None: def django_execution_runner(manage_py_path: str, test_ids: List[str], args: List[str]) -> None: # Attempt a small amount of validation on the manage.py path. - try: - pathlib.Path(manage_py_path) - except Exception as e: - raise VSCodeUnittestError(f"Error running Django, manage.py path is not a valid path: {e}") # noqa: B904 + if not pathlib.Path(manage_py_path).exists(): + raise VSCodeUnittestError("Error running Django, manage.py path does not exist.") try: # Get path to the custom_test_runner.py parent folder, add to sys.path. diff --git a/python_files/unittestadapter/execution.py b/python_files/unittestadapter/execution.py index 4bc668bf71b6..2c49182c8633 100644 --- a/python_files/unittestadapter/execution.py +++ b/python_files/unittestadapter/execution.py @@ -3,7 +3,6 @@ import atexit import enum -import json import os import pathlib import sys @@ -11,7 +10,7 @@ import traceback import unittest from types import TracebackType -from typing import Dict, List, Optional, Tuple, Type, Union +from typing import Dict, Iterator, List, Optional, Tuple, Type, Union # Adds the scripts directory to the PATH as a workaround for enabling shell for test execution. path_var_name = "PATH" if "PATH" in os.environ else "Path" @@ -24,10 +23,11 @@ from django_handler import django_execution_runner # noqa: E402 -from testing_tools import process_json_util, socket_manager # noqa: E402 from unittestadapter.pvsc_utils import ( # noqa: E402 + CoveragePayloadDict, EOTPayloadDict, ExecutionPayloadDict, + FileCoverageInfo, TestExecutionStatus, VSCodeUnittestError, parse_unittest_args, @@ -269,8 +269,15 @@ def run_tests( return payload +def execute_eot_and_cleanup(): + eot_payload: EOTPayloadDict = {"command_type": "execution", "eot": True} + send_post_request(eot_payload, test_run_pipe) + if __socket: + __socket.close() + + __socket = None -atexit.register(lambda: __socket.close() if __socket else None) +atexit.register(execute_eot_and_cleanup) def send_run_data(raw_data, test_run_pipe): @@ -299,77 +306,104 @@ def send_run_data(raw_data, test_run_pipe): run_test_ids_pipe = os.environ.get("RUN_TEST_IDS_PIPE") test_run_pipe = os.getenv("TEST_RUN_PIPE") - if not run_test_ids_pipe: print("Error[vscode-unittest]: RUN_TEST_IDS_PIPE env var is not set.") raise VSCodeUnittestError("Error[vscode-unittest]: RUN_TEST_IDS_PIPE env var is not set.") if not test_run_pipe: print("Error[vscode-unittest]: TEST_RUN_PIPE env var is not set.") raise VSCodeUnittestError("Error[vscode-unittest]: TEST_RUN_PIPE env var is not set.") - test_ids_from_buffer = [] - raw_json = None + test_ids = [] + cwd = pathlib.Path(start_dir).absolute() try: - with socket_manager.PipeManager(run_test_ids_pipe) as sock: - buffer: str = "" - while True: - # Receive the data from the client - data: str = sock.read() - if not data: - break - - # Append the received data to the buffer - buffer += data - - try: - # Try to parse the buffer as JSON - raw_json = process_json_util.process_rpc_json(buffer) - # Clear the buffer as complete JSON object is received - buffer = "" - print("Received JSON data in run") - break - except json.JSONDecodeError: - # JSON decoding error, the complete JSON object is not yet received - continue - except OSError as e: - msg = f"Error: Could not connect to RUN_TEST_IDS_PIPE: {e}" - print(msg) - raise VSCodeUnittestError(msg) from e + # Read the test ids from the file, attempt to delete file afterwords. + ids_path = pathlib.Path(run_test_ids_pipe) + test_ids = ids_path.read_text(encoding="utf-8").splitlines() + print("Received test ids from temp file.") + try: + ids_path.unlink() + except Exception as e: + print("Error[vscode-pytest]: unable to delete temp file" + str(e)) + + except Exception as e: + # No test ids received from buffer, return error payload + status: TestExecutionStatus = TestExecutionStatus.error + payload: ExecutionPayloadDict = { + "cwd": str(cwd), + "status": status, + "result": None, + "error": "No test ids read from temp file," + str(e), + } + send_post_request(payload, test_run_pipe) + + workspace_root = os.environ.get("COVERAGE_ENABLED") + # For unittest COVERAGE_ENABLED is to the root of the workspace so correct data is collected + cov = None + is_coverage_run = os.environ.get("COVERAGE_ENABLED") is not None + if is_coverage_run: + print( + "COVERAGE_ENABLED env var set, starting coverage. workspace_root used as parent dir:", + workspace_root, + ) + import coverage + + source_ar: List[str] = [] + if workspace_root: + source_ar.append(workspace_root) + if top_level_dir: + source_ar.append(top_level_dir) + if start_dir: + source_ar.append(os.path.abspath(start_dir)) # noqa: PTH100 + cov = coverage.Coverage(branch=True, source=source_ar) # is at least 1 of these required?? + cov.start() + + # If no error occurred, we will have test ids to run. + if manage_py_path := os.environ.get("MANAGE_PY_PATH"): + print("MANAGE_PY_PATH env var set, running Django test suite.") + args = argv[index + 1 :] or [] + django_execution_runner(manage_py_path, test_ids, args) + # the django run subprocesses sends the eot payload. + else: + # Perform regular unittest execution. + payload = run_tests( + start_dir, + test_ids, + pattern, + top_level_dir, + verbosity, + failfast, + locals_, + ) - try: - if raw_json and "params" in raw_json and raw_json["params"]: - test_ids_from_buffer = raw_json["params"] - # Check to see if we are running django tests. - if manage_py_path := os.environ.get("MANAGE_PY_PATH"): - args = argv[index + 1 :] or [] - django_execution_runner(manage_py_path, test_ids_from_buffer, args) - # the django run subprocesses sends the eot payload. - else: - # Perform test execution. - payload = run_tests( - start_dir, - test_ids_from_buffer, - pattern, - top_level_dir, - verbosity, - failfast, - locals_, - ) - eot_payload: EOTPayloadDict = {"command_type": "execution", "eot": True} - send_post_request(eot_payload, test_run_pipe) - else: - # No test ids received from buffer - cwd = os.path.abspath(start_dir) # noqa: PTH100 - status = TestExecutionStatus.error - payload: ExecutionPayloadDict = { - "cwd": cwd, - "status": status, - "error": "No test ids received from buffer", - "result": None, + if is_coverage_run: + from coverage.plugin import FileReporter + from coverage.report_core import get_analysis_to_report + from coverage.results import Analysis + + if not cov: + raise VSCodeUnittestError("Coverage is enabled but cov is not set") + cov.stop() + cov.save() + analysis_iterator: Iterator[Tuple[FileReporter, Analysis]] = get_analysis_to_report( + cov, None + ) + + file_coverage_map: Dict[str, FileCoverageInfo] = {} + for fr, analysis in analysis_iterator: + file_str: str = fr.filename + executed_branches = analysis.numbers.n_executed_branches + total_branches = analysis.numbers.n_branches + + file_info: FileCoverageInfo = { + "lines_covered": list(analysis.executed), # set + "lines_missed": list(analysis.missing), # set + "executed_branches": executed_branches, # int + "total_branches": total_branches, # int } - send_post_request(payload, test_run_pipe) - eot_payload: EOTPayloadDict = {"command_type": "execution", "eot": True} - send_post_request(eot_payload, test_run_pipe) - except json.JSONDecodeError as exc: - msg = "Error: Could not parse test ids from stdin" - print(msg) - raise VSCodeUnittestError(msg) from exc + file_coverage_map[file_str] = file_info + payload_cov: CoveragePayloadDict = CoveragePayloadDict( + coverage=True, + cwd=os.fspath(cwd), + result=file_coverage_map, + error=None, + ) + send_post_request(payload_cov, test_run_pipe) diff --git a/python_files/unittestadapter/pvsc_utils.py b/python_files/unittestadapter/pvsc_utils.py index 12a299a8992f..25088f0cb7a2 100644 --- a/python_files/unittestadapter/pvsc_utils.py +++ b/python_files/unittestadapter/pvsc_utils.py @@ -81,6 +81,22 @@ class EOTPayloadDict(TypedDict): eot: bool +class FileCoverageInfo(TypedDict): + lines_covered: List[int] + lines_missed: List[int] + executed_branches: int + total_branches: int + + +class CoveragePayloadDict(Dict): + """A dictionary that is used to send a execution post request to the server.""" + + coverage: bool + cwd: str + result: Optional[Dict[str, FileCoverageInfo]] + error: Optional[str] # Currently unused need to check + + # Helper functions for data retrieval. @@ -300,7 +316,7 @@ def parse_unittest_args( def send_post_request( - payload: Union[ExecutionPayloadDict, DiscoveryPayloadDict, EOTPayloadDict], + payload: Union[ExecutionPayloadDict, DiscoveryPayloadDict, EOTPayloadDict, CoveragePayloadDict], test_run_pipe: Optional[str], ): """ diff --git a/python_files/vscode_pytest/__init__.py b/python_files/vscode_pytest/__init__.py index baa9df90eddd..6f04c45f00e6 100644 --- a/python_files/vscode_pytest/__init__.py +++ b/python_files/vscode_pytest/__init__.py @@ -14,6 +14,7 @@ Any, Dict, Generator, + Iterator, Literal, TypedDict, ) @@ -65,6 +66,8 @@ def __init__(self, message): TEST_RUN_PIPE = os.getenv("TEST_RUN_PIPE") SYMLINK_PATH = None +INCLUDE_BRANCHES = False + def pytest_load_initial_conftests(early_config, parser, args): # noqa: ARG001 global TEST_RUN_PIPE @@ -81,6 +84,10 @@ def pytest_load_initial_conftests(early_config, parser, args): # noqa: ARG001 global IS_DISCOVERY IS_DISCOVERY = True + if "--cov-branch" in args: + global INCLUDE_BRANCHES + INCLUDE_BRANCHES = True + # check if --rootdir is in the args for arg in args: if "--rootdir=" in arg: @@ -356,6 +363,13 @@ def check_skipped_condition(item): return False +class FileCoverageInfo(TypedDict): + lines_covered: list[int] + lines_missed: list[int] + executed_branches: int + total_branches: int + + def pytest_sessionfinish(session, exitstatus): """A pytest hook that is called after pytest has fulled finished. @@ -420,9 +434,54 @@ def pytest_sessionfinish(session, exitstatus): None, ) # send end of transmission token + + # send coverageee if enabled + is_coverage_run = os.environ.get("COVERAGE_ENABLED") + if is_coverage_run == "True": + # load the report and build the json result to return + import coverage + from coverage.report_core import get_analysis_to_report + + if TYPE_CHECKING: + from coverage.plugin import FileReporter + from coverage.results import Analysis + + cov = coverage.Coverage() + cov.load() + analysis_iterator: Iterator[tuple[FileReporter, Analysis]] = get_analysis_to_report( + cov, None + ) + + file_coverage_map: dict[str, FileCoverageInfo] = {} + for fr, analysis in analysis_iterator: + file_str: str = fr.filename + executed_branches = analysis.numbers.n_executed_branches + total_branches = analysis.numbers.n_branches + if not INCLUDE_BRANCHES: + print("coverage not run with branches") + # if covearge wasn't run with branches, set the total branches value to -1 to signal that it is not available + executed_branches = 0 + total_branches = -1 + + file_info: FileCoverageInfo = { + "lines_covered": list(analysis.executed), # set + "lines_missed": list(analysis.missing), # set + "executed_branches": executed_branches, # int + "total_branches": total_branches, # int + } + file_coverage_map[file_str] = file_info + + payload: CoveragePayloadDict = CoveragePayloadDict( + coverage=True, + cwd=os.fspath(cwd), + result=file_coverage_map, + error=None, + ) + send_post_request(payload) + command_type = "discovery" if IS_DISCOVERY else "execution" - payload: EOTPayloadDict = {"command_type": command_type, "eot": True} - send_post_request(payload) + payload_eot: EOTPayloadDict = {"command_type": command_type, "eot": True} + send_post_request(payload_eot) def build_test_tree(session: pytest.Session) -> TestNode: @@ -738,6 +797,15 @@ class ExecutionPayloadDict(Dict): error: str | None # Currently unused need to check +class CoveragePayloadDict(Dict): + """A dictionary that is used to send a execution post request to the server.""" + + coverage: bool + cwd: str + result: dict[str, FileCoverageInfo] | None + error: str | None # Currently unused need to check + + class EOTPayloadDict(TypedDict): """A dictionary that is used to send a end of transmission post request to the server.""" @@ -822,14 +890,14 @@ def post_response(cwd: str, session_node: TestNode) -> None: class PathEncoder(json.JSONEncoder): """A custom JSON encoder that encodes pathlib.Path objects as strings.""" - def default(self, obj): - if isinstance(obj, pathlib.Path): - return os.fspath(obj) - return super().default(obj) + def default(self, o): + if isinstance(o, pathlib.Path): + return os.fspath(o) + return super().default(o) def send_post_request( - payload: ExecutionPayloadDict | DiscoveryPayloadDict | EOTPayloadDict, + payload: ExecutionPayloadDict | DiscoveryPayloadDict | EOTPayloadDict | CoveragePayloadDict, cls_encoder=None, ): """ diff --git a/python_files/vscode_pytest/run_pytest_script.py b/python_files/vscode_pytest/run_pytest_script.py index 515e04d1b84d..9abe3fd6b86c 100644 --- a/python_files/vscode_pytest/run_pytest_script.py +++ b/python_files/vscode_pytest/run_pytest_script.py @@ -1,6 +1,5 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. -import json import os import pathlib import sys @@ -17,10 +16,12 @@ script_dir = pathlib.Path(__file__).parent.parent sys.path.append(os.fspath(script_dir)) sys.path.append(os.fspath(script_dir / "lib" / "python")) -from testing_tools import ( # noqa: E402 - process_json_util, - socket_manager, -) + + +def run_pytest(args): + arg_array = ["-p", "vscode_pytest", *args] + pytest.main(arg_array) + # This script handles running pytest via pytest.main(). It is called via run in the # pytest execution adapter and gets the test_ids to run via stdin and the rest of the @@ -33,53 +34,36 @@ sys.path.insert(0, os.getcwd()) # noqa: PTH109 # Get the rest of the args to run with pytest. args = sys.argv[1:] - run_test_ids_pipe = os.environ.get("RUN_TEST_IDS_PIPE") - if not run_test_ids_pipe: - print("Error[vscode-pytest]: RUN_TEST_IDS_PIPE env var is not set.") - raw_json = {} - try: - socket_name = os.environ.get("RUN_TEST_IDS_PIPE") - with socket_manager.PipeManager(socket_name) as sock: - buffer = "" - while True: - # Receive the data from the client as a string - data = sock.read(3000) - if not data: - break - # Append the received data to the buffer - buffer += data + # Check if coverage is enabled and adjust the args accordingly. + is_coverage_run = os.environ.get("COVERAGE_ENABLED") + coverage_enabled = False + if is_coverage_run == "True": + # If coverage is enabled, check if the coverage plugin is already in the args, if so keep user args. + for arg in args: + if "--cov" in arg: + coverage_enabled = True + break + if not coverage_enabled: + print("Coverage is enabled, adding branch coverage as an argument.") + args = [*args, "--cov=.", "--cov-branch"] - try: - # Try to parse the buffer as JSON - raw_json = process_json_util.process_rpc_json(buffer) - # Clear the buffer as complete JSON object is received - buffer = "" - print("Received JSON data in run script") - break - except json.JSONDecodeError: - # JSON decoding error, the complete JSON object is not yet received - continue - except UnicodeDecodeError: - continue - except OSError as e: - print(f"Error: Could not connect to runTestIdsPort: {e}") - print("Error: Could not connect to runTestIdsPort") - try: - test_ids_from_buffer = raw_json.get("params") - if test_ids_from_buffer: - arg_array = ["-p", "vscode_pytest", *args, *test_ids_from_buffer] + run_test_ids_pipe = os.environ.get("RUN_TEST_IDS_PIPE") + if run_test_ids_pipe: + try: + # Read the test ids from the file, delete file, and run pytest. + ids_path = pathlib.Path(run_test_ids_pipe) + ids = ids_path.read_text(encoding="utf-8").splitlines() + try: + ids_path.unlink() + except Exception as e: + print("Error[vscode-pytest]: unable to delete temp file" + str(e)) + arg_array = ["-p", "vscode_pytest", *args, *ids] print("Running pytest with args: " + str(arg_array)) pytest.main(arg_array) - else: - print( - "Error: No test ids received from stdin, could be an error or a run request without ids provided.", - ) - print("Running pytest with no test ids as args. Args being used: ", args) - arg_array = ["-p", "vscode_pytest", *args] - pytest.main(arg_array) - except json.JSONDecodeError: - print( - "Error: Could not parse test ids from stdin. Raw json received from socket: \n", - raw_json, - ) + except Exception as e: + print("Error[vscode-pytest]: unable to read testIds from temp file" + str(e)) + run_pytest(args) + else: + print("Error[vscode-pytest]: RUN_TEST_IDS_PIPE env var is not set.") + run_pytest(args) diff --git a/requirements.txt b/requirements.txt index a58927a27629..e17a6a86b979 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,9 +4,9 @@ # # pip-compile --generate-hashes requirements.in # -importlib-metadata==8.1.0 \ - --hash=sha256:3cd29f739ed65973840b068e3132135ce954c254d48b5b640484467ef7ab3c8c \ - --hash=sha256:fcdcb1d5ead7bdf3dd32657bb94ebe9d2aabfe89a19782ddc32da5041d6ebfb4 +importlib-metadata==8.5.0 \ + --hash=sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b \ + --hash=sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7 # via -r requirements.in microvenv==2023.5.post1 \ --hash=sha256:32c46afea874e300f69f1add0806eb0795fd02b5fb251092fba0b73c059a7d1f \ @@ -24,7 +24,7 @@ typing-extensions==4.12.2 \ --hash=sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d \ --hash=sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8 # via -r requirements.in -zipp==3.19.2 \ - --hash=sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19 \ - --hash=sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c +zipp==3.20.1 \ + --hash=sha256:9960cd8967c8f85a56f920d5d507274e74f9ff813a0ab8889a5b5be2daf44064 \ + --hash=sha256:c22b14cc4763c5a5b04134207736c107db42e9d3ef2d9779d465f5f1bcba572b # via importlib-metadata diff --git a/src/client/activation/extensionSurvey.ts b/src/client/activation/extensionSurvey.ts index 11b581a27252..c5b7c525fea8 100644 --- a/src/client/activation/extensionSurvey.ts +++ b/src/client/activation/extensionSurvey.ts @@ -3,7 +3,7 @@ 'use strict'; -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import * as querystring from 'querystring'; import { env, UIKind } from 'vscode'; import { IApplicationEnvironment, IApplicationShell } from '../common/application/types'; @@ -37,8 +37,8 @@ export class ExtensionSurveyPrompt implements IExtensionSingleActivationService @inject(IExperimentService) private experiments: IExperimentService, @inject(IApplicationEnvironment) private appEnvironment: IApplicationEnvironment, @inject(IPlatformService) private platformService: IPlatformService, - @optional() private sampleSizePerOneHundredUsers: number = 10, - @optional() private waitTimeToShowSurvey: number = WAIT_TIME_TO_SHOW_SURVEY, + private sampleSizePerOneHundredUsers: number = 10, + private waitTimeToShowSurvey: number = WAIT_TIME_TO_SHOW_SURVEY, ) {} public async activate(): Promise { diff --git a/src/client/application/diagnostics/checks/macPythonInterpreter.ts b/src/client/application/diagnostics/checks/macPythonInterpreter.ts index 19ccc2f8beb9..21d6b34fb7c5 100644 --- a/src/client/application/diagnostics/checks/macPythonInterpreter.ts +++ b/src/client/application/diagnostics/checks/macPythonInterpreter.ts @@ -40,7 +40,7 @@ export const InvalidMacPythonInterpreterServiceId = 'InvalidMacPythonInterpreter export class InvalidMacPythonInterpreterService extends BaseDiagnosticsService { protected changeThrottleTimeout = 1000; - private timeOut?: NodeJS.Timer | number; + private timeOut?: NodeJS.Timeout | number; constructor( @inject(IServiceContainer) serviceContainer: IServiceContainer, diff --git a/src/client/browser/extension.ts b/src/client/browser/extension.ts index 28e1912f67e4..35854d141cad 100644 --- a/src/client/browser/extension.ts +++ b/src/client/browser/extension.ts @@ -108,7 +108,7 @@ async function runPylance( middleware, }; - const client = new LanguageClient('python', 'Python Language Server', clientOptions, worker); + const client = new LanguageClient('python', 'Python Language Server', worker, clientOptions); languageClient = client; context.subscriptions.push( diff --git a/src/client/common/application/commands.ts b/src/client/common/application/commands.ts index 4580a91a78d1..41bbe8b4f4ea 100644 --- a/src/client/common/application/commands.ts +++ b/src/client/common/application/commands.ts @@ -99,10 +99,12 @@ export interface ICommandNameArgumentTypeMapping extends ICommandNameWithoutArgu [Commands.Start_Native_REPL]: [undefined | Uri]; [Commands.Exec_In_REPL]: [undefined | Uri]; [Commands.Exec_In_REPL_Enter]: [undefined | Uri]; + [Commands.Exec_In_IW_Enter]: [undefined | Uri]; [Commands.Exec_In_Terminal]: [undefined, Uri]; [Commands.Exec_In_Terminal_Icon]: [undefined, Uri]; [Commands.Debug_In_Terminal]: [Uri]; [Commands.Tests_Configure]: [undefined, undefined | CommandSource, undefined | Uri]; + [Commands.Tests_CopilotSetup]: [undefined | Uri]; [Commands.LaunchTensorBoard]: [TensorBoardEntrypoint, TensorBoardEntrypointTrigger]; ['workbench.view.testing.focus']: []; ['cursorMove']: [ diff --git a/src/client/common/application/commands/reportIssueCommand.ts b/src/client/common/application/commands/reportIssueCommand.ts index f5f1f0ac0c0e..2286bd1e6be2 100644 --- a/src/client/common/application/commands/reportIssueCommand.ts +++ b/src/client/common/application/commands/reportIssueCommand.ts @@ -3,11 +3,11 @@ 'use strict'; -import * as fs from 'fs-extra'; import * as os from 'os'; import * as path from 'path'; import { inject, injectable } from 'inversify'; import { isEqual } from 'lodash'; +import * as fs from '../../platform/fs-paths'; import { IExtensionSingleActivationService } from '../../../activation/types'; import { IApplicationEnvironment, ICommandManager, IWorkspaceService } from '../types'; import { EXTENSION_ROOT_DIR } from '../../../constants'; diff --git a/src/client/common/application/terminalManager.ts b/src/client/common/application/terminalManager.ts index e5b758437393..9d0536e85243 100644 --- a/src/client/common/application/terminalManager.ts +++ b/src/client/common/application/terminalManager.ts @@ -2,7 +2,16 @@ // Licensed under the MIT License. import { injectable } from 'inversify'; -import { Event, EventEmitter, Terminal, TerminalOptions, window } from 'vscode'; +import { + Disposable, + Event, + EventEmitter, + Terminal, + TerminalOptions, + TerminalShellExecutionEndEvent, + TerminalShellIntegrationChangeEvent, + window, +} from 'vscode'; import { traceLog } from '../../logging'; import { ITerminalManager } from './types'; @@ -23,6 +32,12 @@ export class TerminalManager implements ITerminalManager { public createTerminal(options: TerminalOptions): Terminal { return monkeyPatchTerminal(window.createTerminal(options)); } + public onDidChangeTerminalShellIntegration(handler: (e: TerminalShellIntegrationChangeEvent) => void): Disposable { + return window.onDidChangeTerminalShellIntegration(handler); + } + public onDidEndTerminalShellExecution(handler: (e: TerminalShellExecutionEndEvent) => void): Disposable { + return window.onDidEndTerminalShellExecution(handler); + } } /** diff --git a/src/client/common/application/types.ts b/src/client/common/application/types.ts index 6705331bf57d..413122f2584b 100644 --- a/src/client/common/application/types.ts +++ b/src/client/common/application/types.ts @@ -40,6 +40,8 @@ import { StatusBarItem, Terminal, TerminalOptions, + TerminalShellExecutionEndEvent, + TerminalShellIntegrationChangeEvent, TextDocument, TextDocumentChangeEvent, TextDocumentShowOptions, @@ -936,6 +938,10 @@ export interface ITerminalManager { * @return A new Terminal. */ createTerminal(options: TerminalOptions): Terminal; + + onDidChangeTerminalShellIntegration(handler: (e: TerminalShellIntegrationChangeEvent) => void): Disposable; + + onDidEndTerminalShellExecution(handler: (e: TerminalShellExecutionEndEvent) => void): Disposable; } export const IDebugService = Symbol('IDebugManager'); diff --git a/src/client/common/configSettings.ts b/src/client/common/configSettings.ts index dbd78c5287e5..1b637e7aac2d 100644 --- a/src/client/common/configSettings.ts +++ b/src/client/common/configSettings.ts @@ -38,8 +38,7 @@ import { debounceSync } from './utils/decorators'; import { SystemVariables } from './variables/systemVariables'; import { getOSType, OSType } from './utils/platform'; import { isWindows } from './platform/platformService'; - -const untildify = require('untildify'); +import { untildify } from './helpers'; export class PythonSettings implements IPythonSettings { private get onDidChange(): Event { @@ -369,6 +368,7 @@ export class PythonSettings implements IPythonSettings { launchArgs: [], activateEnvironment: true, activateEnvInCurrentTerminal: false, + enableShellIntegration: false, }; this.REPL = pythonSettings.get('REPL')!; diff --git a/src/client/common/constants.ts b/src/client/common/constants.ts index 23e9c131b25c..51e38d5ef3e6 100644 --- a/src/client/common/constants.ts +++ b/src/client/common/constants.ts @@ -49,6 +49,7 @@ export namespace Commands { export const Exec_In_REPL = 'python.execInREPL'; export const Exec_Selection_In_Django_Shell = 'python.execSelectionInDjangoShell'; export const Exec_In_REPL_Enter = 'python.execInREPLEnter'; + export const Exec_In_IW_Enter = 'python.execInInteractiveWindowEnter'; export const Exec_Selection_In_Terminal = 'python.execSelectionInTerminal'; export const GetSelectedInterpreterPath = 'python.interpreterPath'; export const InstallJupyter = 'python.installJupyter'; @@ -64,6 +65,7 @@ export namespace Commands { export const Start_REPL = 'python.startREPL'; export const Start_Native_REPL = 'python.startNativeREPL'; export const Tests_Configure = 'python.configureTests'; + export const Tests_CopilotSetup = 'python.copilotSetupTests'; export const TriggerEnvironmentSelection = 'python.triggerEnvSelection'; export const ViewOutput = 'python.viewOutput'; } diff --git a/src/client/common/extensions.ts b/src/client/common/extensions.ts index e68e3838ee1d..a074106b73b1 100644 --- a/src/client/common/extensions.ts +++ b/src/client/common/extensions.ts @@ -63,13 +63,6 @@ String.prototype.trimQuotes = function (this: string): string { return this.replace(/(^['"])|(['"]$)/g, ''); }; -declare interface Promise { - /** - * Catches task error and ignores them. - */ - ignoreErrors(): Promise; -} - /** * Explicitly tells that promise should be run asynchonously. */ diff --git a/src/client/common/helpers.ts b/src/client/common/helpers.ts index 5359284da66a..52eeb1e087aa 100644 --- a/src/client/common/helpers.ts +++ b/src/client/common/helpers.ts @@ -2,6 +2,7 @@ // Licensed under the MIT License. 'use strict'; +import * as os from 'os'; import { ModuleNotInstalledError } from './errors/moduleNotInstalledError'; @@ -19,3 +20,7 @@ export function isNotInstalledError(error: Error): boolean { const isModuleNoInstalledError = error.message.indexOf('No module named') >= 0; return errorObj.code === 'ENOENT' || errorObj.code === 127 || isModuleNoInstalledError; } + +export function untildify(path: string): string { + return path.replace(/^~($|\/|\\)/, `${os.homedir()}$1`); +} diff --git a/src/client/common/installer/types.ts b/src/client/common/installer/types.ts index 53696b948571..efc7535af708 100644 --- a/src/client/common/installer/types.ts +++ b/src/client/common/installer/types.ts @@ -79,6 +79,7 @@ export interface IProductPathService { } export enum ModuleInstallFlags { + none = 0, upgrade = 1, updateDependencies = 2, reInstall = 4, diff --git a/src/client/common/interpreterPathService.ts b/src/client/common/interpreterPathService.ts index 8af142962565..935d0bd89ad7 100644 --- a/src/client/common/interpreterPathService.ts +++ b/src/client/common/interpreterPathService.ts @@ -3,7 +3,7 @@ 'use strict'; -import * as fs from 'fs-extra'; +import * as fs from '../common/platform/fs-paths'; import { inject, injectable } from 'inversify'; import { ConfigurationChangeEvent, ConfigurationTarget, Event, EventEmitter, Uri } from 'vscode'; import { traceError, traceVerbose } from '../logging'; diff --git a/src/client/common/platform/fileSystem.ts b/src/client/common/platform/fileSystem.ts index 8f962b0f776f..3e7f441654ec 100644 --- a/src/client/common/platform/fileSystem.ts +++ b/src/client/common/platform/fileSystem.ts @@ -333,7 +333,7 @@ export class FileSystemUtils implements IFileSystemUtils { pathUtils.paths, tmp || TemporaryFileSystem.withDefaults(), getHash || getHashString, - globFiles || promisify(glob), + globFiles || promisify(glob.default), ); } diff --git a/src/client/common/platform/fs-paths.ts b/src/client/common/platform/fs-paths.ts index 17df7507f7d9..fa809d31b0b9 100644 --- a/src/client/common/platform/fs-paths.ts +++ b/src/client/common/platform/fs-paths.ts @@ -4,11 +4,10 @@ import * as nodepath from 'path'; import { getSearchPathEnvVarNames } from '../utils/exec'; import * as fs from 'fs-extra'; +import * as os from 'os'; import { getOSType, OSType } from '../utils/platform'; import { IExecutables, IFileSystemPaths, IFileSystemPathUtils } from './types'; -const untildify = require('untildify'); - // The parts of node's 'path' module used by FileSystemPaths. interface INodePath { sep: string; @@ -120,7 +119,7 @@ export class FileSystemPathUtils implements IFileSystemPathUtils { } return new FileSystemPathUtils( // Use the current user's home directory. - untildify('~'), + os.homedir(), paths, Executables.withDefaults(), // Use the actual node "path" module. @@ -183,6 +182,105 @@ export async function copyFile(src: string, dest: string): Promise { }); } +// These function exist so we can stub them out in tests. We can't stub out the fs module directly +// because of the way that sinon does stubbing, so we have these intermediaries instead. +export { Stats, WriteStream, ReadStream, PathLike, Dirent, PathOrFileDescriptor } from 'fs-extra'; + +export function existsSync(path: string): boolean { + return fs.existsSync(path); +} + +export function readFileSync(filePath: string, encoding: BufferEncoding): string; +export function readFileSync(filePath: string): Buffer; +export function readFileSync(filePath: string, options: { encoding: BufferEncoding }): string; +export function readFileSync( + filePath: string, + options?: { encoding: BufferEncoding } | BufferEncoding | undefined, +): string | Buffer { + if (typeof options === 'string') { + return fs.readFileSync(filePath, { encoding: options }); + } + return fs.readFileSync(filePath, options); +} + +export function readJSONSync(filePath: string): any { + return fs.readJSONSync(filePath); +} + +export function readdirSync(path: string): string[]; +export function readdirSync( + path: string, + options: fs.ObjectEncodingOptions & { + withFileTypes: true; + }, +): fs.Dirent[]; +export function readdirSync( + path: string, + options: fs.ObjectEncodingOptions & { + withFileTypes: false; + }, +): string[]; +export function readdirSync( + path: fs.PathLike, + options?: fs.ObjectEncodingOptions & { + withFileTypes: boolean; + recursive?: boolean | undefined; + }, +): string[] | fs.Dirent[] { + if (options === undefined || options.withFileTypes === false) { + return fs.readdirSync(path); + } + return fs.readdirSync(path, { ...options, withFileTypes: true }); +} + +export function readlink(path: string): Promise { + return fs.readlink(path); +} + +export function unlink(path: string): Promise { + return fs.unlink(path); +} + +export function symlink(target: string, path: string, type?: fs.SymlinkType): Promise { + return fs.symlink(target, path, type); +} + +export function symlinkSync(target: string, path: string, type?: fs.SymlinkType): void { + return fs.symlinkSync(target, path, type); +} + +export function unlinkSync(path: string): void { + return fs.unlinkSync(path); +} + +export function statSync(path: string): fs.Stats { + return fs.statSync(path); +} + +export function stat(path: string): Promise { + return fs.stat(path); +} + +export function lstat(path: string): Promise { + return fs.lstat(path); +} + +export function chmod(path: string, mod: fs.Mode): Promise { + return fs.chmod(path, mod); +} + +export function createReadStream(path: string): fs.ReadStream { + return fs.createReadStream(path); +} + +export function createWriteStream(path: string): fs.WriteStream { + return fs.createWriteStream(path); +} + +export function pathExistsSync(path: string): boolean { + return fs.pathExistsSync(path); +} + export function pathExists(absPath: string): Promise { return fs.pathExists(absPath); } @@ -190,3 +288,83 @@ export function pathExists(absPath: string): Promise { export function createFile(filename: string): Promise { return fs.createFile(filename); } + +export function rmdir(path: string, options?: fs.RmDirOptions): Promise { + return fs.rmdir(path, options); +} + +export function remove(path: string): Promise { + return fs.remove(path); +} + +export function readFile(filePath: string, encoding: BufferEncoding): Promise; +export function readFile(filePath: string): Promise; +export function readFile(filePath: string, options: { encoding: BufferEncoding }): Promise; +export function readFile( + filePath: string, + options?: { encoding: BufferEncoding } | BufferEncoding | undefined, +): Promise { + if (typeof options === 'string') { + return fs.readFile(filePath, { encoding: options }); + } + return fs.readFile(filePath, options); +} + +export function readJson(filePath: string): Promise { + return fs.readJson(filePath); +} + +export function writeFile(filePath: string, data: any, options?: { encoding: BufferEncoding }): Promise { + return fs.writeFile(filePath, data, options); +} + +export function mkdir(dirPath: string): Promise { + return fs.mkdir(dirPath); +} + +export function mkdirp(dirPath: string): Promise { + return fs.mkdirp(dirPath); +} + +export function rename(oldPath: string, newPath: string): Promise { + return fs.rename(oldPath, newPath); +} + +export function ensureDir(dirPath: string): Promise { + return fs.ensureDir(dirPath); +} + +export function ensureFile(filePath: string): Promise { + return fs.ensureFile(filePath); +} + +export function ensureSymlink(target: string, filePath: string, type?: fs.SymlinkType): Promise { + return fs.ensureSymlink(target, filePath, type); +} + +export function appendFile(filePath: string, data: any, options?: { encoding: BufferEncoding }): Promise { + return fs.appendFile(filePath, data, options); +} + +export function readdir(path: string): Promise; +export function readdir( + path: string, + options: fs.ObjectEncodingOptions & { + withFileTypes: true; + }, +): Promise; +export function readdir( + path: fs.PathLike, + options?: fs.ObjectEncodingOptions & { + withFileTypes: true; + }, +): Promise { + if (options === undefined) { + return fs.readdir(path); + } + return fs.readdir(path, options); +} + +export function emptyDir(dirPath: string): Promise { + return fs.emptyDir(dirPath); +} diff --git a/src/client/common/platform/pathUtils.ts b/src/client/common/platform/pathUtils.ts index ed3dc28b1de5..b3be39f4644b 100644 --- a/src/client/common/platform/pathUtils.ts +++ b/src/client/common/platform/pathUtils.ts @@ -6,8 +6,7 @@ import * as path from 'path'; import { IPathUtils, IsWindows } from '../types'; import { OSType } from '../utils/platform'; import { Executables, FileSystemPaths, FileSystemPathUtils } from './fs-paths'; - -const untildify = require('untildify'); +import { untildify } from '../helpers'; @injectable() export class PathUtils implements IPathUtils { diff --git a/src/client/common/terminal/service.ts b/src/client/common/terminal/service.ts index de276762de4b..09d75a42fa00 100644 --- a/src/client/common/terminal/service.ts +++ b/src/client/common/terminal/service.ts @@ -20,7 +20,9 @@ import { ITerminalService, TerminalCreationOptions, TerminalShellType, + ITerminalExecutedCommand, } from './types'; +import { traceVerbose } from '../../logging'; @injectable() export class TerminalService implements ITerminalService, Disposable { @@ -32,6 +34,7 @@ export class TerminalService implements ITerminalService, Disposable { private terminalActivator: ITerminalActivator; private terminalAutoActivator: ITerminalAutoActivation; private readonly envVarScript = path.join(EXTENSION_ROOT_DIR, 'python_files', 'pythonrc.py'); + private readonly executeCommandListeners: Set = new Set(); public get onDidCloseTerminal(): Event { return this.terminalClosed.event.bind(this.terminalClosed); } @@ -48,8 +51,12 @@ export class TerminalService implements ITerminalService, Disposable { this.terminalActivator = this.serviceContainer.get(ITerminalActivator); } public dispose() { - if (this.terminal) { - this.terminal.dispose(); + this.terminal?.dispose(); + + if (this.executeCommandListeners && this.executeCommandListeners.size > 0) { + this.executeCommandListeners.forEach((d) => { + d?.dispose(); + }); } } public async sendCommand(command: string, args: string[], _?: CancellationToken): Promise { @@ -59,8 +66,9 @@ export class TerminalService implements ITerminalService, Disposable { this.terminal!.show(true); } - this.terminal!.sendText(text, true); + await this.executeCommand(text); } + /** @deprecated */ public async sendText(text: string): Promise { await this.ensureTerminal(); if (!this.options?.hideFromUser) { @@ -68,12 +76,59 @@ export class TerminalService implements ITerminalService, Disposable { } this.terminal!.sendText(text); } + public async executeCommand(commandLine: string): Promise { + const terminal = this.terminal!; + if (!this.options?.hideFromUser) { + terminal.show(true); + } + + // If terminal was just launched, wait some time for shell integration to onDidChangeShellIntegration. + if (!terminal.shellIntegration) { + const promise = new Promise((resolve) => { + const shellIntegrationChangeEventListener = this.terminalManager.onDidChangeTerminalShellIntegration( + () => { + this.executeCommandListeners.delete(shellIntegrationChangeEventListener); + resolve(true); + }, + ); + const TIMEOUT_DURATION = 3000; + setTimeout(() => { + this.executeCommandListeners.add(shellIntegrationChangeEventListener); + resolve(true); + }, TIMEOUT_DURATION); + }); + await promise; + } + + if (terminal.shellIntegration) { + const execution = terminal.shellIntegration.executeCommand(commandLine); + return await new Promise((resolve) => { + const listener = this.terminalManager.onDidEndTerminalShellExecution((e) => { + if (e.execution === execution) { + this.executeCommandListeners.delete(listener); + resolve({ execution, exitCode: e.exitCode }); + } + }); + if (listener) { + this.executeCommandListeners.add(listener); + } + traceVerbose(`Shell Integration is enabled, executeCommand: ${commandLine}`); + }); + } else { + terminal.sendText(commandLine); + traceVerbose(`Shell Integration is disabled, sendText: ${commandLine}`); + } + + return undefined; + } + public async show(preserveFocus: boolean = true): Promise { await this.ensureTerminal(preserveFocus); if (!this.options?.hideFromUser) { this.terminal!.show(preserveFocus); } } + // TODO: Debt switch to Promise ---> breaks 20 tests public async ensureTerminal(preserveFocus: boolean = true): Promise { if (this.terminal) { return; @@ -89,7 +144,7 @@ export class TerminalService implements ITerminalService, Disposable { // Sometimes the terminal takes some time to start up before it can start accepting input. await new Promise((resolve) => setTimeout(resolve, 100)); - await this.terminalActivator.activateEnvironmentInTerminal(this.terminal!, { + await this.terminalActivator.activateEnvironmentInTerminal(this.terminal, { resource: this.options?.resource, preserveFocus, interpreter: this.options?.interpreter, @@ -97,10 +152,11 @@ export class TerminalService implements ITerminalService, Disposable { }); if (!this.options?.hideFromUser) { - this.terminal!.show(preserveFocus); + this.terminal.show(preserveFocus); } this.sendTelemetry().ignoreErrors(); + return; } private terminalCloseHandler(terminal: Terminal) { if (terminal === this.terminal) { diff --git a/src/client/common/terminal/syncTerminalService.ts b/src/client/common/terminal/syncTerminalService.ts index 4e95ddab01b5..7b25c714a035 100644 --- a/src/client/common/terminal/syncTerminalService.ts +++ b/src/client/common/terminal/syncTerminalService.ts @@ -14,7 +14,7 @@ import * as internalScripts from '../process/internal/scripts'; import { createDeferred, Deferred } from '../utils/async'; import { noop } from '../utils/misc'; import { TerminalService } from './service'; -import { ITerminalService } from './types'; +import { ITerminalService, ITerminalExecutedCommand } from './types'; enum State { notStarted = 0, @@ -146,9 +146,13 @@ export class SynchronousTerminalService implements ITerminalService, Disposable lockFile.dispose(); } } + /** @deprecated */ public sendText(text: string): Promise { return this.terminalService.sendText(text); } + public executeCommand(commandLine: string): Promise { + return this.terminalService.executeCommand(commandLine); + } public show(preserveFocus?: boolean | undefined): Promise { return this.terminalService.show(preserveFocus); } diff --git a/src/client/common/terminal/types.ts b/src/client/common/terminal/types.ts index 49f42e7c19f6..aa8ff73cc205 100644 --- a/src/client/common/terminal/types.ts +++ b/src/client/common/terminal/types.ts @@ -3,7 +3,7 @@ 'use strict'; -import { CancellationToken, Event, Terminal, Uri } from 'vscode'; +import { CancellationToken, Event, Terminal, Uri, TerminalShellExecution } from 'vscode'; import { PythonEnvironment } from '../../pythonEnvironments/info'; import { IEventNamePropertyMapping } from '../../telemetry/index'; import { IDisposable, Resource } from '../types'; @@ -52,10 +52,17 @@ export interface ITerminalService extends IDisposable { cancel?: CancellationToken, swallowExceptions?: boolean, ): Promise; + /** @deprecated */ sendText(text: string): Promise; + executeCommand(commandLine: string): Promise; show(preserveFocus?: boolean): Promise; } +export interface ITerminalExecutedCommand { + execution: TerminalShellExecution; + exitCode: number | undefined; +} + export const ITerminalServiceFactory = Symbol('ITerminalServiceFactory'); export type TerminalCreationOptions = { diff --git a/src/client/common/types.ts b/src/client/common/types.ts index 754e08004213..035e6ec4638b 100644 --- a/src/client/common/types.ts +++ b/src/client/common/types.ts @@ -197,6 +197,7 @@ export interface ITerminalSettings { readonly launchArgs: string[]; readonly activateEnvironment: boolean; readonly activateEnvInCurrentTerminal: boolean; + readonly enableShellIntegration: boolean; } export interface IREPLSettings { diff --git a/src/client/common/utils/localize.ts b/src/client/common/utils/localize.ts index beed5a8999ea..3e11b1ca177b 100644 --- a/src/client/common/utils/localize.ts +++ b/src/client/common/utils/localize.ts @@ -432,6 +432,7 @@ export namespace Testing { export const errorUnittestExecution = l10n.t('Unittest test execution error'); export const cancelPytestExecution = l10n.t('Canceled pytest test execution'); export const errorPytestExecution = l10n.t('pytest test execution error'); + export const copilotSetupMessage = l10n.t('Confirm your Python testing framework to enable test discovery.'); } export namespace OutdatedDebugger { diff --git a/src/client/common/utils/multiStepInput.ts b/src/client/common/utils/multiStepInput.ts index e2b2567b5b4e..2de1684a4d2e 100644 --- a/src/client/common/utils/multiStepInput.ts +++ b/src/client/common/utils/multiStepInput.ts @@ -26,7 +26,7 @@ export class InputFlowAction { } // eslint-disable-next-line @typescript-eslint/no-explicit-any -export type InputStep = (input: MultiStepInput, state: T) => Promise | void>; +export type InputStep = (input: MultiStepInput, state: T) => Promise | void>; type buttonCallbackType = (quickPick: QuickPick) => void; diff --git a/src/client/common/variables/environment.ts b/src/client/common/variables/environment.ts index 81e6b8b2cfc9..9f0abd9b0ee7 100644 --- a/src/client/common/variables/environment.ts +++ b/src/client/common/variables/environment.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { pathExistsSync, readFileSync } from 'fs-extra'; +import { pathExistsSync, readFileSync } from '../platform/fs-paths'; import { inject, injectable } from 'inversify'; import * as path from 'path'; import { traceError } from '../../logging'; diff --git a/src/client/common/variables/environmentVariablesProvider.ts b/src/client/common/variables/environmentVariablesProvider.ts index 2524aac21017..14573d2204aa 100644 --- a/src/client/common/variables/environmentVariablesProvider.ts +++ b/src/client/common/variables/environmentVariablesProvider.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import * as path from 'path'; import { ConfigurationChangeEvent, Disposable, Event, EventEmitter, FileSystemWatcher, Uri } from 'vscode'; import { traceError, traceVerbose } from '../../logging'; @@ -33,7 +33,7 @@ export class EnvironmentVariablesProvider implements IEnvironmentVariablesProvid @inject(IPlatformService) private platformService: IPlatformService, @inject(IWorkspaceService) private workspaceService: IWorkspaceService, @inject(ICurrentProcess) private process: ICurrentProcess, - @optional() private cacheDuration: number = CACHE_DURATION, + private cacheDuration: number = CACHE_DURATION, ) { disposableRegistry.push(this); this.changeEventEmitter = new EventEmitter(); diff --git a/src/client/common/vscodeApis/extensionsApi.ts b/src/client/common/vscodeApis/extensionsApi.ts index 4e1664a3dfae..f099d6f636b0 100644 --- a/src/client/common/vscodeApis/extensionsApi.ts +++ b/src/client/common/vscodeApis/extensionsApi.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import * as path from 'path'; -import * as fs from 'fs-extra'; import * as vscode from 'vscode'; +import * as fs from '../platform/fs-paths'; import { PVSC_EXTENSION_ID } from '../constants'; export function getExtension(extensionId: string): vscode.Extension | undefined { diff --git a/src/client/common/vscodeApis/workspaceApis.ts b/src/client/common/vscodeApis/workspaceApis.ts index d41c877e5aa8..cb516da73075 100644 --- a/src/client/common/vscodeApis/workspaceApis.ts +++ b/src/client/common/vscodeApis/workspaceApis.ts @@ -36,11 +36,11 @@ export function findFiles( return vscode.workspace.findFiles(include, exclude, maxResults, token); } -export function onDidCloseTextDocument(handler: (e: vscode.TextDocument) => unknown): vscode.Disposable { +export function onDidCloseTextDocument(handler: (e: vscode.TextDocument) => void): vscode.Disposable { return vscode.workspace.onDidCloseTextDocument(handler); } -export function onDidSaveTextDocument(handler: (e: vscode.TextDocument) => unknown): vscode.Disposable { +export function onDidSaveTextDocument(handler: (e: vscode.TextDocument) => void): vscode.Disposable { return vscode.workspace.onDidSaveTextDocument(handler); } @@ -48,15 +48,15 @@ export function getOpenTextDocuments(): readonly vscode.TextDocument[] { return vscode.workspace.textDocuments; } -export function onDidOpenTextDocument(handler: (doc: vscode.TextDocument) => unknown): vscode.Disposable { +export function onDidOpenTextDocument(handler: (doc: vscode.TextDocument) => void): vscode.Disposable { return vscode.workspace.onDidOpenTextDocument(handler); } -export function onDidChangeTextDocument(handler: (e: vscode.TextDocumentChangeEvent) => unknown): vscode.Disposable { +export function onDidChangeTextDocument(handler: (e: vscode.TextDocumentChangeEvent) => void): vscode.Disposable { return vscode.workspace.onDidChangeTextDocument(handler); } -export function onDidChangeConfiguration(handler: (e: vscode.ConfigurationChangeEvent) => unknown): vscode.Disposable { +export function onDidChangeConfiguration(handler: (e: vscode.ConfigurationChangeEvent) => void): vscode.Disposable { return vscode.workspace.onDidChangeConfiguration(handler); } @@ -75,7 +75,29 @@ export function createFileSystemWatcher( } export function onDidChangeWorkspaceFolders( - handler: (e: vscode.WorkspaceFoldersChangeEvent) => unknown, + handler: (e: vscode.WorkspaceFoldersChangeEvent) => void, ): vscode.Disposable { return vscode.workspace.onDidChangeWorkspaceFolders(handler); } + +export function isVirtualWorkspace(): boolean { + const isVirtualWorkspace = + vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.every((f) => f.uri.scheme !== 'file'); + return !!isVirtualWorkspace; +} + +export function isTrusted(): boolean { + return vscode.workspace.isTrusted; +} + +export function onDidGrantWorkspaceTrust(handler: () => void): vscode.Disposable { + return vscode.workspace.onDidGrantWorkspaceTrust(handler); +} + +export function createDirectory(uri: vscode.Uri): Thenable { + return vscode.workspace.fs.createDirectory(uri); +} + +export function copy(source: vscode.Uri, dest: vscode.Uri, options?: { overwrite?: boolean }): Thenable { + return vscode.workspace.fs.copy(source, dest, options); +} diff --git a/src/client/debugger/extension/configuration/launch.json/launchJsonReader.ts b/src/client/debugger/extension/configuration/launch.json/launchJsonReader.ts index 4177dd90e4a2..d5857638821a 100644 --- a/src/client/debugger/extension/configuration/launch.json/launchJsonReader.ts +++ b/src/client/debugger/extension/configuration/launch.json/launchJsonReader.ts @@ -2,9 +2,9 @@ // Licensed under the MIT License. import * as path from 'path'; -import * as fs from 'fs-extra'; import { parse } from 'jsonc-parser'; import { DebugConfiguration, Uri, WorkspaceFolder } from 'vscode'; +import * as fs from '../../../../common/platform/fs-paths'; import { getConfiguration, getWorkspaceFolder } from '../../../../common/vscodeApis/workspaceApis'; import { traceLog } from '../../../../logging'; diff --git a/src/client/extensionActivation.ts b/src/client/extensionActivation.ts index fe5d18a8b83f..429004e951cb 100644 --- a/src/client/extensionActivation.ts +++ b/src/client/extensionActivation.ts @@ -54,6 +54,7 @@ import { DebuggerTypeName } from './debugger/constants'; import { StopWatch } from './common/utils/stopWatch'; import { registerReplCommands, registerReplExecuteOnEnter, registerStartNativeReplCommand } from './repl/replCommands'; import { registerTriggerForTerminalREPL } from './terminals/codeExecution/terminalReplWatcher'; +import { registerPythonStartup } from './terminals/pythonStartup'; export async function activateComponents( // `ext` is passed to any extra activation funcs. @@ -177,6 +178,8 @@ async function activateLegacy(ext: ExtensionState, startupStopWatch: StopWatch): serviceManager.get(ITerminalAutoActivation).register(); + await registerPythonStartup(ext.context); + serviceManager.get(ICodeExecutionManager).registerCommands(); disposables.push(new ReplProvider(serviceContainer)); diff --git a/src/client/extensionInit.ts b/src/client/extensionInit.ts index 851bc943cb8d..1332dc6bd070 100644 --- a/src/client/extensionInit.ts +++ b/src/client/extensionInit.ts @@ -4,8 +4,7 @@ 'use strict'; import { Container } from 'inversify'; -import { Disposable, Memento, window } from 'vscode'; -import { instance, mock } from 'ts-mockito'; +import { Disposable, l10n, Memento, window } from 'vscode'; import { registerTypes as platformRegisterTypes } from './common/platform/serviceRegistry'; import { registerTypes as processRegisterTypes } from './common/process/serviceRegistry'; import { registerTypes as commonRegisterTypes } from './common/serviceRegistry'; @@ -29,7 +28,7 @@ import * as pythonEnvironments from './pythonEnvironments'; import { IDiscoveryAPI } from './pythonEnvironments/base/locator'; import { registerLogger } from './logging'; import { OutputChannelLogger } from './logging/outputChannelLogger'; -import { WorkspaceService } from './common/application/workspace'; +import { isTrusted, isVirtualWorkspace } from './common/vscodeApis/workspaceApis'; // The code in this module should do nothing more complex than register // objects to DI and simple init (e.g. no side effects). That implies @@ -57,13 +56,11 @@ export function initializeGlobals( disposables.push(standardOutputChannel); disposables.push(registerLogger(new OutputChannelLogger(standardOutputChannel))); - const workspaceService = new WorkspaceService(); - const unitTestOutChannel = - workspaceService.isVirtualWorkspace || !workspaceService.isTrusted - ? // Do not create any test related output UI when using virtual workspaces. - instance(mock()) - : window.createOutputChannel(OutputChannelNames.pythonTest); + const unitTestOutChannel = window.createOutputChannel(OutputChannelNames.pythonTest); disposables.push(unitTestOutChannel); + if (isVirtualWorkspace() || !isTrusted()) { + unitTestOutChannel.appendLine(l10n.t('Unit tests are not supported in this environment.')); + } serviceManager.addSingletonInstance(ILogOutputChannel, standardOutputChannel); serviceManager.addSingletonInstance(ITestOutputChannel, unitTestOutChannel); diff --git a/src/client/interpreter/configuration/interpreterSelector/commands/installPython/installPythonViaTerminal.ts b/src/client/interpreter/configuration/interpreterSelector/commands/installPython/installPythonViaTerminal.ts index 9da7284a3bea..3b4a6d428baa 100644 --- a/src/client/interpreter/configuration/interpreterSelector/commands/installPython/installPythonViaTerminal.ts +++ b/src/client/interpreter/configuration/interpreterSelector/commands/installPython/installPythonViaTerminal.ts @@ -94,7 +94,7 @@ export class InstallPythonViaTerminal implements IExtensionSingleActivationServi async function isPackageAvailable(packageManager: PackageManagers) { try { const which = require('which') as typeof whichTypes; - const resolvedPath = await which(packageManager); + const resolvedPath = await which.default(packageManager); traceVerbose(`Resolved path to ${packageManager} module:`, resolvedPath); return resolvedPath.trim().length > 0; } catch (ex) { diff --git a/src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts b/src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts index 0a663ac9f0d3..e65cd1567ac4 100644 --- a/src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts +++ b/src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts @@ -46,8 +46,7 @@ import { ISpecialQuickPickItem, } from '../../types'; import { BaseInterpreterSelectorCommand } from './base'; - -const untildify = require('untildify'); +import { untildify } from '../../../../common/helpers'; export type InterpreterStateArgs = { path?: string; workspace: Resource }; export type QuickPickType = IInterpreterQuickPickItem | ISpecialQuickPickItem | QuickPickItem; diff --git a/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts b/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts index d5470e528ab9..21bcc12b0d06 100644 --- a/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts +++ b/src/client/interpreter/virtualEnvs/activatedEnvLaunch.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import { ConfigurationTarget } from 'vscode'; import * as path from 'path'; import { IApplicationShell, IWorkspaceService } from '../../common/application/types'; @@ -29,7 +29,7 @@ export class ActivatedEnvironmentLaunch implements IActivatedEnvironmentLaunch { private readonly pythonPathUpdaterService: IPythonPathUpdaterServiceManager, @inject(IInterpreterService) private readonly interpreterService: IInterpreterService, @inject(IProcessServiceFactory) private readonly processServiceFactory: IProcessServiceFactory, - @optional() public wasSelected: boolean = false, + public wasSelected: boolean = false, ) {} @cache(-1, true) diff --git a/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts b/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts index cf9175345cb0..6b5295724449 100644 --- a/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts +++ b/src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { inject, injectable, optional } from 'inversify'; +import { inject, injectable } from 'inversify'; import { ConfigurationTarget, Uri } from 'vscode'; import { IExtensionActivationService } from '../../activation/types'; import { IApplicationEnvironment, IApplicationShell, IWorkspaceService } from '../../common/application/types'; @@ -26,7 +26,7 @@ export class CondaInheritEnvPrompt implements IExtensionActivationService { @inject(IPersistentStateFactory) private readonly persistentStateFactory: IPersistentStateFactory, @inject(IPlatformService) private readonly platformService: IPlatformService, @inject(IApplicationEnvironment) private readonly appEnvironment: IApplicationEnvironment, - @optional() public hasPromptBeenShownInCurrentSession: boolean = false, + public hasPromptBeenShownInCurrentSession: boolean = false, ) {} public async activate(resource: Uri): Promise { diff --git a/src/client/providers/replProvider.ts b/src/client/providers/replProvider.ts index 810e24b78f42..dd9df89a78a3 100644 --- a/src/client/providers/replProvider.ts +++ b/src/client/providers/replProvider.ts @@ -4,8 +4,6 @@ import { Commands } from '../common/constants'; import { noop } from '../common/utils/misc'; import { IInterpreterService } from '../interpreter/contracts'; import { IServiceContainer } from '../ioc/types'; -import { captureTelemetry } from '../telemetry'; -import { EventName } from '../telemetry/constants'; import { ICodeExecutionService } from '../terminals/types'; export class ReplProvider implements Disposable { @@ -28,7 +26,6 @@ export class ReplProvider implements Disposable { this.disposables.push(disposable); } - @captureTelemetry(EventName.REPL, { replType: 'Terminal' }) private async commandHandler() { const resource = this.activeResourceService.getActiveResource(); const interpreterService = this.serviceContainer.get(IInterpreterService); diff --git a/src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts b/src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts index 4f3352aa98ce..a05fcb8b4de4 100644 --- a/src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts +++ b/src/client/pythonEnvironments/base/locators/common/nativePythonFinder.ts @@ -3,10 +3,10 @@ import { Disposable, EventEmitter, Event, Uri } from 'vscode'; import * as ch from 'child_process'; -import * as fs from 'fs-extra'; import * as path from 'path'; import * as rpc from 'vscode-jsonrpc/node'; import { PassThrough } from 'stream'; +import * as fs from '../../../../common/platform/fs-paths'; import { isWindows } from '../../../../common/platform/platformService'; import { EXTENSION_ROOT_DIR } from '../../../../constants'; import { createDeferred, createDeferredFrom } from '../../../../common/utils/async'; @@ -21,8 +21,7 @@ import { sendNativeTelemetry, NativePythonTelemetry } from './nativePythonTeleme import { NativePythonEnvironmentKind } from './nativePythonUtils'; import type { IExtensionContext } from '../../../../common/types'; import { StopWatch } from '../../../../common/utils/stopWatch'; - -const untildify = require('untildify'); +import { untildify } from '../../../../common/helpers'; const PYTHON_ENV_TOOLS_PATH = isWindows() ? path.join(EXTENSION_ROOT_DIR, 'python-env-tools', 'bin', 'pet.exe') diff --git a/src/client/pythonEnvironments/base/locators/common/resourceBasedLocator.ts b/src/client/pythonEnvironments/base/locators/common/resourceBasedLocator.ts index 9391888cf0cf..8b56b4c7b8c1 100644 --- a/src/client/pythonEnvironments/base/locators/common/resourceBasedLocator.ts +++ b/src/client/pythonEnvironments/base/locators/common/resourceBasedLocator.ts @@ -4,7 +4,7 @@ import { IDisposable } from '../../../../common/types'; import { createDeferred, Deferred } from '../../../../common/utils/async'; import { Disposables } from '../../../../common/utils/resourceLifecycle'; -import { traceError } from '../../../../logging'; +import { traceError, traceWarn } from '../../../../logging'; import { arePathsSame, isVirtualWorkspace } from '../../../common/externalDependencies'; import { getEnvPath } from '../../info/env'; import { BasicEnvInfo, IPythonEnvsIterator, Locator, PythonLocatorQuery } from '../../locator'; @@ -36,7 +36,11 @@ export abstract class LazyResourceBasedLocator extends Locator imp protected async activate(): Promise { await this.ensureResourcesReady(); // There is not need to wait for the watchers to get started. - this.ensureWatchersReady().ignoreErrors(); + try { + this.ensureWatchersReady(); + } catch (ex) { + traceWarn(`Failed to ensure watchers are ready for locator ${this.constructor.name}`, ex); + } } public async dispose(): Promise { diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.ts index ae74d2f3e189..4c6a05af4acc 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.ts @@ -9,12 +9,7 @@ import { PythonEnvKind } from '../../info'; import { BasicEnvInfo, IPythonEnvsIterator } from '../../locator'; import { FSWatchingLocator } from './fsWatchingLocator'; import { findInterpretersInDir, looksLikeBasicVirtualPython } from '../../../common/commonUtils'; -import { - getPythonSetting, - onDidChangePythonSetting, - pathExists, - untildify, -} from '../../../common/externalDependencies'; +import { getPythonSetting, onDidChangePythonSetting, pathExists } from '../../../common/externalDependencies'; import { isPipenvEnvironment } from '../../../common/environmentManagers/pipenv'; import { isVenvEnvironment, @@ -25,6 +20,7 @@ import '../../../../common/extensions'; import { asyncFilter } from '../../../../common/utils/arrayUtils'; import { traceError, traceInfo, traceVerbose } from '../../../../logging'; import { StopWatch } from '../../../../common/utils/stopWatch'; +import { untildify } from '../../../../common/helpers'; /** * Default number of levels of sub-directories to recurse when looking for interpreters. */ diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts index 71bd30f7cfdc..dd7db5538565 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/fsWatchingLocator.ts @@ -6,7 +6,7 @@ import * as path from 'path'; import { Uri } from 'vscode'; import { FileChangeType, watchLocationForPattern } from '../../../../common/platform/fileSystemWatcher'; import { sleep } from '../../../../common/utils/async'; -import { traceError, traceVerbose } from '../../../../logging'; +import { traceVerbose, traceWarn } from '../../../../logging'; import { getEnvironmentDirFromPath } from '../../../common/commonUtils'; import { PythonEnvStructure, @@ -32,13 +32,13 @@ function checkDirWatchable(dirname: string): DirUnwatchableReason { names = fs.readdirSync(dirname); } catch (err) { const exception = err as NodeJS.ErrnoException; - traceError('Reading directory to watch failed', exception); + traceVerbose('Reading directory failed', exception); if (exception.code === 'ENOENT') { // Treat a missing directory as unwatchable since it can lead to CPU load issues: // https://github.com/microsoft/vscode-python/issues/18459 return 'directory does not exist'; } - throw err; // re-throw + return undefined; } // The limit here is an educated guess. if (names.length > 200) { @@ -117,7 +117,7 @@ export abstract class FSWatchingLocator extends LazyResourceBasedLocator { // that might be watched due to a glob are not checked. const unwatchable = await checkDirWatchable(root); if (unwatchable) { - traceError(`Dir "${root}" is not watchable (${unwatchable})`); + traceWarn(`Dir "${root}" is not watchable (${unwatchable})`); return undefined; } return root; diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/globalVirtualEnvronmentLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/globalVirtualEnvronmentLocator.ts index 3964a6ceb893..86fbbed55043 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/globalVirtualEnvronmentLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/globalVirtualEnvronmentLocator.ts @@ -10,7 +10,7 @@ import { PythonEnvKind } from '../../info'; import { BasicEnvInfo, IPythonEnvsIterator } from '../../locator'; import { FSWatchingLocator } from './fsWatchingLocator'; import { findInterpretersInDir, looksLikeBasicVirtualPython } from '../../../common/commonUtils'; -import { pathExists, untildify } from '../../../common/externalDependencies'; +import { pathExists } from '../../../common/externalDependencies'; import { getProjectDir, isPipenvEnvironment } from '../../../common/environmentManagers/pipenv'; import { isVenvEnvironment, @@ -21,6 +21,7 @@ import '../../../../common/extensions'; import { asyncFilter } from '../../../../common/utils/arrayUtils'; import { traceError, traceInfo, traceVerbose } from '../../../../logging'; import { StopWatch } from '../../../../common/utils/stopWatch'; +import { untildify } from '../../../../common/helpers'; const DEFAULT_SEARCH_DEPTH = 2; /** diff --git a/src/client/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.ts b/src/client/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.ts index 60528bd939aa..2068a05f3a69 100644 --- a/src/client/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.ts +++ b/src/client/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import * as minimatch from 'minimatch'; import * as path from 'path'; +import * as fsapi from '../../../../common/platform/fs-paths'; import { PythonEnvKind } from '../../info'; import { IPythonEnvsIterator, BasicEnvInfo } from '../../locator'; import { FSWatchingLocator } from './fsWatchingLocator'; @@ -35,7 +35,7 @@ const pythonExeGlob = 'python3.{[0-9],[0-9][0-9]}.exe'; * @returns {boolean} : Returns true if the path matches pattern for windows python executable. */ function isMicrosoftStorePythonExePattern(interpreterPath: string): boolean { - return minimatch(path.basename(interpreterPath), pythonExeGlob, { nocase: true }); + return minimatch.default(path.basename(interpreterPath), pythonExeGlob, { nocase: true }); } /** diff --git a/src/client/pythonEnvironments/common/environmentManagers/conda.ts b/src/client/pythonEnvironments/common/environmentManagers/conda.ts index 71f4242c3b99..bd4aba219416 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/conda.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/conda.ts @@ -1,6 +1,6 @@ -import * as fsapi from 'fs-extra'; import * as path from 'path'; import { lt, SemVer } from 'semver'; +import * as fsapi from '../../../common/platform/fs-paths'; import { getEnvironmentVariable, getOSType, getUserHomeDir, OSType } from '../../../common/utils/platform'; import { arePathsSame, diff --git a/src/client/pythonEnvironments/common/environmentManagers/pixi.ts b/src/client/pythonEnvironments/common/environmentManagers/pixi.ts index 7aa1d55acd2c..d7baa4b53f6e 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/pixi.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/pixi.ts @@ -9,7 +9,7 @@ import { OSType, getOSType, getUserHomeDir } from '../../../common/utils/platfor import { exec, getPythonSetting, onDidChangePythonSetting, pathExists, pathExistsSync } from '../externalDependencies'; import { cache } from '../../../common/utils/decorators'; import { isTestExecution } from '../../../common/constants'; -import { traceError, traceVerbose, traceWarn } from '../../../logging'; +import { traceVerbose, traceWarn } from '../../../logging'; import { OUTPUT_MARKER_SCRIPT } from '../../../common/process/internal/scripts'; export const PIXITOOLPATH_SETTING_KEY = 'pixiToolPath'; @@ -119,7 +119,7 @@ export class Pixi { yield customPixiToolPath; } } catch (ex) { - traceError(`Failed to get pixi setting`, ex); + traceWarn(`Failed to get pixi setting`, ex); } // Check unqualified filename, in case it's on PATH. @@ -182,7 +182,7 @@ export class Pixi { const pixiInfo: PixiInfo = JSON.parse(infoOutput.stdout); return pixiInfo; } catch (error) { - traceError(`Failed to get pixi info for ${cwd}`, error); + traceWarn(`Failed to get pixi info for ${cwd}`, error); return undefined; } } @@ -199,15 +199,13 @@ export class Pixi { if (!versionOutput || !versionOutput.stdout) { return undefined; } - const versionParts = versionOutput.stdout.split(' '); if (versionParts.length < 2) { return undefined; } - return versionParts[1].trim(); } catch (error) { - traceError(`Failed to get pixi version`, error); + traceVerbose(`Failed to get pixi version`, error); return undefined; } } diff --git a/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts b/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts index 78a018138e2b..0ad24252f341 100644 --- a/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts +++ b/src/client/pythonEnvironments/common/environmentManagers/simplevirtualenvs.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import * as path from 'path'; +import * as fsapi from '../../../common/platform/fs-paths'; import '../../../common/extensions'; import { splitLines } from '../../../common/stringUtils'; import { getEnvironmentVariable, getOSType, getUserHomeDir, OSType } from '../../../common/utils/platform'; diff --git a/src/client/pythonEnvironments/common/externalDependencies.ts b/src/client/pythonEnvironments/common/externalDependencies.ts index d6b774744a70..b0922f8bab06 100644 --- a/src/client/pythonEnvironments/common/externalDependencies.ts +++ b/src/client/pythonEnvironments/common/externalDependencies.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; +import * as fsapi from '../../common/platform/fs-paths'; import { IWorkspaceService } from '../../common/application/types'; import { ExecutionResult, IProcessServiceFactory, ShellOptions, SpawnOptions } from '../../common/process/types'; import { IDisposable, IConfigurationService, IExperimentService } from '../../common/types'; @@ -67,9 +67,6 @@ export function readFileSync(filePath: string): string { return fsapi.readFileSync(filePath, 'utf-8'); } -// eslint-disable-next-line global-require -export const untildify: (value: string) => string = require('untildify'); - /** * Returns true if given file path exists within the given parent directory, false otherwise. * @param filePath File path to check for @@ -161,7 +158,7 @@ export async function* getSubDirs( root: string, options?: { resolveSymlinks?: boolean }, ): AsyncIterableIterator { - const dirContents = await fsapi.promises.readdir(root, { withFileTypes: true }); + const dirContents = await fsapi.readdir(root, { withFileTypes: true }); const generators = dirContents.map((item) => { async function* generator() { const fullPath = path.join(root, item.name); diff --git a/src/client/pythonEnvironments/common/posixUtils.ts b/src/client/pythonEnvironments/common/posixUtils.ts index 0e79ec9d590e..8149706a5707 100644 --- a/src/client/pythonEnvironments/common/posixUtils.ts +++ b/src/client/pythonEnvironments/common/posixUtils.ts @@ -2,9 +2,9 @@ // Licensed under the MIT License. import * as fs from 'fs'; -import * as fsapi from 'fs-extra'; import * as path from 'path'; import { uniq } from 'lodash'; +import * as fsapi from '../../common/platform/fs-paths'; import { getSearchPathEntries } from '../../common/utils/exec'; import { resolveSymbolicLink } from './externalDependencies'; import { traceError, traceInfo, traceVerbose, traceWarn } from '../../logging'; diff --git a/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts b/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts index b3c5fba96cb0..efc7d56409c8 100644 --- a/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts +++ b/src/client/pythonEnvironments/common/pythonBinariesWatcher.ts @@ -28,7 +28,7 @@ export function watchLocationForPythonBinaries( const [baseGlob] = resolvedGlob.split('/').slice(-1); function callbackClosure(type: FileChangeType, e: string) { traceVerbose('Received event', type, JSON.stringify(e), 'for baseglob', baseGlob); - const isMatch = minimatch(path.basename(e), baseGlob, { nocase: getOSType() === OSType.Windows }); + const isMatch = minimatch.default(path.basename(e), baseGlob, { nocase: getOSType() === OSType.Windows }); if (!isMatch) { // When deleting the file for some reason path to all directories leading up to python are reported // Skip those events @@ -39,6 +39,7 @@ export function watchLocationForPythonBinaries( return watchLocationForPattern(baseDir, resolvedGlob, callbackClosure); } +// eslint-disable-next-line no-shadow export enum PythonEnvStructure { Standard = 'standard', Flat = 'flat', diff --git a/src/client/pythonEnvironments/creation/common/commonUtils.ts b/src/client/pythonEnvironments/creation/common/commonUtils.ts index 9bb5e5318ecd..5d5ee8b0310a 100644 --- a/src/client/pythonEnvironments/creation/common/commonUtils.ts +++ b/src/client/pythonEnvironments/creation/common/commonUtils.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fs from 'fs-extra'; import * as path from 'path'; import { WorkspaceFolder } from 'vscode'; +import * as fs from '../../../common/platform/fs-paths'; import { Commands } from '../../../common/constants'; import { Common } from '../../../common/utils/localize'; import { executeCommand } from '../../../common/vscodeApis/commandApis'; diff --git a/src/client/pythonEnvironments/creation/common/createEnvTriggerUtils.ts b/src/client/pythonEnvironments/creation/common/createEnvTriggerUtils.ts index 0da5ba574118..f3c6ea58a25c 100644 --- a/src/client/pythonEnvironments/creation/common/createEnvTriggerUtils.ts +++ b/src/client/pythonEnvironments/creation/common/createEnvTriggerUtils.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import * as path from 'path'; -import * as fsapi from 'fs-extra'; import { ConfigurationTarget, Uri, WorkspaceFolder } from 'vscode'; +import * as fsapi from '../../../common/platform/fs-paths'; import { getPipRequirementsFiles } from '../provider/venvUtils'; import { getExtension } from '../../../common/vscodeApis/extensionsApi'; import { PVSC_EXTENSION_ID } from '../../../common/constants'; diff --git a/src/client/pythonEnvironments/creation/common/workspaceSelection.ts b/src/client/pythonEnvironments/creation/common/workspaceSelection.ts index 72d34c62cc7c..3ebab1c67fb4 100644 --- a/src/client/pythonEnvironments/creation/common/workspaceSelection.ts +++ b/src/client/pythonEnvironments/creation/common/workspaceSelection.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import * as path from 'path'; import { CancellationToken, QuickPickItem, WorkspaceFolder } from 'vscode'; +import * as fsapi from '../../../common/platform/fs-paths'; import { MultiStepAction, showErrorMessage, showQuickPickWithBack } from '../../../common/vscodeApis/windowApis'; import { getWorkspaceFolders } from '../../../common/vscodeApis/workspaceApis'; import { Common, CreateEnv } from '../../../common/utils/localize'; diff --git a/src/client/pythonEnvironments/creation/provider/venvDeleteUtils.ts b/src/client/pythonEnvironments/creation/provider/venvDeleteUtils.ts index 46a0adf0f228..9bd410c09f51 100644 --- a/src/client/pythonEnvironments/creation/provider/venvDeleteUtils.ts +++ b/src/client/pythonEnvironments/creation/provider/venvDeleteUtils.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fs from 'fs-extra'; import * as path from 'path'; import { WorkspaceFolder } from 'vscode'; +import * as fs from '../../../common/platform/fs-paths'; import { traceError, traceInfo } from '../../../logging'; import { getVenvPath, showErrorMessageWithLogs } from '../common/commonUtils'; import { CreateEnv } from '../../../common/utils/localize'; diff --git a/src/client/pythonEnvironments/creation/provider/venvUtils.ts b/src/client/pythonEnvironments/creation/provider/venvUtils.ts index 94d20c674a3f..5a2c0bb8a2d3 100644 --- a/src/client/pythonEnvironments/creation/provider/venvUtils.ts +++ b/src/client/pythonEnvironments/creation/provider/venvUtils.ts @@ -2,7 +2,6 @@ // Licensed under the MIT License import * as tomljs from '@iarna/toml'; -import * as fs from 'fs-extra'; import { flatten, isArray } from 'lodash'; import * as path from 'path'; import { @@ -15,6 +14,7 @@ import { Uri, WorkspaceFolder, } from 'vscode'; +import * as fs from '../../../common/platform/fs-paths'; import { Common, CreateEnv } from '../../../common/utils/localize'; import { MultiStepAction, diff --git a/src/client/pythonEnvironments/nativeAPI.ts b/src/client/pythonEnvironments/nativeAPI.ts index ddf2371fc319..2d13500fdcd8 100644 --- a/src/client/pythonEnvironments/nativeAPI.ts +++ b/src/client/pythonEnvironments/nativeAPI.ts @@ -337,6 +337,9 @@ class NativePythonEnvironments implements IDiscoveryAPI, Disposable { traceLog(`Pyenv environment manager found at: ${native.executable}`); setPyEnvBinary(native.executable); break; + case 'poetry': + traceLog(`Poetry environment manager found at: ${native.executable}`); + break; default: traceWarn(`Unknown environment manager: ${native.tool}`); break; diff --git a/src/client/repl/nativeRepl.ts b/src/client/repl/nativeRepl.ts index eaa97f9518df..413c795e80d6 100644 --- a/src/client/repl/nativeRepl.ts +++ b/src/client/repl/nativeRepl.ts @@ -19,7 +19,10 @@ import { executeNotebookCell, openInteractiveREPL, selectNotebookKernel } from ' import { createReplController } from './replController'; import { EventName } from '../telemetry/constants'; import { sendTelemetryEvent } from '../telemetry'; +import { VariablesProvider } from './variables/variablesProvider'; +import { VariableRequester } from './variables/variableRequester'; +let nativeRepl: NativeRepl | undefined; // In multi REPL scenario, hashmap of URI to Repl. export class NativeRepl implements Disposable { // Adding ! since it will get initialized in create method, not the constructor. private pythonServer!: PythonServer; @@ -34,6 +37,8 @@ export class NativeRepl implements Disposable { private notebookDocument: NotebookDocument | undefined; + public newReplSession: boolean | undefined = true; + // TODO: In the future, could also have attribute of URI for file specific REPL. private constructor() { this.watchNotebookClosed(); @@ -45,7 +50,7 @@ export class NativeRepl implements Disposable { nativeRepl.interpreter = interpreter; await nativeRepl.setReplDirectory(); nativeRepl.pythonServer = createPythonServer([interpreter.path as string], nativeRepl.cwd); - nativeRepl.replController = nativeRepl.setReplController(); + nativeRepl.setReplController(); return nativeRepl; } @@ -63,6 +68,7 @@ export class NativeRepl implements Disposable { workspace.onDidCloseNotebookDocument((nb) => { if (this.notebookDocument && nb.uri.toString() === this.notebookDocument.uri.toString()) { this.notebookDocument = undefined; + this.newReplSession = true; } }), ); @@ -107,7 +113,12 @@ export class NativeRepl implements Disposable { */ public setReplController(): NotebookController { if (!this.replController) { - return createReplController(this.interpreter!.path, this.disposables, this.cwd); + this.replController = createReplController(this.interpreter!.path, this.disposables, this.cwd); + this.replController.variableProvider = new VariablesProvider( + new VariableRequester(this.pythonServer), + () => this.notebookDocument, + this.pythonServer.onCodeExecuted, + ); } return this.replController; } @@ -146,14 +157,12 @@ export class NativeRepl implements Disposable { this.replController.updateNotebookAffinity(this.notebookDocument, NotebookControllerAffinity.Default); await selectNotebookKernel(notebookEditor, this.replController.id, PVSC_EXTENSION_ID); if (code) { - await executeNotebookCell(this.notebookDocument, code); + await executeNotebookCell(notebookEditor, code); } } } } -let nativeRepl: NativeRepl | undefined; // In multi REPL scenario, hashmap of URI to Repl. - /** * Get Singleton Native REPL Instance * @param interpreter @@ -161,9 +170,12 @@ let nativeRepl: NativeRepl | undefined; // In multi REPL scenario, hashmap of UR */ export async function getNativeRepl(interpreter: PythonEnvironment, disposables: Disposable[]): Promise { if (!nativeRepl) { - sendTelemetryEvent(EventName.REPL, undefined, { replType: 'Native' }); nativeRepl = await NativeRepl.create(interpreter); disposables.push(nativeRepl); } + if (nativeRepl && nativeRepl.newReplSession) { + sendTelemetryEvent(EventName.REPL, undefined, { replType: 'Native' }); + nativeRepl.newReplSession = false; + } return nativeRepl; } diff --git a/src/client/repl/pythonServer.ts b/src/client/repl/pythonServer.ts index fbcb1104dc69..0f500f0431bc 100644 --- a/src/client/repl/pythonServer.ts +++ b/src/client/repl/pythonServer.ts @@ -1,7 +1,7 @@ import * as path from 'path'; import * as ch from 'child_process'; import * as rpc from 'vscode-jsonrpc/node'; -import { Disposable, window } from 'vscode'; +import { Disposable, Event, EventEmitter, window } from 'vscode'; import { EXTENSION_ROOT_DIR } from '../constants'; import { traceError, traceLog } from '../logging'; import { captureTelemetry } from '../telemetry'; @@ -15,15 +15,21 @@ export interface ExecutionResult { } export interface PythonServer extends Disposable { + onCodeExecuted: Event; execute(code: string): Promise; + executeSilently(code: string): Promise; interrupt(): void; input(): void; checkValidCommand(code: string): Promise; } -class PythonServerImpl implements Disposable { +class PythonServerImpl implements PythonServer, Disposable { private readonly disposables: Disposable[] = []; + private readonly _onCodeExecuted = new EventEmitter(); + + onCodeExecuted = this._onCodeExecuted.event; + constructor(private connection: rpc.MessageConnection, private pythonServer: ch.ChildProcess) { this.initialize(); this.input(); @@ -57,6 +63,18 @@ class PythonServerImpl implements Disposable { @captureTelemetry(EventName.EXECUTION_CODE, { scope: 'selection' }, false) public async execute(code: string): Promise { + const result = await this.executeCode(code); + if (result?.status) { + this._onCodeExecuted.fire(); + } + return result; + } + + public executeSilently(code: string): Promise { + return this.executeCode(code); + } + + private async executeCode(code: string): Promise { try { const result = await this.connection.sendRequest('execute', code); return result as ExecutionResult; @@ -75,8 +93,8 @@ class PythonServerImpl implements Disposable { } public async checkValidCommand(code: string): Promise { - const completeCode = await this.connection.sendRequest('check_valid_command', code); - if (completeCode === 'True') { + const completeCode: ExecutionResult = await this.connection.sendRequest('check_valid_command', code); + if (completeCode.output === 'True') { return new Promise((resolve) => resolve(true)); } return new Promise((resolve) => resolve(false)); diff --git a/src/client/repl/replCommandHandler.ts b/src/client/repl/replCommandHandler.ts index 599692a4300e..b8fe579647a1 100644 --- a/src/client/repl/replCommandHandler.ts +++ b/src/client/repl/replCommandHandler.ts @@ -12,6 +12,7 @@ import { workspace, } from 'vscode'; import { getExistingReplViewColumn } from './replUtils'; +import { PVSC_EXTENSION_ID } from '../common/constants'; /** * Function that opens/show REPL using IW UI. @@ -23,29 +24,24 @@ export async function openInteractiveREPL( notebookController: NotebookController, notebookDocument: NotebookDocument | undefined, ): Promise { - let notebookEditor: NotebookEditor | undefined; + let viewColumn = ViewColumn.Beside; // Case where NotebookDocument (REPL document already exists in the tab) if (notebookDocument) { const existingReplViewColumn = getExistingReplViewColumn(notebookDocument); - const replViewColumn = existingReplViewColumn ?? ViewColumn.Beside; - notebookEditor = await window.showNotebookDocument(notebookDocument!, { viewColumn: replViewColumn }); + viewColumn = existingReplViewColumn ?? viewColumn; } else if (!notebookDocument) { - // Case where NotebookDocument doesnt exist, open new REPL tab - const interactiveWindowObject = (await commands.executeCommand( - 'interactive.open', - { - preserveFocus: true, - viewColumn: ViewColumn.Beside, - }, - undefined, - notebookController.id, - 'Python REPL', - )) as { notebookEditor: NotebookEditor }; - notebookEditor = interactiveWindowObject.notebookEditor; - notebookDocument = interactiveWindowObject.notebookEditor.notebook; + // Case where NotebookDocument doesnt exist, create a blank one. + notebookDocument = await workspace.openNotebookDocument('jupyter-notebook'); } - return notebookEditor!; + const editor = window.showNotebookDocument(notebookDocument!, { viewColumn, asRepl: 'Python REPL' }); + await commands.executeCommand('notebook.selectKernel', { + editor, + id: notebookController.id, + extension: PVSC_EXTENSION_ID, + }); + + return editor; } /** @@ -73,13 +69,14 @@ export async function selectNotebookKernel( * @param code * @return Promise */ -export async function executeNotebookCell(notebookDocument: NotebookDocument, code: string): Promise { - const { cellCount } = notebookDocument; - await addCellToNotebook(notebookDocument, code); +export async function executeNotebookCell(notebookEditor: NotebookEditor, code: string): Promise { + const { notebook, replOptions } = notebookEditor; + const cellIndex = replOptions?.appendIndex ?? notebook.cellCount; + await addCellToNotebook(notebook, cellIndex, code); // Execute the cell commands.executeCommand('notebook.cell.execute', { - ranges: [{ start: cellCount, end: cellCount + 1 }], - document: notebookDocument.uri, + ranges: [{ start: cellIndex, end: cellIndex + 1 }], + document: notebook.uri, }); } @@ -89,11 +86,10 @@ export async function executeNotebookCell(notebookDocument: NotebookDocument, co * @param code * */ -async function addCellToNotebook(notebookDocument: NotebookDocument, code: string): Promise { +async function addCellToNotebook(notebookDocument: NotebookDocument, index: number, code: string): Promise { const notebookCellData = new NotebookCellData(NotebookCellKind.Code, code as string, 'python'); - const { cellCount } = notebookDocument!; // Add new cell to interactive window document - const notebookEdit = NotebookEdit.insertCells(cellCount, [notebookCellData]); + const notebookEdit = NotebookEdit.insertCells(index, [notebookCellData]); const workspaceEdit = new WorkspaceEdit(); workspaceEdit.set(notebookDocument!.uri, [notebookEdit]); await workspace.applyEdit(workspaceEdit); diff --git a/src/client/repl/replCommands.ts b/src/client/repl/replCommands.ts index 120ddf13effc..82b4aae4e5ee 100644 --- a/src/client/repl/replCommands.ts +++ b/src/client/repl/replCommands.ts @@ -98,29 +98,43 @@ export async function registerReplExecuteOnEnter( ): Promise { disposables.push( commandManager.registerCommand(Commands.Exec_In_REPL_Enter, async (uri: Uri) => { - const interpreter = await interpreterService.getActiveInterpreter(uri); - if (!interpreter) { - commands.executeCommand(Commands.TriggerEnvironmentSelection, uri).then(noop, noop); - return; - } + await onInputEnter(uri, 'repl.execute', interpreterService, disposables); + }), + ); + disposables.push( + commandManager.registerCommand(Commands.Exec_In_IW_Enter, async (uri: Uri) => { + await onInputEnter(uri, 'interactive.execute', interpreterService, disposables); + }), + ); +} - const nativeRepl = await getNativeRepl(interpreter, disposables); - const completeCode = await nativeRepl?.checkUserInputCompleteCode(window.activeTextEditor); - const editor = window.activeTextEditor; +async function onInputEnter( + uri: Uri, + commandName: string, + interpreterService: IInterpreterService, + disposables: Disposable[], +): Promise { + const interpreter = await interpreterService.getActiveInterpreter(uri); + if (!interpreter) { + commands.executeCommand(Commands.TriggerEnvironmentSelection, uri).then(noop, noop); + return; + } - if (editor) { - // Execute right away when complete code and Not multi-line - if (completeCode && !isMultiLineText(editor)) { - await commands.executeCommand('interactive.execute'); - } else { - insertNewLineToREPLInput(editor); + const nativeRepl = await getNativeRepl(interpreter, disposables); + const completeCode = await nativeRepl?.checkUserInputCompleteCode(window.activeTextEditor); + const editor = window.activeTextEditor; - // Handle case when user enters on blank line, just trigger interactive.execute - if (editor && editor.document.lineAt(editor.selection.active.line).text === '') { - await commands.executeCommand('interactive.execute'); - } - } + if (editor) { + // Execute right away when complete code and Not multi-line + if (completeCode && !isMultiLineText(editor)) { + await commands.executeCommand(commandName); + } else { + insertNewLineToREPLInput(editor); + + // Handle case when user enters on blank line, just trigger interactive.execute + if (editor && editor.document.lineAt(editor.selection.active.line).text === '') { + await commands.executeCommand(commandName); } - }), - ); + } + } } diff --git a/src/client/repl/replController.ts b/src/client/repl/replController.ts index 7c1f8fd0c6b2..08c2a27066a1 100644 --- a/src/client/repl/replController.ts +++ b/src/client/repl/replController.ts @@ -9,7 +9,7 @@ export function createReplController( const server = createPythonServer([interpreterPath], cwd); disposables.push(server); - const controller = vscode.notebooks.createNotebookController('pythonREPL', 'interactive', 'Python REPL'); + const controller = vscode.notebooks.createNotebookController('pythonREPL', 'jupyter-notebook', 'Python REPL'); controller.supportedLanguages = ['python']; controller.supportsExecutionOrder = true; diff --git a/src/client/repl/variables/types.ts b/src/client/repl/variables/types.ts new file mode 100644 index 000000000000..1e3c80d32077 --- /dev/null +++ b/src/client/repl/variables/types.ts @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { CancellationToken, Variable } from 'vscode'; + +export interface IVariableDescription extends Variable { + /** The name of the variable at the root scope */ + root: string; + /** How to look up the specific property of the root variable */ + propertyChain: (string | number)[]; + /** The number of children for collection types */ + count?: number; + /** Names of children */ + hasNamedChildren?: boolean; + /** A method to get the children of this variable */ + getChildren?: (start: number, token: CancellationToken) => Promise; +} diff --git a/src/client/repl/variables/variableRequester.ts b/src/client/repl/variables/variableRequester.ts new file mode 100644 index 000000000000..e66afdcd6616 --- /dev/null +++ b/src/client/repl/variables/variableRequester.ts @@ -0,0 +1,59 @@ +import { CancellationToken } from 'vscode'; +import path from 'path'; +import * as fsapi from '../../common/platform/fs-paths'; +import { IVariableDescription } from './types'; +import { PythonServer } from '../pythonServer'; +import { EXTENSION_ROOT_DIR } from '../../constants'; + +const VARIABLE_SCRIPT_LOCATION = path.join(EXTENSION_ROOT_DIR, 'python_files', 'get_variable_info.py'); + +export class VariableRequester { + public static scriptContents: string | undefined; + + constructor(private pythonServer: PythonServer) {} + + async getAllVariableDescriptions( + parent: IVariableDescription | undefined, + start: number, + token: CancellationToken, + ): Promise { + const scriptLines = (await getContentsOfVariablesScript()).split(/(?:\r\n|\n)/); + if (parent) { + const printCall = `import json;return json.dumps(getAllChildrenDescriptions(\'${ + parent.root + }\', ${JSON.stringify(parent.propertyChain)}, ${start}))`; + scriptLines.push(printCall); + } else { + scriptLines.push('import json;return json.dumps(getVariableDescriptions())'); + } + + if (token.isCancellationRequested) { + return []; + } + + const script = wrapScriptInFunction(scriptLines); + const result = await this.pythonServer.executeSilently(script); + + if (result?.output && !token.isCancellationRequested) { + return JSON.parse(result.output) as IVariableDescription[]; + } + + return []; + } +} + +function wrapScriptInFunction(scriptLines: string[]): string { + const indented = scriptLines.map((line) => ` ${line}`).join('\n'); + // put everything into a function scope and then delete that scope + // TODO: run in a background thread + return `def __VSCODE_run_script():\n${indented}\nprint(__VSCODE_run_script())\ndel __VSCODE_run_script`; +} + +async function getContentsOfVariablesScript(): Promise { + if (VariableRequester.scriptContents) { + return VariableRequester.scriptContents; + } + const contents = await fsapi.readFile(VARIABLE_SCRIPT_LOCATION, 'utf-8'); + VariableRequester.scriptContents = contents; + return VariableRequester.scriptContents; +} diff --git a/src/client/repl/variables/variableResultCache.ts b/src/client/repl/variables/variableResultCache.ts new file mode 100644 index 000000000000..1e19415becb7 --- /dev/null +++ b/src/client/repl/variables/variableResultCache.ts @@ -0,0 +1,28 @@ +import { VariablesResult } from 'vscode'; + +export class VariableResultCache { + private cache = new Map(); + + private executionCount = 0; + + getResults(executionCount: number, cacheKey: string): VariablesResult[] | undefined { + if (this.executionCount !== executionCount) { + this.cache.clear(); + this.executionCount = executionCount; + } + + return this.cache.get(cacheKey); + } + + setResults(executionCount: number, cacheKey: string, results: VariablesResult[]): void { + if (this.executionCount < executionCount) { + this.cache.clear(); + this.executionCount = executionCount; + } else if (this.executionCount > executionCount) { + // old results, don't cache + return; + } + + this.cache.set(cacheKey, results); + } +} diff --git a/src/client/repl/variables/variablesProvider.ts b/src/client/repl/variables/variablesProvider.ts new file mode 100644 index 000000000000..ffb7c221d00c --- /dev/null +++ b/src/client/repl/variables/variablesProvider.ts @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { + CancellationToken, + NotebookDocument, + Variable, + NotebookVariablesRequestKind, + VariablesResult, + EventEmitter, + Event, + NotebookVariableProvider, +} from 'vscode'; +import { VariableResultCache } from './variableResultCache'; +import { IVariableDescription } from './types'; +import { VariableRequester } from './variableRequester'; + +export class VariablesProvider implements NotebookVariableProvider { + private readonly variableResultCache = new VariableResultCache(); + + private _onDidChangeVariables = new EventEmitter(); + + onDidChangeVariables = this._onDidChangeVariables.event; + + private executionCount = 0; + + constructor( + private readonly variableRequester: VariableRequester, + private readonly getNotebookDocument: () => NotebookDocument | undefined, + codeExecutedEvent: Event, + ) { + codeExecutedEvent(() => this.onDidExecuteCode()); + } + + onDidExecuteCode(): void { + const notebook = this.getNotebookDocument(); + if (notebook) { + this.executionCount += 1; + this._onDidChangeVariables.fire(notebook); + } + } + + async *provideVariables( + notebook: NotebookDocument, + parent: Variable | undefined, + kind: NotebookVariablesRequestKind, + start: number, + token: CancellationToken, + ): AsyncIterable { + const notebookDocument = this.getNotebookDocument(); + if (token.isCancellationRequested || !notebookDocument || notebookDocument !== notebook) { + return; + } + + const { executionCount } = this; + const cacheKey = getVariableResultCacheKey(notebook.uri.toString(), parent, start); + let results = this.variableResultCache.getResults(executionCount, cacheKey); + + if (parent) { + const parentDescription = parent as IVariableDescription; + if (!results && parentDescription.getChildren) { + const variables = await parentDescription.getChildren(start, token); + if (token.isCancellationRequested) { + return; + } + results = variables.map((variable) => this.createVariableResult(variable)); + this.variableResultCache.setResults(executionCount, cacheKey, results); + } else if (!results) { + // no cached results and no way to get children, so return empty + return; + } + + for (const result of results) { + yield result; + } + + // check if we have more indexed children to return + if ( + kind === 2 && + parentDescription.count && + results.length > 0 && + parentDescription.count > start + results.length + ) { + for await (const result of this.provideVariables( + notebook, + parent, + kind, + start + results.length, + token, + )) { + yield result; + } + } + } else { + if (!results) { + const variables = await this.variableRequester.getAllVariableDescriptions(undefined, start, token); + if (token.isCancellationRequested) { + return; + } + results = variables.map((variable) => this.createVariableResult(variable)); + this.variableResultCache.setResults(executionCount, cacheKey, results); + } + + for (const result of results) { + yield result; + } + } + } + + private createVariableResult(result: IVariableDescription): VariablesResult { + const indexedChildrenCount = result.count ?? 0; + const hasNamedChildren = !!result.hasNamedChildren; + const variable = { + getChildren: (start: number, token: CancellationToken) => this.getChildren(variable, start, token), + expression: createExpression(result.root, result.propertyChain), + ...result, + } as Variable; + return { variable, hasNamedChildren, indexedChildrenCount }; + } + + async getChildren(variable: Variable, start: number, token: CancellationToken): Promise { + const parent = variable as IVariableDescription; + return this.variableRequester.getAllVariableDescriptions(parent, start, token); + } +} + +function createExpression(root: string, propertyChain: (string | number)[]): string { + let expression = root; + for (const property of propertyChain) { + if (typeof property === 'string') { + expression += `.${property}`; + } else { + expression += `[${property}]`; + } + } + return expression; +} + +function getVariableResultCacheKey(uri: string, parent: Variable | undefined, start: number) { + let parentKey = ''; + const parentDescription = parent as IVariableDescription; + if (parentDescription) { + parentKey = `${parentDescription.name}.${parentDescription.propertyChain.join('.')}[[${start}`; + } + return `${uri}:${parentKey}`; +} diff --git a/src/client/telemetry/importTracker.ts b/src/client/telemetry/importTracker.ts index 06991a815140..48b20f053453 100644 --- a/src/client/telemetry/importTracker.ts +++ b/src/client/telemetry/importTracker.ts @@ -49,7 +49,7 @@ const testExecution = isTestExecution(); export class ImportTracker implements IExtensionSingleActivationService { public readonly supportedWorkspaceTypes = { untrustedWorkspace: false, virtualWorkspace: true }; - private pendingChecks = new Map(); + private pendingChecks = new Map(); private static sentMatches: Set = new Set(); diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index 4904b330c75b..fb1cb3a96be7 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -2305,7 +2305,8 @@ export interface IEventNamePropertyMapping { */ /* __GDPR__ "repl" : { - "duration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "anthonykim1" } + "duration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "anthonykim1" }, + "repltype" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "owner": "anthonykim1" } } */ [EventName.REPL]: { diff --git a/src/client/tensorBoard/tensorBoardSession.ts b/src/client/tensorBoard/tensorBoardSession.ts index fb54ad6f32e6..13e5e66e0a30 100644 --- a/src/client/tensorBoard/tensorBoardSession.ts +++ b/src/client/tensorBoard/tensorBoardSession.ts @@ -1,6 +1,5 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fs from 'fs-extra'; import { ChildProcess } from 'child_process'; import * as path from 'path'; import { @@ -24,6 +23,7 @@ import { window, workspace, } from 'vscode'; +import * as fs from '../common/platform/fs-paths'; import { IApplicationShell, ICommandManager, IWorkspaceService } from '../common/application/types'; import { createPromiseFromCancellation } from '../common/cancellation'; import { tensorboardLauncher } from '../common/process/internal/scripts'; diff --git a/src/client/terminals/codeExecution/terminalCodeExecution.ts b/src/client/terminals/codeExecution/terminalCodeExecution.ts index f2750fedaa07..3cba6141763b 100644 --- a/src/client/terminals/codeExecution/terminalCodeExecution.ts +++ b/src/client/terminals/codeExecution/terminalCodeExecution.ts @@ -59,7 +59,7 @@ export class TerminalCodeExecutionProvider implements ICodeExecutionService { this.configurationService.updateSetting('REPL.enableREPLSmartSend', false, resource); } } else { - await this.getTerminalService(resource).sendText(code); + await this.getTerminalService(resource).executeCommand(code); } } diff --git a/src/client/terminals/envCollectionActivation/service.ts b/src/client/terminals/envCollectionActivation/service.ts index 8993007ce7c8..62971aa1fa98 100644 --- a/src/client/terminals/envCollectionActivation/service.ts +++ b/src/client/terminals/envCollectionActivation/service.ts @@ -11,7 +11,7 @@ import { EnvironmentVariableMutatorOptions, ProgressLocation, } from 'vscode'; -import { pathExists } from 'fs-extra'; +import { pathExists, normCase } from '../../common/platform/fs-paths'; import { IExtensionActivationService } from '../../activation/types'; import { IApplicationShell, IApplicationEnvironment, IWorkspaceService } from '../../common/application/types'; import { inTerminalEnvVarExperiment } from '../../common/experiments/helpers'; @@ -35,9 +35,13 @@ import { getSearchPathEnvVarNames } from '../../common/utils/exec'; import { EnvironmentVariables, IEnvironmentVariablesProvider } from '../../common/variables/types'; import { TerminalShellType } from '../../common/terminal/types'; import { OSType } from '../../common/utils/platform'; -import { normCase } from '../../common/platform/fs-paths'; + import { PythonEnvType } from '../../pythonEnvironments/base/info'; -import { IShellIntegrationService, ITerminalDeactivateService, ITerminalEnvVarCollectionService } from '../types'; +import { + IShellIntegrationDetectionService, + ITerminalDeactivateService, + ITerminalEnvVarCollectionService, +} from '../types'; import { ProgressService } from '../../common/application/progressService'; @injectable() @@ -80,7 +84,8 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ @inject(IConfigurationService) private readonly configurationService: IConfigurationService, @inject(ITerminalDeactivateService) private readonly terminalDeactivateService: ITerminalDeactivateService, @inject(IPathUtils) private readonly pathUtils: IPathUtils, - @inject(IShellIntegrationService) private readonly shellIntegrationService: IShellIntegrationService, + @inject(IShellIntegrationDetectionService) + private readonly shellIntegrationDetectionService: IShellIntegrationDetectionService, @inject(IEnvironmentVariablesProvider) private readonly environmentVariablesProvider: IEnvironmentVariablesProvider, ) { @@ -113,7 +118,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ this, this.disposables, ); - this.shellIntegrationService.onDidChangeStatus( + this.shellIntegrationDetectionService.onDidChangeStatus( async () => { traceInfo("Shell integration status changed, can confirm it's working."); await this._applyCollection(undefined).ignoreErrors(); @@ -139,7 +144,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ this.disposables, ); const { shell } = this.applicationEnvironment; - const isActive = await this.shellIntegrationService.isWorking(); + const isActive = await this.shellIntegrationDetectionService.isWorking(); const shellType = identifyShellFromShellPath(shell); if (!isActive && shellType !== TerminalShellType.commandPrompt) { traceWarn( @@ -328,7 +333,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ // PS1 should be set but no PS1 was set. return; } - const config = await this.shellIntegrationService.isWorking(); + const config = await this.shellIntegrationDetectionService.isWorking(); if (!config) { traceVerbose('PS1 is not set when shell integration is disabled.'); return; @@ -395,7 +400,7 @@ export class TerminalEnvVarCollectionService implements IExtensionActivationServ } private async getPrependOptions(): Promise { - const isActive = await this.shellIntegrationService.isWorking(); + const isActive = await this.shellIntegrationDetectionService.isWorking(); // Ideally we would want to prepend exactly once, either at shell integration or process creation. // TODO: Stop prepending altogether once https://github.com/microsoft/vscode/issues/145234 is available. return isActive diff --git a/src/client/terminals/envCollectionActivation/shellIntegrationService.ts b/src/client/terminals/envCollectionActivation/shellIntegrationService.ts index 8ab3d84122b7..71cfb18dd437 100644 --- a/src/client/terminals/envCollectionActivation/shellIntegrationService.ts +++ b/src/client/terminals/envCollectionActivation/shellIntegrationService.ts @@ -14,7 +14,7 @@ import { TerminalShellType } from '../../common/terminal/types'; import { IDisposableRegistry, IPersistentStateFactory } from '../../common/types'; import { sleep } from '../../common/utils/async'; import { traceError, traceVerbose } from '../../logging'; -import { IShellIntegrationService } from '../types'; +import { IShellIntegrationDetectionService } from '../types'; /** * This is a list of shells which support shell integration: @@ -33,7 +33,7 @@ export enum isShellIntegrationWorking { } @injectable() -export class ShellIntegrationService implements IShellIntegrationService { +export class ShellIntegrationDetectionService implements IShellIntegrationDetectionService { private isWorkingForShell = new Set(); private readonly didChange = new EventEmitter(); diff --git a/src/client/terminals/pythonStartup.ts b/src/client/terminals/pythonStartup.ts new file mode 100644 index 000000000000..542a2e6a6355 --- /dev/null +++ b/src/client/terminals/pythonStartup.ts @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { ExtensionContext, Uri } from 'vscode'; +import * as path from 'path'; +import { copy, createDirectory, getConfiguration } from '../common/vscodeApis/workspaceApis'; +import { EXTENSION_ROOT_DIR } from '../constants'; + +export async function registerPythonStartup(context: ExtensionContext): Promise { + const config = getConfiguration('python'); + const pythonrcSetting = config.get('terminal.shellIntegration.enabled'); + + if (pythonrcSetting) { + const storageUri = context.storageUri || context.globalStorageUri; + try { + await createDirectory(storageUri); + } catch { + // already exists, most likely + } + const destPath = Uri.joinPath(storageUri, 'pythonrc.py'); + const sourcePath = path.join(EXTENSION_ROOT_DIR, 'python_files', 'pythonrc.py'); + await copy(Uri.file(sourcePath), destPath, { overwrite: true }); + context.environmentVariableCollection.replace('PYTHONSTARTUP', destPath.fsPath); + } else { + context.environmentVariableCollection.delete('PYTHONSTARTUP'); + } +} diff --git a/src/client/terminals/serviceRegistry.ts b/src/client/terminals/serviceRegistry.ts index 3474edadd744..e62701dcec0e 100644 --- a/src/client/terminals/serviceRegistry.ts +++ b/src/client/terminals/serviceRegistry.ts @@ -12,7 +12,7 @@ import { ICodeExecutionHelper, ICodeExecutionManager, ICodeExecutionService, - IShellIntegrationService, + IShellIntegrationDetectionService, ITerminalAutoActivation, ITerminalDeactivateService, ITerminalEnvVarCollectionService, @@ -20,8 +20,8 @@ import { import { TerminalEnvVarCollectionService } from './envCollectionActivation/service'; import { IExtensionActivationService, IExtensionSingleActivationService } from '../activation/types'; import { TerminalIndicatorPrompt } from './envCollectionActivation/indicatorPrompt'; -import { ShellIntegrationService } from './envCollectionActivation/shellIntegrationService'; import { TerminalDeactivateService } from './envCollectionActivation/deactivateService'; +import { ShellIntegrationDetectionService } from './envCollectionActivation/shellIntegrationService'; export function registerTypes(serviceManager: IServiceManager): void { serviceManager.addSingleton(ICodeExecutionHelper, CodeExecutionHelper); @@ -50,6 +50,10 @@ export function registerTypes(serviceManager: IServiceManager): void { IExtensionSingleActivationService, TerminalIndicatorPrompt, ); - serviceManager.addSingleton(IShellIntegrationService, ShellIntegrationService); + serviceManager.addSingleton( + IShellIntegrationDetectionService, + ShellIntegrationDetectionService, + ); + serviceManager.addBinding(ITerminalEnvVarCollectionService, IExtensionActivationService); } diff --git a/src/client/terminals/types.ts b/src/client/terminals/types.ts index 4c73da63dd1e..ada3acd851a9 100644 --- a/src/client/terminals/types.ts +++ b/src/client/terminals/types.ts @@ -42,8 +42,8 @@ export interface ITerminalEnvVarCollectionService { isTerminalPromptSetCorrectly(resource?: Resource): boolean; } -export const IShellIntegrationService = Symbol('IShellIntegrationService'); -export interface IShellIntegrationService { +export const IShellIntegrationDetectionService = Symbol('IShellIntegrationDetectionService'); +export interface IShellIntegrationDetectionService { onDidChangeStatus: Event; isWorking(): Promise; } @@ -53,3 +53,8 @@ export interface ITerminalDeactivateService { initializeScriptParams(shell: string): Promise; getScriptLocation(shell: string, resource: Resource): Promise; } + +export const IPythonStartupEnvVarService = Symbol('IPythonStartupEnvVarService'); +export interface IPythonStartupEnvVarService { + register(): void; +} diff --git a/src/client/testing/common/types.ts b/src/client/testing/common/types.ts index 29a6de7768cb..67a9a44a5706 100644 --- a/src/client/testing/common/types.ts +++ b/src/client/testing/common/types.ts @@ -61,6 +61,7 @@ export interface ITestsHelper { export const ITestConfigurationService = Symbol('ITestConfigurationService'); export interface ITestConfigurationService { + hasConfiguredTests(wkspace: Uri): boolean; displayTestFrameworkError(wkspace: Uri): Promise; selectTestRunner(placeHolderMessage: string): Promise; enableTest(wkspace: Uri, product: UnitTestProduct): Promise; diff --git a/src/client/testing/configuration/index.ts b/src/client/testing/configuration/index.ts index e85154e72738..4825e9aa4f6a 100644 --- a/src/client/testing/configuration/index.ts +++ b/src/client/testing/configuration/index.ts @@ -35,6 +35,11 @@ export class UnitTestConfigurationService implements ITestConfigurationService { this.workspaceService = serviceContainer.get(IWorkspaceService); } + public hasConfiguredTests(wkspace: Uri): boolean { + const settings = this.configurationService.getSettings(wkspace); + return settings.testing.pytestEnabled || settings.testing.unittestEnabled || false; + } + public async displayTestFrameworkError(wkspace: Uri): Promise { const settings = this.configurationService.getSettings(wkspace); let enabledCount = settings.testing.pytestEnabled ? 1 : 0; diff --git a/src/client/testing/main.ts b/src/client/testing/main.ts index deebf2b34c06..c2675ed4a72b 100644 --- a/src/client/testing/main.ts +++ b/src/client/testing/main.ts @@ -1,7 +1,7 @@ 'use strict'; import { inject, injectable } from 'inversify'; -import { ConfigurationChangeEvent, Disposable, Uri, tests, TestResultState, WorkspaceFolder } from 'vscode'; +import { ConfigurationChangeEvent, Disposable, Uri, tests, TestResultState, WorkspaceFolder, Command } from 'vscode'; import { IApplicationShell, ICommandManager, IContextKeyManager, IWorkspaceService } from '../common/application/types'; import * as constants from '../common/constants'; import '../common/extensions'; @@ -170,6 +170,31 @@ export class UnitTestManagementService implements IExtensionActivationService { this.testController?.refreshTestData(resource, { forceRefresh: true }); }, ), + commandManager.registerCommand(constants.Commands.Tests_CopilotSetup, (resource?: Uri): + | { message: string; command: Command } + | undefined => { + const wkspaceFolder = + this.workspaceService.getWorkspaceFolder(resource) || this.workspaceService.workspaceFolders?.at(0); + if (!wkspaceFolder) { + return undefined; + } + + const configurationService = this.serviceContainer.get( + ITestConfigurationService, + ); + if (configurationService.hasConfiguredTests(wkspaceFolder.uri)) { + return undefined; + } + + return { + message: Testing.copilotSetupMessage, + command: { + title: Testing.configureTests, + command: constants.Commands.Tests_Configure, + arguments: [undefined, constants.CommandSource.ui, resource], + }, + }; + }), ); } diff --git a/src/client/testing/testController/common/resultResolver.ts b/src/client/testing/testController/common/resultResolver.ts index 16ee79371b37..54a21a712133 100644 --- a/src/client/testing/testController/common/resultResolver.ts +++ b/src/client/testing/testController/common/resultResolver.ts @@ -10,9 +10,20 @@ import { Location, TestRun, MarkdownString, + TestCoverageCount, + FileCoverage, + FileCoverageDetail, + StatementCoverage, + Range, } from 'vscode'; import * as util from 'util'; -import { DiscoveredTestPayload, EOTTestPayload, ExecutionTestPayload, ITestResultResolver } from './types'; +import { + CoveragePayload, + DiscoveredTestPayload, + EOTTestPayload, + ExecutionTestPayload, + ITestResultResolver, +} from './types'; import { TestProvider } from '../../types'; import { traceError, traceVerbose } from '../../../logging'; import { Testing } from '../../../common/utils/localize'; @@ -36,6 +47,8 @@ export class PythonResultResolver implements ITestResultResolver { public subTestStats: Map = new Map(); + public detailedCoverageMap = new Map(); + constructor(testController: TestController, testProvider: TestProvider, private workspaceUri: Uri) { this.testController = testController; this.testProvider = testProvider; @@ -105,7 +118,7 @@ export class PythonResultResolver implements ITestResultResolver { } public resolveExecution( - payload: ExecutionTestPayload | EOTTestPayload, + payload: ExecutionTestPayload | EOTTestPayload | CoveragePayload, runInstance: TestRun, deferredTillEOT: Deferred, ): void { @@ -113,9 +126,71 @@ export class PythonResultResolver implements ITestResultResolver { // eot sent once per connection traceVerbose('EOT received, resolving deferredTillServerClose'); deferredTillEOT.resolve(); + } else if ('coverage' in payload) { + // coverage data is sent once per connection + traceVerbose('Coverage data received.'); + this._resolveCoverage(payload as CoveragePayload, runInstance); } else { this._resolveExecution(payload as ExecutionTestPayload, runInstance); } + if ('coverage' in payload) { + // coverage data is sent once per connection + traceVerbose('Coverage data received.'); + this._resolveCoverage(payload as CoveragePayload, runInstance); + } + } + + public _resolveCoverage(payload: CoveragePayload, runInstance: TestRun): void { + if (payload.result === undefined) { + return; + } + for (const [key, value] of Object.entries(payload.result)) { + const fileNameStr = key; + const fileCoverageMetrics = value; + const linesCovered = fileCoverageMetrics.lines_covered ? fileCoverageMetrics.lines_covered : []; // undefined if no lines covered + const linesMissed = fileCoverageMetrics.lines_missed ? fileCoverageMetrics.lines_missed : []; // undefined if no lines missed + const executedBranches = fileCoverageMetrics.executed_branches; + const totalBranches = fileCoverageMetrics.total_branches; + + const lineCoverageCount = new TestCoverageCount( + linesCovered.length, + linesCovered.length + linesMissed.length, + ); + const uri = Uri.file(fileNameStr); + let fileCoverage: FileCoverage; + if (totalBranches === -1) { + // branch coverage was not enabled and should not be displayed + fileCoverage = new FileCoverage(uri, lineCoverageCount); + } else { + const branchCoverageCount = new TestCoverageCount(executedBranches, totalBranches); + fileCoverage = new FileCoverage(uri, lineCoverageCount, branchCoverageCount); + } + runInstance.addCoverage(fileCoverage); + + // create detailed coverage array for each file (only line coverage on detailed, not branch) + const detailedCoverageArray: FileCoverageDetail[] = []; + // go through all covered lines, create new StatementCoverage, and add to detailedCoverageArray + for (const line of linesCovered) { + // line is 1-indexed, so we need to subtract 1 to get the 0-indexed line number + // true value means line is covered + const statementCoverage = new StatementCoverage( + true, + new Range(line - 1, 0, line - 1, Number.MAX_SAFE_INTEGER), + ); + detailedCoverageArray.push(statementCoverage); + } + for (const line of linesMissed) { + // line is 1-indexed, so we need to subtract 1 to get the 0-indexed line number + // false value means line is NOT covered + const statementCoverage = new StatementCoverage( + false, + new Range(line - 1, 0, line - 1, Number.MAX_SAFE_INTEGER), + ); + detailedCoverageArray.push(statementCoverage); + } + + this.detailedCoverageMap.set(fileNameStr, detailedCoverageArray); + } } public _resolveExecution(payload: ExecutionTestPayload, runInstance: TestRun): void { diff --git a/src/client/testing/testController/common/resultsHelper.ts b/src/client/testing/testController/common/resultsHelper.ts index 2fce78919766..6474c726e09c 100644 --- a/src/client/testing/testController/common/resultsHelper.ts +++ b/src/client/testing/testController/common/resultsHelper.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import { Location, TestItem, TestMessage, TestRun } from 'vscode'; +import * as fsapi from '../../../common/platform/fs-paths'; import { getRunIdFromRawData, getTestCaseNodes } from './testItemUtilities'; import { TestData } from './types'; import { fixLogLines } from './utils'; diff --git a/src/client/testing/testController/common/types.ts b/src/client/testing/testController/common/types.ts index 319898f3189a..7846461a46a9 100644 --- a/src/client/testing/testController/common/types.ts +++ b/src/client/testing/testController/common/types.ts @@ -4,6 +4,7 @@ import { CancellationToken, Event, + FileCoverageDetail, OutputChannel, TestController, TestItem, @@ -150,7 +151,7 @@ export type TestCommandOptions = { command: TestDiscoveryCommand | TestExecutionCommand; token?: CancellationToken; outChannel?: OutputChannel; - debugBool?: boolean; + profileKind?: TestRunProfileKind; testIds?: string[]; }; @@ -195,18 +196,21 @@ export interface ITestResultResolver { runIdToVSid: Map; runIdToTestItem: Map; vsIdToRunId: Map; + detailedCoverageMap: Map; + resolveDiscovery( payload: DiscoveredTestPayload | EOTTestPayload, deferredTillEOT: Deferred, token?: CancellationToken, ): void; resolveExecution( - payload: ExecutionTestPayload | EOTTestPayload, + payload: ExecutionTestPayload | EOTTestPayload | CoveragePayload, runInstance: TestRun, deferredTillEOT: Deferred, ): void; _resolveDiscovery(payload: DiscoveredTestPayload, token?: CancellationToken): void; _resolveExecution(payload: ExecutionTestPayload, runInstance: TestRun): void; + _resolveCoverage(payload: CoveragePayload, runInstance: TestRun): void; } export interface ITestDiscoveryAdapter { // ** first line old method signature, second line new method signature @@ -217,11 +221,11 @@ export interface ITestDiscoveryAdapter { // interface for execution/runner adapter export interface ITestExecutionAdapter { // ** first line old method signature, second line new method signature - runTests(uri: Uri, testIds: string[], debugBool?: boolean): Promise; + runTests(uri: Uri, testIds: string[], profileKind?: boolean | TestRunProfileKind): Promise; runTests( uri: Uri, testIds: string[], - debugBool?: boolean, + profileKind?: boolean | TestRunProfileKind, runInstance?: TestRun, executionFactory?: IPythonExecutionFactory, debugLauncher?: ITestDebugLauncher, @@ -260,6 +264,27 @@ export type EOTTestPayload = { eot: boolean; }; +export type CoveragePayload = { + coverage: boolean; + cwd: string; + result?: { + [filePathStr: string]: FileCoverageMetrics; + }; + error: string; +}; + +// using camel-case for these types to match the python side +export type FileCoverageMetrics = { + // eslint-disable-next-line camelcase + lines_covered: number[]; + // eslint-disable-next-line camelcase + lines_missed: number[]; + // eslint-disable-next-line camelcase + executed_branches: number; + // eslint-disable-next-line camelcase + total_branches: number; +}; + export type ExecutionTestPayload = { cwd: string; status: 'success' | 'error'; diff --git a/src/client/testing/testController/common/utils.ts b/src/client/testing/testController/common/utils.ts index 759fb0713de4..cf82a2ebd1c1 100644 --- a/src/client/testing/testController/common/utils.ts +++ b/src/client/testing/testController/common/utils.ts @@ -3,6 +3,8 @@ import * as net from 'net'; import * as path from 'path'; import * as fs from 'fs'; +import * as os from 'os'; +import * as crypto from 'crypto'; import { CancellationToken, Position, TestController, TestItem, Uri, Range, Disposable } from 'vscode'; import { Message } from 'vscode-jsonrpc'; import { traceError, traceInfo, traceLog, traceVerbose } from '../../../logging'; @@ -20,6 +22,7 @@ import { } from './types'; import { Deferred, createDeferred } from '../../../common/utils/async'; import { createNamedPipeServer, generateRandomPipeName } from '../../../common/pipes/namedPipes'; +import { EXTENSION_ROOT_DIR } from '../../../constants'; export function fixLogLines(content: string): string { const lines = content.split(/\r?\n/g); @@ -193,6 +196,36 @@ interface ExecutionResultMessage extends Message { params: ExecutionTestPayload | EOTTestPayload; } +/** + * Writes an array of test IDs to a temporary file. + * + * @param testIds - The array of test IDs to write. + * @returns A promise that resolves to the file name of the temporary file. + */ +export async function writeTestIdsFile(testIds: string[]): Promise { + // temp file name in format of test-ids-.txt + const randomSuffix = crypto.randomBytes(10).toString('hex'); + const tempName = `test-ids-${randomSuffix}.txt`; + // create temp file + let tempFileName: string; + try { + traceLog('Attempting to use temp directory for test ids file, file name:', tempName); + tempFileName = path.join(os.tmpdir(), tempName); + } catch (error) { + // Handle the error when accessing the temp directory + traceError('Error accessing temp directory:', error, ' Attempt to use extension root dir instead'); + // Make new temp directory in extension root dir + const tempDir = path.join(EXTENSION_ROOT_DIR, '.temp'); + await fs.promises.mkdir(tempDir, { recursive: true }); + tempFileName = path.join(EXTENSION_ROOT_DIR, '.temp', tempName); + traceLog('New temp file:', tempFileName); + } + // write test ids to file + await fs.promises.writeFile(tempFileName, testIds.join('\n')); + // return file name + return tempFileName; +} + export async function startRunResultNamedPipe( dataReceivedCallback: (payload: ExecutionTestPayload | EOTTestPayload) => void, deferredTillServerClose: Deferred, diff --git a/src/client/testing/testController/controller.ts b/src/client/testing/testController/controller.ts index 58edfb059666..dd624078a534 100644 --- a/src/client/testing/testController/controller.ts +++ b/src/client/testing/testController/controller.ts @@ -16,6 +16,8 @@ import { Uri, EventEmitter, TextDocument, + FileCoverageDetail, + TestRun, } from 'vscode'; import { IExtensionSingleActivationService } from '../../activation/types'; import { ICommandManager, IWorkspaceService } from '../../common/application/types'; @@ -38,7 +40,6 @@ import { ITestFrameworkController, TestRefreshOptions, ITestExecutionAdapter, - ITestResultResolver, } from './common/types'; import { UnittestTestDiscoveryAdapter } from './unittest/testDiscoveryAdapter'; import { UnittestTestExecutionAdapter } from './unittest/testExecutionAdapter'; @@ -118,6 +119,14 @@ export class PythonTestController implements ITestController, IExtensionSingleAc this.disposables.push(delayTrigger); this.refreshData = delayTrigger; + const coverageProfile = this.testController.createRunProfile( + 'Coverage Tests', + TestRunProfileKind.Coverage, + this.runTests.bind(this), + true, + RunTestTag, + ); + this.disposables.push( this.testController.createRunProfile( 'Run Tests', @@ -133,6 +142,7 @@ export class PythonTestController implements ITestController, IExtensionSingleAc true, DebugTestTag, ), + coverageProfile, ); this.testController.resolveHandler = this.resolveChildren.bind(this); this.testController.refreshHandler = (token: CancellationToken) => { @@ -160,7 +170,8 @@ export class PythonTestController implements ITestController, IExtensionSingleAc let discoveryAdapter: ITestDiscoveryAdapter; let executionAdapter: ITestExecutionAdapter; let testProvider: TestProvider; - let resultResolver: ITestResultResolver; + let resultResolver: PythonResultResolver; + if (settings.testing.unittestEnabled) { testProvider = UNITTEST_PROVIDER; resultResolver = new PythonResultResolver(this.testController, testProvider, workspace.uri); @@ -384,6 +395,7 @@ export class PythonTestController implements ITestController, IExtensionSingleAc }); const unconfiguredWorkspaces: WorkspaceFolder[] = []; + try { await Promise.all( workspaces.map(async (workspace) => { @@ -406,6 +418,28 @@ export class PythonTestController implements ITestController, IExtensionSingleAc const settings = this.configSettings.getSettings(workspace.uri); if (testItems.length > 0) { + // coverage?? + const testAdapter = + this.testAdapters.get(workspace.uri) || + (this.testAdapters.values().next().value as WorkspaceTestAdapter); + + if (request.profile?.kind && request.profile?.kind === TestRunProfileKind.Coverage) { + request.profile.loadDetailedCoverage = ( + _testRun: TestRun, + fileCoverage, + _token, + ): Thenable => { + const details = testAdapter.resultResolver.detailedCoverageMap.get( + fileCoverage.uri.fsPath, + ); + if (details === undefined) { + // given file has no detailed coverage data + return Promise.resolve([]); + } + return Promise.resolve(details); + }; + } + if (settings.testing.pytestEnabled) { sendTelemetryEvent(EventName.UNITTEST_RUN, undefined, { tool: 'pytest', @@ -413,15 +447,12 @@ export class PythonTestController implements ITestController, IExtensionSingleAc }); // ** experiment to roll out NEW test discovery mechanism if (pythonTestAdapterRewriteEnabled(this.serviceContainer)) { - const testAdapter = - this.testAdapters.get(workspace.uri) || - (this.testAdapters.values().next().value as WorkspaceTestAdapter); return testAdapter.executeTests( this.testController, runInstance, testItems, token, - request.profile?.kind === TestRunProfileKind.Debug, + request.profile?.kind, this.pythonExecFactory, this.debugLauncher, ); @@ -444,15 +475,12 @@ export class PythonTestController implements ITestController, IExtensionSingleAc }); // ** experiment to roll out NEW test discovery mechanism if (pythonTestAdapterRewriteEnabled(this.serviceContainer)) { - const testAdapter = - this.testAdapters.get(workspace.uri) || - (this.testAdapters.values().next().value as WorkspaceTestAdapter); return testAdapter.executeTests( this.testController, runInstance, testItems, token, - request.profile?.kind === TestRunProfileKind.Debug, + request.profile?.kind, this.pythonExecFactory, this.debugLauncher, ); diff --git a/src/client/testing/testController/pytest/pytestExecutionAdapter.ts b/src/client/testing/testController/pytest/pytestExecutionAdapter.ts index 5099efde179c..bfaaab9d6586 100644 --- a/src/client/testing/testController/pytest/pytestExecutionAdapter.ts +++ b/src/client/testing/testController/pytest/pytestExecutionAdapter.ts @@ -1,13 +1,19 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { TestRun, Uri } from 'vscode'; +import { TestRun, TestRunProfileKind, Uri } from 'vscode'; import * as path from 'path'; import { ChildProcess } from 'child_process'; import { IConfigurationService, ITestOutputChannel } from '../../../common/types'; import { Deferred } from '../../../common/utils/async'; import { traceError, traceInfo, traceVerbose } from '../../../logging'; -import { EOTTestPayload, ExecutionTestPayload, ITestExecutionAdapter, ITestResultResolver } from '../common/types'; +import { + CoveragePayload, + EOTTestPayload, + ExecutionTestPayload, + ITestExecutionAdapter, + ITestResultResolver, +} from '../common/types'; import { ExecutionFactoryCreateWithEnvironmentOptions, IPythonExecutionFactory, @@ -31,7 +37,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { async runTests( uri: Uri, testIds: string[], - debugBool?: boolean, + profileKind?: TestRunProfileKind, runInstance?: TestRun, executionFactory?: IPythonExecutionFactory, debugLauncher?: ITestDebugLauncher, @@ -41,7 +47,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { const deferredTillServerClose: Deferred = utils.createTestingDeferred(); // create callback to handle data received on the named pipe - const dataReceivedCallback = (data: ExecutionTestPayload | EOTTestPayload) => { + const dataReceivedCallback = (data: ExecutionTestPayload | EOTTestPayload | CoveragePayload) => { if (runInstance && !runInstance.token.isCancellationRequested) { this.resultResolver?.resolveExecution(data, runInstance, deferredTillEOT); } else { @@ -75,7 +81,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { deferredTillEOT, serverDispose, runInstance, - debugBool, + profileKind, executionFactory, debugLauncher, ); @@ -102,7 +108,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { deferredTillEOT: Deferred, serverDispose: () => void, runInstance?: TestRun, - debugBool?: boolean, + profileKind?: TestRunProfileKind, executionFactory?: IPythonExecutionFactory, debugLauncher?: ITestDebugLauncher, ): Promise { @@ -120,6 +126,10 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { const pythonPathCommand = [fullPluginPath, ...pythonPathParts].join(path.delimiter); mutableEnv.PYTHONPATH = pythonPathCommand; mutableEnv.TEST_RUN_PIPE = resultNamedPipeName; + if (profileKind && profileKind === TestRunProfileKind.Coverage) { + mutableEnv.COVERAGE_ENABLED = 'True'; + } + const debugBool = profileKind && profileKind === TestRunProfileKind.Debug; // Create the Python environment in which to execute the command. const creationOptions: ExecutionFactoryCreateWithEnvironmentOptions = { @@ -142,9 +152,9 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { testArgs = utils.addValueIfKeyNotExist(testArgs, '--capture', 'no'); } - // add port with run test ids to env vars - const testIdsPipeName = await utils.startTestIdsNamedPipe(testIds); - mutableEnv.RUN_TEST_IDS_PIPE = testIdsPipeName; + // create a file with the test ids and set the environment variable to the file name + const testIdsFileName = await utils.writeTestIdsFile(testIds); + mutableEnv.RUN_TEST_IDS_PIPE = testIdsFileName; traceInfo(`All environment variables set for pytest execution: ${JSON.stringify(mutableEnv)}`); const spawnOptions: SpawnOptions = { @@ -162,7 +172,7 @@ export class PytestTestExecutionAdapter implements ITestExecutionAdapter { args: testArgs, token: runInstance?.token, testProvider: PYTEST_PROVIDER, - runTestIdsPort: testIdsPipeName, + runTestIdsPort: testIdsFileName, pytestPort: resultNamedPipeName, }; traceInfo(`Running DEBUG pytest with arguments: ${testArgs} for workspace ${uri.fsPath} \r\n`); diff --git a/src/client/testing/testController/unittest/testExecutionAdapter.ts b/src/client/testing/testController/unittest/testExecutionAdapter.ts index 4746c3101752..8e5277fe68d9 100644 --- a/src/client/testing/testController/unittest/testExecutionAdapter.ts +++ b/src/client/testing/testController/unittest/testExecutionAdapter.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as path from 'path'; -import { TestRun, Uri } from 'vscode'; +import { TestRun, TestRunProfileKind, Uri } from 'vscode'; import { ChildProcess } from 'child_process'; import { IConfigurationService, ITestOutputChannel } from '../../../common/types'; import { Deferred, createDeferred } from '../../../common/utils/async'; @@ -43,7 +43,7 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter { public async runTests( uri: Uri, testIds: string[], - debugBool?: boolean, + profileKind?: TestRunProfileKind, runInstance?: TestRun, executionFactory?: IPythonExecutionFactory, debugLauncher?: ITestDebugLauncher, @@ -81,7 +81,7 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter { deferredTillEOT, serverDispose, runInstance, - debugBool, + profileKind, executionFactory, debugLauncher, ); @@ -107,7 +107,7 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter { deferredTillEOT: Deferred, serverDispose: () => void, runInstance?: TestRun, - debugBool?: boolean, + profileKind?: TestRunProfileKind, executionFactory?: IPythonExecutionFactory, debugLauncher?: ITestDebugLauncher, ): Promise { @@ -124,12 +124,15 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter { const pythonPathCommand = [cwd, ...pythonPathParts].join(path.delimiter); mutableEnv.PYTHONPATH = pythonPathCommand; mutableEnv.TEST_RUN_PIPE = resultNamedPipeName; + if (profileKind && profileKind === TestRunProfileKind.Coverage) { + mutableEnv.COVERAGE_ENABLED = cwd; + } const options: TestCommandOptions = { workspaceFolder: uri, command, cwd, - debugBool, + profileKind, testIds, outChannel: this.outputChannel, token: runInstance?.token, @@ -137,8 +140,8 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter { traceLog(`Running UNITTEST execution for the following test ids: ${testIds}`); // create named pipe server to send test ids - const testIdsPipeName = await utils.startTestIdsNamedPipe(testIds); - mutableEnv.RUN_TEST_IDS_PIPE = testIdsPipeName; + const testIdsFileName = await utils.writeTestIdsFile(testIds); + mutableEnv.RUN_TEST_IDS_PIPE = testIdsFileName; traceInfo(`All environment variables set for pytest execution: ${JSON.stringify(mutableEnv)}`); const spawnOptions: SpawnOptions = { @@ -161,13 +164,13 @@ export class UnittestTestExecutionAdapter implements ITestExecutionAdapter { } try { - if (options.debugBool) { + if (options.profileKind && options.profileKind === TestRunProfileKind.Debug) { const launchOptions: LaunchOptions = { cwd: options.cwd, args, token: options.token, testProvider: UNITTEST_PROVIDER, - runTestIdsPort: testIdsPipeName, + runTestIdsPort: testIdsFileName, pytestPort: resultNamedPipeName, // change this from pytest }; traceInfo(`Running DEBUG unittest for workspace ${options.cwd} with arguments: ${args}\r\n`); diff --git a/src/client/testing/testController/workspaceTestAdapter.ts b/src/client/testing/testController/workspaceTestAdapter.ts index 5fe69dfe3d69..a0e65cfb5061 100644 --- a/src/client/testing/testController/workspaceTestAdapter.ts +++ b/src/client/testing/testController/workspaceTestAdapter.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import * as util from 'util'; -import { CancellationToken, TestController, TestItem, TestRun, Uri } from 'vscode'; +import { CancellationToken, TestController, TestItem, TestRun, TestRunProfileKind, Uri } from 'vscode'; import { createDeferred, Deferred } from '../../common/utils/async'; import { Testing } from '../../common/utils/localize'; import { traceError } from '../../logging'; @@ -34,7 +34,7 @@ export class WorkspaceTestAdapter { private discoveryAdapter: ITestDiscoveryAdapter, private executionAdapter: ITestExecutionAdapter, private workspaceUri: Uri, - private resultResolver: ITestResultResolver, + public resultResolver: ITestResultResolver, ) {} public async executeTests( @@ -42,7 +42,7 @@ export class WorkspaceTestAdapter { runInstance: TestRun, includes: TestItem[], token?: CancellationToken, - debugBool?: boolean, + profileKind?: boolean | TestRunProfileKind, executionFactory?: IPythonExecutionFactory, debugLauncher?: ITestDebugLauncher, ): Promise { @@ -76,13 +76,13 @@ export class WorkspaceTestAdapter { await this.executionAdapter.runTests( this.workspaceUri, testCaseIds, - debugBool, + profileKind, runInstance, executionFactory, debugLauncher, ); } else { - await this.executionAdapter.runTests(this.workspaceUri, testCaseIds, debugBool); + await this.executionAdapter.runTests(this.workspaceUri, testCaseIds, profileKind); } deferred.resolve(); } catch (ex) { diff --git a/src/test/.vscode/settings.json b/src/test/.vscode/settings.json index faeb48ffa29c..cd2b4152591d 100644 --- a/src/test/.vscode/settings.json +++ b/src/test/.vscode/settings.json @@ -13,5 +13,6 @@ "python.linting.banditEnabled": false, // Don't set this to `Pylance`, for CI we want to use the LS that ships with the extension. "python.languageServer": "Jedi", - "python.pythonPath": "C:\\GIT\\s p\\vscode-python\\.venv\\Scripts\\python.exe" + "python.pythonPath": "C:\\GIT\\s p\\vscode-python\\.venv\\Scripts\\python.exe", + "python.defaultInterpreterPath": "python" } diff --git a/src/test/common.ts b/src/test/common.ts index bbf48f0e14c7..8c2512959bdf 100644 --- a/src/test/common.ts +++ b/src/test/common.ts @@ -5,7 +5,7 @@ // IMPORTANT: Do not import anything from the 'client' folder in this file as that folder is not available during smoke tests. import * as assert from 'assert'; -import * as fs from 'fs-extra'; +import * as fs from '../client/common/platform/fs-paths'; import * as glob from 'glob'; import * as path from 'path'; import { coerce, SemVer } from 'semver'; @@ -50,7 +50,7 @@ export type PythonSettingKeys = async function disposePythonSettings() { if (!IS_SMOKE_TEST) { - const configSettings = await import('../client/common/configSettings'); + const configSettings = await import('../client/common/configSettings.js'); configSettings.PythonSettings.dispose(); } } @@ -224,7 +224,7 @@ export async function deleteFile(file: string) { export async function deleteFiles(globPattern: string) { const items = await new Promise((resolve, reject) => { - glob(globPattern, (ex, files) => (ex ? reject(ex) : resolve(files))); + glob.default(globPattern, (ex, files) => (ex ? reject(ex) : resolve(files))); }); return Promise.all(items.map((item) => fs.remove(item).catch(noop))); @@ -292,7 +292,7 @@ export function correctPathForOsType(pathToCorrect: string, os?: OSType): string * @return `SemVer` version of the Python interpreter, or `undefined` if an error occurs. */ export async function getPythonSemVer(procService?: IProcessService): Promise { - const proc = await import('../client/common/process/proc'); + const proc = await import('../client/common/process/proc.js'); const pythonProcRunner = procService ? procService : new proc.ProcessService(); const pyVerArgs = ['-c', 'import sys;print("{0}.{1}.{2}".format(*sys.version_info[:3]))']; @@ -508,7 +508,7 @@ export async function openFile(file: string): Promise { const vscode = require('vscode') as typeof import('vscode'); const textDocument = await vscode.workspace.openTextDocument(file); await vscode.window.showTextDocument(textDocument); - assert(vscode.window.activeTextEditor, 'No active editor'); + assert.ok(vscode.window.activeTextEditor, 'No active editor'); return textDocument; } diff --git a/src/test/common/application/commands/reportIssueCommand.unit.test.ts b/src/test/common/application/commands/reportIssueCommand.unit.test.ts index 2a35a6306cd2..50701ecdf4c6 100644 --- a/src/test/common/application/commands/reportIssueCommand.unit.test.ts +++ b/src/test/common/application/commands/reportIssueCommand.unit.test.ts @@ -5,11 +5,11 @@ 'use strict'; import * as sinon from 'sinon'; -import * as fs from 'fs-extra'; import * as path from 'path'; import { anything, capture, instance, mock, verify, when } from 'ts-mockito'; import { expect } from 'chai'; import { WorkspaceFolder } from 'vscode-languageserver-protocol'; +import * as fs from '../../../../client/common/platform/fs-paths'; import * as Telemetry from '../../../../client/telemetry'; import { LanguageServerType } from '../../../../client/activation/types'; import { CommandManager } from '../../../../client/common/application/commandManager'; diff --git a/src/test/common/configSettings/configSettings.pythonPath.unit.test.ts b/src/test/common/configSettings/configSettings.pythonPath.unit.test.ts index b59ee34877a7..29082bb5854f 100644 --- a/src/test/common/configSettings/configSettings.pythonPath.unit.test.ts +++ b/src/test/common/configSettings/configSettings.pythonPath.unit.test.ts @@ -16,8 +16,7 @@ import { noop } from '../../../client/common/utils/misc'; import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; import * as EnvFileTelemetry from '../../../client/telemetry/envFileTelemetry'; import { MockAutoSelectionService } from '../../mocks/autoSelector'; - -const untildify = require('untildify'); +import { untildify } from '../../../client/common/helpers'; suite('Python Settings - pythonPath', () => { class CustomPythonSettings extends PythonSettings { diff --git a/src/test/common/configSettings/configSettings.unit.test.ts b/src/test/common/configSettings/configSettings.unit.test.ts index c4389629e0ec..43fbf17e970e 100644 --- a/src/test/common/configSettings/configSettings.unit.test.ts +++ b/src/test/common/configSettings/configSettings.unit.test.ts @@ -8,7 +8,6 @@ import * as path from 'path'; import * as sinon from 'sinon'; import * as TypeMoq from 'typemoq'; -import untildify = require('untildify'); import { WorkspaceConfiguration } from 'vscode'; import { LanguageServerType } from '../../../client/activation/types'; import { IApplicationEnvironment } from '../../../client/common/application/types'; @@ -27,6 +26,7 @@ import * as EnvFileTelemetry from '../../../client/telemetry/envFileTelemetry'; import { ITestingSettings } from '../../../client/testing/configuration/types'; import { MockAutoSelectionService } from '../../mocks/autoSelector'; import { MockMemento } from '../../mocks/mementos'; +import { untildify } from '../../../client/common/helpers'; suite('Python Settings', async () => { class CustomPythonSettings extends PythonSettings { diff --git a/src/test/common/exitCIAfterTestReporter.ts b/src/test/common/exitCIAfterTestReporter.ts index a2350f26a943..cb04d3a90b38 100644 --- a/src/test/common/exitCIAfterTestReporter.ts +++ b/src/test/common/exitCIAfterTestReporter.ts @@ -7,7 +7,8 @@ // This is a hack, however for some reason the process running the tests do not exit. // The hack is to force it to die when tests are done, if this doesn't work we've got a bigger problem on our hands. -import * as fs from 'fs-extra'; +import * as fs from '../../client/common/platform/fs-paths'; + import * as net from 'net'; import * as path from 'path'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../constants'; diff --git a/src/test/common/moduleInstaller.test.ts b/src/test/common/moduleInstaller.test.ts index 6d1d153aba94..0b900b97c4c0 100644 --- a/src/test/common/moduleInstaller.test.ts +++ b/src/test/common/moduleInstaller.test.ts @@ -1,7 +1,7 @@ import { expect, should as chaiShould, use as chaiUse } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import { SemVer } from 'semver'; -import { instance, mock, when } from 'ts-mockito'; +import { instance, mock } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; import { Uri } from 'vscode'; import { IExtensionSingleActivationService } from '../../client/activation/types'; @@ -101,8 +101,9 @@ import { MockModuleInstaller } from '../mocks/moduleInstaller'; import { MockProcessService } from '../mocks/proc'; import { UnitTestIocContainer } from '../testing/serviceRegistry'; import { closeActiveWindows, initializeTest } from '../initialize'; +import { createTypeMoq } from '../mocks/helper'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); const info: PythonEnvironment = { architecture: Architecture.Unknown, @@ -149,8 +150,8 @@ suite('Module Installer', () => { ioc.serviceManager.addSingleton(IProcessLogger, ProcessLogger); ioc.serviceManager.addSingleton(IInstaller, ProductInstaller); - mockTerminalService = TypeMoq.Mock.ofType(); - mockTerminalFactory = TypeMoq.Mock.ofType(); + mockTerminalService = createTypeMoq(); + mockTerminalFactory = createTypeMoq(); // If resource is provided, then ensure we do not invoke without the resource. mockTerminalFactory .setup((t) => t.getTerminalService(TypeMoq.It.isAny())) @@ -160,11 +161,13 @@ suite('Module Installer', () => { ITerminalServiceFactory, mockTerminalFactory.object, ); - const activatedEnvironmentLaunch = mock(); - when(activatedEnvironmentLaunch.selectIfLaunchedViaActivatedEnv()).thenResolve(undefined); + const activatedEnvironmentLaunch = createTypeMoq(); + activatedEnvironmentLaunch + .setup((t) => t.selectIfLaunchedViaActivatedEnv()) + .returns(() => Promise.resolve(undefined)); ioc.serviceManager.addSingletonInstance( IActivatedEnvironmentLaunch, - instance(activatedEnvironmentLaunch), + activatedEnvironmentLaunch.object, ); ioc.serviceManager.addSingleton(IModuleInstaller, PipInstaller); ioc.serviceManager.addSingleton(IModuleInstaller, CondaInstaller); @@ -182,10 +185,10 @@ suite('Module Installer', () => { ioc.serviceManager.addSingletonInstance(IsWindows, false); await ioc.registerMockInterpreterTypes(); - condaService = TypeMoq.Mock.ofType(); - condaLocatorService = TypeMoq.Mock.ofType(); + condaService = createTypeMoq(); + condaLocatorService = createTypeMoq(); ioc.serviceManager.rebindInstance(ICondaService, condaService.object); - interpreterService = TypeMoq.Mock.ofType(); + interpreterService = createTypeMoq(); ioc.serviceManager.rebindInstance(IInterpreterService, interpreterService.object); ioc.serviceManager.addSingleton(IActiveResourceService, ActiveResourceService); @@ -267,10 +270,8 @@ suite('Module Installer', () => { new MockModuleInstaller('mock', true), ); ioc.serviceManager.addSingletonInstance(ITerminalHelper, instance(mock(TerminalHelper))); - - const processService = (await ioc.serviceContainer - .get(IProcessServiceFactory) - .create()) as MockProcessService; + const factory = ioc.serviceManager.get(IProcessServiceFactory); + const processService = (await factory.create()) as MockProcessService; processService.onExec((file, args, _options, callback) => { if (args.length > 1 && args[0] === '-c' && args[1] === 'import pip') { callback({ stdout: '' }); @@ -321,13 +322,13 @@ suite('Module Installer', () => { await expect(pipInstaller.isSupported()).to.eventually.equal(true, 'Pip is not supported'); }); test('Ensure conda is supported', async () => { - const serviceContainer = TypeMoq.Mock.ofType(); + const serviceContainer = createTypeMoq(); - const configService = TypeMoq.Mock.ofType(); + const configService = createTypeMoq(); serviceContainer .setup((c) => c.get(TypeMoq.It.isValue(IConfigurationService))) .returns(() => configService.object); - const settings = TypeMoq.Mock.ofType(); + const settings = createTypeMoq(); const pythonPath = 'pythonABC'; settings.setup((s) => s.pythonPath).returns(() => pythonPath); configService.setup((c) => c.getSettings(TypeMoq.It.isAny())).returns(() => settings.object); @@ -347,13 +348,13 @@ suite('Module Installer', () => { await expect(condaInstaller.isSupported()).to.eventually.equal(true, 'Conda is not supported'); }); test('Ensure conda is not supported even if conda is available', async () => { - const serviceContainer = TypeMoq.Mock.ofType(); + const serviceContainer = createTypeMoq(); - const configService = TypeMoq.Mock.ofType(); + const configService = createTypeMoq(); serviceContainer .setup((c) => c.get(TypeMoq.It.isValue(IConfigurationService))) .returns(() => configService.object); - const settings = TypeMoq.Mock.ofType(); + const settings = createTypeMoq(); const pythonPath = 'pythonABC'; settings.setup((s) => s.pythonPath).returns(() => pythonPath); configService.setup((c) => c.getSettings(TypeMoq.It.isAny())).returns(() => settings.object); diff --git a/src/test/common/platform/filesystem.functional.test.ts b/src/test/common/platform/filesystem.functional.test.ts index 542af602f583..be9a369935f3 100644 --- a/src/test/common/platform/filesystem.functional.test.ts +++ b/src/test/common/platform/filesystem.functional.test.ts @@ -2,9 +2,8 @@ // Licensed under the MIT License. import { expect, use } from 'chai'; -import * as fs from 'fs-extra'; import { convertStat, FileSystem, FileSystemUtils, RawFileSystem } from '../../../client/common/platform/fileSystem'; -import { FileSystemPaths, FileSystemPathUtils } from '../../../client/common/platform/fs-paths'; +import * as fs from '../../../client/common/platform/fs-paths'; import { FileType } from '../../../client/common/platform/types'; import { createDeferred, sleep } from '../../../client/common/utils/async'; import { noop } from '../../../client/common/utils/misc'; @@ -137,7 +136,7 @@ suite('FileSystem - raw', () => { await fileSystem.appendText(filename, dataToAppend); - const actual = await fs.readFile(filename, 'utf8'); + const actual = await fs.readFile(filename, { encoding: 'utf8' }); expect(actual).to.be.equal(expected); }); @@ -148,14 +147,14 @@ suite('FileSystem - raw', () => { await fileSystem.appendText(filename, dataToAppend); - const actual = await fs.readFile(filename, 'utf8'); + const actual = await fs.readFile(filename, { encoding: 'utf8' }); expect(actual).to.be.equal(expected); }); test('creates the file if it does not already exist', async () => { await fileSystem.appendText(DOES_NOT_EXIST, 'spam'); - const actual = await fs.readFile(DOES_NOT_EXIST, 'utf8'); + const actual = await fs.readFile(DOES_NOT_EXIST, { encoding: 'utf8' }); expect(actual).to.be.equal('spam'); }); @@ -497,8 +496,8 @@ suite('FileSystem', () => { }); suite('path-related', () => { - const paths = FileSystemPaths.withDefaults(); - const pathUtils = FileSystemPathUtils.withDefaults(paths); + const paths = fs.FileSystemPaths.withDefaults(); + const pathUtils = fs.FileSystemPathUtils.withDefaults(paths); suite('directorySeparatorChar', () => { // tested fully in the FileSystemPaths tests. @@ -536,7 +535,7 @@ suite('FileSystem', () => { await fileSystem.appendFile(filename, dataToAppend); - const actual = await fs.readFile(filename, 'utf8'); + const actual = await fs.readFile(filename, { encoding: 'utf8' }); expect(actual).to.be.equal(expected); }); }); diff --git a/src/test/common/platform/filesystem.test.ts b/src/test/common/platform/filesystem.test.ts index a95b96af8d14..a1afab02d1fe 100644 --- a/src/test/common/platform/filesystem.test.ts +++ b/src/test/common/platform/filesystem.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { expect } from 'chai'; -import * as fsextra from 'fs-extra'; +import * as fsextra from '../../../client/common/platform/fs-paths'; import * as path from 'path'; import { convertStat, FileSystem, FileSystemUtils, RawFileSystem } from '../../../client/common/platform/fileSystem'; import { FileType, IFileSystem, IFileSystemUtils, IRawFileSystem } from '../../../client/common/platform/types'; diff --git a/src/test/common/platform/filesystem.unit.test.ts b/src/test/common/platform/filesystem.unit.test.ts index 8c54b0c08ab7..f012cb9fb27e 100644 --- a/src/test/common/platform/filesystem.unit.test.ts +++ b/src/test/common/platform/filesystem.unit.test.ts @@ -3,7 +3,7 @@ import { expect } from 'chai'; import * as fs from 'fs'; -import * as fsextra from 'fs-extra'; +import * as fsextra from '../../../client/common/platform/fs-paths'; import * as TypeMoq from 'typemoq'; import * as vscode from 'vscode'; import { FileSystemUtils, RawFileSystem } from '../../../client/common/platform/fileSystem'; diff --git a/src/test/common/platform/fs-temp.functional.test.ts b/src/test/common/platform/fs-temp.functional.test.ts index 9fb4fe189b96..67bca3338e76 100644 --- a/src/test/common/platform/fs-temp.functional.test.ts +++ b/src/test/common/platform/fs-temp.functional.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { expect, use } from 'chai'; -import * as fs from 'fs-extra'; +import * as fs from '../../../client/common/platform/fs-paths'; import { TemporaryFileSystem } from '../../../client/common/platform/fs-temp'; import { TemporaryFile } from '../../../client/common/platform/types'; import { assertDoesNotExist, assertExists, FSFixture } from './utils'; diff --git a/src/test/common/platform/platformService.functional.test.ts b/src/test/common/platform/platformService.functional.test.ts index 3c2042807ab8..9f16a6ebf386 100644 --- a/src/test/common/platform/platformService.functional.test.ts +++ b/src/test/common/platform/platformService.functional.test.ts @@ -10,7 +10,7 @@ import { parse } from 'semver'; import { PlatformService } from '../../../client/common/platform/platformService'; import { OSType } from '../../../client/common/utils/platform'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('PlatformService', () => { const osType = getOSType(); diff --git a/src/test/common/platform/utils.ts b/src/test/common/platform/utils.ts index cc30ad84b8b9..881e3cd019b9 100644 --- a/src/test/common/platform/utils.ts +++ b/src/test/common/platform/utils.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { expect } from 'chai'; -import * as fsextra from 'fs-extra'; +import * as fsextra from '../../../client/common/platform/fs-paths'; import * as net from 'net'; import * as path from 'path'; import * as tmpMod from 'tmp'; diff --git a/src/test/common/process/logger.unit.test.ts b/src/test/common/process/logger.unit.test.ts index ebce120b7e6c..f1421ea58b85 100644 --- a/src/test/common/process/logger.unit.test.ts +++ b/src/test/common/process/logger.unit.test.ts @@ -7,19 +7,19 @@ import * as path from 'path'; import * as sinon from 'sinon'; import * as TypeMoq from 'typemoq'; -import untildify = require('untildify'); import { WorkspaceFolder } from 'vscode'; import { IWorkspaceService } from '../../../client/common/application/types'; import { ProcessLogger } from '../../../client/common/process/logger'; import { getOSType, OSType } from '../../../client/common/utils/platform'; import * as logging from '../../../client/logging'; +import { untildify } from '../../../client/common/helpers'; suite('ProcessLogger suite', () => { let workspaceService: TypeMoq.IMock; let logger: ProcessLogger; let traceLogStub: sinon.SinonStub; - suiteSetup(() => { + suiteSetup(async () => { workspaceService = TypeMoq.Mock.ofType(); workspaceService .setup((w) => w.workspaceFolders) diff --git a/src/test/common/process/proc.exec.test.ts b/src/test/common/process/proc.exec.test.ts index 7e771e884b82..21351d811b63 100644 --- a/src/test/common/process/proc.exec.test.ts +++ b/src/test/common/process/proc.exec.test.ts @@ -13,7 +13,7 @@ import { isOs, isPythonVersion } from '../../common'; import { getExtensionSettings } from '../../extensionSettings'; import { initialize } from './../../initialize'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('ProcessService Observable', () => { let pythonPath: string; diff --git a/src/test/common/process/proc.observable.test.ts b/src/test/common/process/proc.observable.test.ts index 74a613f0ec1d..debae38cc6eb 100644 --- a/src/test/common/process/proc.observable.test.ts +++ b/src/test/common/process/proc.observable.test.ts @@ -10,7 +10,7 @@ import { isOs, OSType } from '../../common'; import { getExtensionSettings } from '../../extensionSettings'; import { initialize } from './../../initialize'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('ProcessService', () => { let pythonPath: string; diff --git a/src/test/common/process/pythonEnvironment.unit.test.ts b/src/test/common/process/pythonEnvironment.unit.test.ts index 49faa91e2aaf..f4b11bb97cd5 100644 --- a/src/test/common/process/pythonEnvironment.unit.test.ts +++ b/src/test/common/process/pythonEnvironment.unit.test.ts @@ -17,7 +17,7 @@ import { Architecture } from '../../../client/common/utils/platform'; import { Conda } from '../../../client/pythonEnvironments/common/environmentManagers/conda'; import { OUTPUT_MARKER_SCRIPT } from '../../../client/common/process/internal/scripts'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('PythonEnvironment', () => { let processService: TypeMoq.IMock; diff --git a/src/test/common/process/pythonProc.simple.multiroot.test.ts b/src/test/common/process/pythonProc.simple.multiroot.test.ts index 5089af8b5eb3..fc4fbf5328a9 100644 --- a/src/test/common/process/pythonProc.simple.multiroot.test.ts +++ b/src/test/common/process/pythonProc.simple.multiroot.test.ts @@ -6,9 +6,9 @@ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import { execFile } from 'child_process'; -import * as fs from 'fs-extra'; import * as path from 'path'; import { ConfigurationTarget, Uri } from 'vscode'; +import * as fs from '../../../client/common/platform/fs-paths'; import { IPythonExecutionFactory, StdErrError } from '../../../client/common/process/types'; import { IConfigurationService } from '../../../client/common/types'; import { clearCache } from '../../../client/common/utils/cacheUtils'; @@ -18,7 +18,7 @@ import { clearPythonPathInWorkspaceFolder } from '../../common'; import { getExtensionSettings } from '../../extensionSettings'; import { closeActiveWindows, initialize, initializeTest, IS_MULTI_ROOT_TEST, TEST_TIMEOUT } from '../../initialize'; -use(chaiAsPromised); +use(chaiAsPromised.default); const multirootPath = path.join(__dirname, '..', '..', '..', '..', 'src', 'testMultiRootWkspc'); const workspace4Path = Uri.file(path.join(multirootPath, 'workspace4')); diff --git a/src/test/common/process/pythonProcess.unit.test.ts b/src/test/common/process/pythonProcess.unit.test.ts index d799e08b08b5..7382fc9f9869 100644 --- a/src/test/common/process/pythonProcess.unit.test.ts +++ b/src/test/common/process/pythonProcess.unit.test.ts @@ -10,7 +10,7 @@ import { createPythonProcessService } from '../../../client/common/process/pytho import { IProcessService, StdErrError } from '../../../client/common/process/types'; import { noop } from '../../core'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('PythonProcessService', () => { let processService: TypeMoq.IMock; diff --git a/src/test/common/process/pythonToolService.unit.test.ts b/src/test/common/process/pythonToolService.unit.test.ts index 59733f8a5e8d..bef199ce223a 100644 --- a/src/test/common/process/pythonToolService.unit.test.ts +++ b/src/test/common/process/pythonToolService.unit.test.ts @@ -24,7 +24,7 @@ import { ExecutionInfo } from '../../../client/common/types'; import { ServiceContainer } from '../../../client/ioc/container'; import { noop } from '../../core'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('Process - Python tool execution service', () => { const resource = Uri.parse('one'); diff --git a/src/test/common/serviceRegistry.unit.test.ts b/src/test/common/serviceRegistry.unit.test.ts index 8ba7b7faaa90..9a82681625d4 100644 --- a/src/test/common/serviceRegistry.unit.test.ts +++ b/src/test/common/serviceRegistry.unit.test.ts @@ -127,7 +127,7 @@ suite('Common - Service Registry', () => { .setup((s) => s.addSingleton( typemoq.It.isValue(mapping[0] as any), - typemoq.It.is((value) => mapping[1] === value), + typemoq.It.is((value: any) => mapping[1] === value), ), ) .verifiable(typemoq.Times.atLeastOnce()); diff --git a/src/test/common/socketCallbackHandler.test.ts b/src/test/common/socketCallbackHandler.test.ts index 4f4587077f79..5fbac0083125 100644 --- a/src/test/common/socketCallbackHandler.test.ts +++ b/src/test/common/socketCallbackHandler.test.ts @@ -189,7 +189,7 @@ suite('SocketCallbackHandler', () => { expect(port).to.be.greaterThan(0); }); test('Succesfully starts with specific port', async () => { - const availablePort = await getFreePort({ host: 'localhost' }); + const availablePort = await getFreePort.default({ host: 'localhost' }); const port = await socketServer.Start({ port: availablePort, host: 'localhost' }); expect(port).to.be.equal(availablePort); }); @@ -311,7 +311,7 @@ suite('SocketCallbackHandler', () => { }); test('Succesful Handshake with specific port', async () => { const availablePort = await new Promise((resolve, reject) => - getFreePort({ host: 'localhost' }).then(resolve, reject), + getFreePort.default({ host: 'localhost' }).then(resolve, reject), ); const port = await socketServer.Start({ port: availablePort, host: 'localhost' }); diff --git a/src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts b/src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts index 58ae464d0113..5a5e65a9c0f2 100644 --- a/src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts +++ b/src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts @@ -4,7 +4,7 @@ 'use strict'; import { expect } from 'chai'; -import * as fs from 'fs-extra'; +import * as fs from '../../../../client/common/platform/fs-paths'; import * as path from 'path'; import * as sinon from 'sinon'; import * as vscode from 'vscode'; diff --git a/src/test/common/terminals/service.unit.test.ts b/src/test/common/terminals/service.unit.test.ts index 61556e3df2d1..f0754948a233 100644 --- a/src/test/common/terminals/service.unit.test.ts +++ b/src/test/common/terminals/service.unit.test.ts @@ -4,7 +4,15 @@ import { expect } from 'chai'; import * as path from 'path'; import * as TypeMoq from 'typemoq'; -import { Disposable, Terminal as VSCodeTerminal, WorkspaceConfiguration } from 'vscode'; +import { + Disposable, + EventEmitter, + TerminalShellExecution, + TerminalShellExecutionEndEvent, + TerminalShellIntegration, + Terminal as VSCodeTerminal, + WorkspaceConfiguration, +} from 'vscode'; import { ITerminalManager, IWorkspaceService } from '../../../client/common/application/types'; import { EXTENSION_ROOT_DIR } from '../../../client/common/constants'; import { IPlatformService } from '../../../client/common/platform/types'; @@ -26,9 +34,44 @@ suite('Terminal Service', () => { let disposables: Disposable[] = []; let mockServiceContainer: TypeMoq.IMock; let terminalAutoActivator: TypeMoq.IMock; + let terminalShellIntegration: TypeMoq.IMock; + let onDidEndTerminalShellExecutionEmitter: EventEmitter; + let event: TerminalShellExecutionEndEvent; + setup(() => { terminal = TypeMoq.Mock.ofType(); + terminalShellIntegration = TypeMoq.Mock.ofType(); + terminal.setup((t) => t.shellIntegration).returns(() => terminalShellIntegration.object); + + onDidEndTerminalShellExecutionEmitter = new EventEmitter(); terminalManager = TypeMoq.Mock.ofType(); + const execution: TerminalShellExecution = { + commandLine: { + value: 'dummy text', + isTrusted: true, + confidence: 2, + }, + cwd: undefined, + read: function (): AsyncIterable { + throw new Error('Function not implemented.'); + }, + }; + + event = { + execution, + exitCode: 0, + terminal: terminal.object, + shellIntegration: terminalShellIntegration.object, + }; + + terminalShellIntegration.setup((t) => t.executeCommand(TypeMoq.It.isAny())).returns(() => execution); + + terminalManager + .setup((t) => t.onDidEndTerminalShellExecution) + .returns(() => { + setTimeout(() => onDidEndTerminalShellExecutionEmitter.fire(event), 100); + return onDidEndTerminalShellExecutionEmitter.event; + }); platformService = TypeMoq.Mock.ofType(); workspaceService = TypeMoq.Mock.ofType(); terminalHelper = TypeMoq.Mock.ofType(); @@ -37,6 +80,7 @@ suite('Terminal Service', () => { disposables = []; mockServiceContainer = TypeMoq.Mock.ofType(); + mockServiceContainer.setup((c) => c.get(ITerminalManager)).returns(() => terminalManager.object); mockServiceContainer.setup((c) => c.get(ITerminalHelper)).returns(() => terminalHelper.object); mockServiceContainer.setup((c) => c.get(IPlatformService)).returns(() => platformService.object); @@ -75,10 +119,16 @@ suite('Terminal Service', () => { .setup((h) => h.buildCommandForTerminal(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny())) .returns(() => 'dummy text'); + terminalManager + .setup((t) => t.onDidEndTerminalShellExecution) + .returns(() => { + setTimeout(() => onDidEndTerminalShellExecutionEmitter.fire(event), 100); + return onDidEndTerminalShellExecutionEmitter.event; + }); // Sending a command will cause the terminal to be created await service.sendCommand('', []); - terminal.verify((t) => t.show(TypeMoq.It.isValue(true)), TypeMoq.Times.exactly(2)); + terminal.verify((t) => t.show(TypeMoq.It.isValue(true)), TypeMoq.Times.atLeastOnce()); service.dispose(); terminal.verify((t) => t.dispose(), TypeMoq.Times.exactly(1)); }); @@ -99,10 +149,10 @@ suite('Terminal Service', () => { await service.sendCommand(commandToSend, args); - terminal.verify((t) => t.show(TypeMoq.It.isValue(true)), TypeMoq.Times.exactly(2)); + terminal.verify((t) => t.show(TypeMoq.It.isValue(true)), TypeMoq.Times.atLeastOnce()); terminal.verify( (t) => t.sendText(TypeMoq.It.isValue(commandToExpect), TypeMoq.It.isValue(true)), - TypeMoq.Times.exactly(1), + TypeMoq.Times.never(), ); }); diff --git a/src/test/common/utils/decorators.unit.test.ts b/src/test/common/utils/decorators.unit.test.ts index 753434d0c4f8..ca8be4e9def1 100644 --- a/src/test/common/utils/decorators.unit.test.ts +++ b/src/test/common/utils/decorators.unit.test.ts @@ -8,7 +8,7 @@ import * as chaiPromise from 'chai-as-promised'; import { clearCache } from '../../../client/common/utils/cacheUtils'; import { cache, makeDebounceAsyncDecorator, makeDebounceDecorator } from '../../../client/common/utils/decorators'; import { sleep } from '../../core'; -use(chaiPromise); +use(chaiPromise.default); suite('Common Utils - Decorators', function () { // For some reason, sometimes we have timeouts on CI. diff --git a/src/test/common/variables/envVarsProvider.multiroot.test.ts b/src/test/common/variables/envVarsProvider.multiroot.test.ts index ccdca42c54a0..3ba073d71474 100644 --- a/src/test/common/variables/envVarsProvider.multiroot.test.ts +++ b/src/test/common/variables/envVarsProvider.multiroot.test.ts @@ -4,7 +4,7 @@ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import * as path from 'path'; -import { anything, instance, mock, when } from 'ts-mockito'; +import { anything } from 'ts-mockito'; import { ConfigurationTarget, Disposable, Uri, workspace } from 'vscode'; import { WorkspaceService } from '../../../client/common/application/workspace'; import { PlatformService } from '../../../client/common/platform/platformService'; @@ -14,7 +14,6 @@ import { getSearchPathEnvVarNames } from '../../../client/common/utils/exec'; import { EnvironmentVariablesService } from '../../../client/common/variables/environment'; import { EnvironmentVariablesProvider } from '../../../client/common/variables/environmentVariablesProvider'; import { EnvironmentVariables } from '../../../client/common/variables/types'; -import { EnvironmentActivationService } from '../../../client/interpreter/activation/service'; import { IEnvironmentActivationService } from '../../../client/interpreter/activation/types'; import { IInterpreterAutoSelectionService } from '../../../client/interpreter/autoSelection/types'; import { clearPythonPathInWorkspaceFolder, isOs, OSType, updateSetting } from '../../common'; @@ -22,8 +21,9 @@ import { closeActiveWindows, initialize, initializeTest, IS_MULTI_ROOT_TEST } fr import { MockAutoSelectionService } from '../../mocks/autoSelector'; import { MockProcess } from '../../mocks/process'; import { UnitTestIocContainer } from '../../testing/serviceRegistry'; +import { createTypeMoq } from '../../mocks/helper'; -use(chaiAsPromised); +use(chaiAsPromised.default); const multirootPath = path.join(__dirname, '..', '..', '..', '..', 'src', 'testMultiRootWkspc'); const workspace4Path = Uri.file(path.join(multirootPath, 'workspace4')); @@ -47,12 +47,21 @@ suite('Multiroot Environment Variables Provider', () => { ioc.registerProcessTypes(); ioc.registerInterpreterStorageTypes(); await ioc.registerMockInterpreterTypes(); - const mockEnvironmentActivationService = mock(EnvironmentActivationService); - when(mockEnvironmentActivationService.getActivatedEnvironmentVariables(anything())).thenResolve(); - ioc.serviceManager.rebindInstance( - IEnvironmentActivationService, - instance(mockEnvironmentActivationService), - ); + const mockEnvironmentActivationService = createTypeMoq(); + mockEnvironmentActivationService + .setup((m) => m.getActivatedEnvironmentVariables(anything())) + .returns(() => Promise.resolve({})); + if (ioc.serviceManager.tryGet(IEnvironmentActivationService)) { + ioc.serviceManager.rebindInstance( + IEnvironmentActivationService, + mockEnvironmentActivationService.object, + ); + } else { + ioc.serviceManager.addSingletonInstance( + IEnvironmentActivationService, + mockEnvironmentActivationService.object, + ); + } return initializeTest(); }); suiteTeardown(closeActiveWindows); diff --git a/src/test/common/variables/envVarsService.functional.test.ts b/src/test/common/variables/envVarsService.functional.test.ts index 0886bc823960..3cf55eddbd45 100644 --- a/src/test/common/variables/envVarsService.functional.test.ts +++ b/src/test/common/variables/envVarsService.functional.test.ts @@ -13,7 +13,7 @@ import { EnvironmentVariablesService } from '../../../client/common/variables/en import { IEnvironmentVariablesService } from '../../../client/common/variables/types'; import { getOSType } from '../../common'; -use(chaiAsPromised); +use(chaiAsPromised.default); // Functional tests that run code using the VS Code API are found // in envVarsService.test.ts. diff --git a/src/test/common/variables/envVarsService.test.ts b/src/test/common/variables/envVarsService.test.ts index f289d291ac19..c7151a8e33b9 100644 --- a/src/test/common/variables/envVarsService.test.ts +++ b/src/test/common/variables/envVarsService.test.ts @@ -14,7 +14,7 @@ import { EnvironmentVariablesService } from '../../../client/common/variables/en import { IEnvironmentVariablesService } from '../../../client/common/variables/types'; import { getOSType } from '../../common'; -use(chaiAsPromised); +use(chaiAsPromised.default); const envFilesFolderPath = path.join(__dirname, '..', '..', '..', '..', 'src', 'testMultiRootWkspc', 'workspace4'); diff --git a/src/test/common/variables/envVarsService.unit.test.ts b/src/test/common/variables/envVarsService.unit.test.ts index 0c978b2f9e86..3709d97b9f62 100644 --- a/src/test/common/variables/envVarsService.unit.test.ts +++ b/src/test/common/variables/envVarsService.unit.test.ts @@ -12,7 +12,7 @@ import { IPathUtils } from '../../../client/common/types'; import { EnvironmentVariablesService, parseEnvFile } from '../../../client/common/variables/environment'; import { getSearchPathEnvVarNames } from '../../../client/common/utils/exec'; -use(chaiAsPromised); +use(chaiAsPromised.default); type PathVar = 'Path' | 'PATH'; const PATHS = getSearchPathEnvVarNames(); diff --git a/src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts b/src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts index 1871a1b46874..5737a2e416c5 100644 --- a/src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts +++ b/src/test/configuration/interpreterSelector/commands/setInterpreter.unit.test.ts @@ -47,8 +47,7 @@ import { Commands, Octicons } from '../../../../client/common/constants'; import { IInterpreterService, PythonEnvironmentsChangedEvent } from '../../../../client/interpreter/contracts'; import { createDeferred, sleep } from '../../../../client/common/utils/async'; import { SystemVariables } from '../../../../client/common/variables/systemVariables'; - -const untildify = require('untildify'); +import { untildify } from '../../../../client/common/helpers'; type TelemetryEventType = { eventName: EventName; properties: unknown }; @@ -277,7 +276,7 @@ suite('Set Interpreter Command', () => { >); assert.deepStrictEqual(activeItem, recommended); } else { - assert(false, 'Not a function'); + assert.ok(false, 'Not a function'); } delete actualParameters!.activeItem; assert.deepStrictEqual(actualParameters, expectedParameters, 'Params not equal'); @@ -331,7 +330,7 @@ suite('Set Interpreter Command', () => { >); assert.deepStrictEqual(activeItem, recommended); } else { - assert(false, 'Not a function'); + assert.ok(false, 'Not a function'); } delete actualParameters!.activeItem; assert.deepStrictEqual(actualParameters, expectedParameters, 'Params not equal'); @@ -381,7 +380,7 @@ suite('Set Interpreter Command', () => { >); assert.deepStrictEqual(activeItem, noPythonInstalled); } else { - assert(false, 'Not a function'); + assert.ok(false, 'Not a function'); } delete actualParameters!.activeItem; assert.deepStrictEqual(actualParameters, expectedParameters, 'Params not equal'); @@ -753,7 +752,7 @@ suite('Set Interpreter Command', () => { >); assert.deepStrictEqual(activeItem, recommended); } else { - assert(false, 'Not a function'); + assert.ok(false, 'Not a function'); } delete actualParameters!.activeItem; @@ -972,7 +971,7 @@ suite('Set Interpreter Command', () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any await step!(multiStepInput.object as any, state); - assert( + assert.ok( _enterOrBrowseInterpreterPath.calledOnceWith(multiStepInput.object, { path: undefined, workspace: undefined, @@ -1523,9 +1522,9 @@ suite('Set Interpreter Command', () => { expect(inputStep).to.not.equal(undefined, ''); - assert(pickInterpreter.notCalled); + assert.ok(pickInterpreter.notCalled); await inputStep(); - assert(pickInterpreter.calledOnce); + assert.ok(pickInterpreter.calledOnce); }); }); }); diff --git a/src/test/debugger/envVars.test.ts b/src/test/debugger/envVars.test.ts index c043146fe53d..ae21c7fd5d49 100644 --- a/src/test/debugger/envVars.test.ts +++ b/src/test/debugger/envVars.test.ts @@ -17,7 +17,7 @@ import { closeActiveWindows, initialize, initializeTest, IS_MULTI_ROOT_TEST, TES import { UnitTestIocContainer } from '../testing/serviceRegistry'; import { normCase } from '../../client/common/platform/fs-paths'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('Resolving Environment Variables when Debugging', () => { let ioc: UnitTestIocContainer; diff --git a/src/test/debugger/extension/adapter/adapter.test.ts b/src/test/debugger/extension/adapter/adapter.test.ts index dd0e9d560bca..cd53b41102ab 100644 --- a/src/test/debugger/extension/adapter/adapter.test.ts +++ b/src/test/debugger/extension/adapter/adapter.test.ts @@ -4,7 +4,7 @@ 'use strict'; import { expect } from 'chai'; -import * as fs from 'fs-extra'; +import * as fs from '../../../../client/common/platform/fs-paths'; import * as path from 'path'; import * as vscode from 'vscode'; import { openFile } from '../../../common'; diff --git a/src/test/debugger/extension/adapter/factory.unit.test.ts b/src/test/debugger/extension/adapter/factory.unit.test.ts index 6204bb835479..fde87d930078 100644 --- a/src/test/debugger/extension/adapter/factory.unit.test.ts +++ b/src/test/debugger/extension/adapter/factory.unit.test.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; -import * as fs from 'fs-extra'; +import * as fs from '../../../../client/common/platform/fs-paths'; import * as path from 'path'; import * as sinon from 'sinon'; import rewiremock from 'rewiremock'; @@ -30,7 +30,7 @@ import { ICommandManager } from '../../../../client/common/application/types'; import { CommandManager } from '../../../../client/common/application/commandManager'; import * as pythonDebugger from '../../../../client/debugger/pythonDebugger'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('Debugging - Adapter Factory', () => { let factory: IDebugAdapterDescriptorFactory; diff --git a/src/test/debugger/extension/adapter/outdatedDebuggerPrompt.unit.test.ts b/src/test/debugger/extension/adapter/outdatedDebuggerPrompt.unit.test.ts index 0ab094119a5c..9f9497317417 100644 --- a/src/test/debugger/extension/adapter/outdatedDebuggerPrompt.unit.test.ts +++ b/src/test/debugger/extension/adapter/outdatedDebuggerPrompt.unit.test.ts @@ -82,7 +82,7 @@ suite('Debugging - Outdated Debugger Prompt tests.', () => { // First call should show info once sinon.assert.calledOnce(showInformationMessageStub); - assert(prompter); + assert.ok(prompter); prompter!.onDidSendMessage!(ptvsdOutputEvent); // Can't use deferred promise here @@ -104,7 +104,7 @@ suite('Debugging - Outdated Debugger Prompt tests.', () => { const session = createSession(); const prompter = await promptFactory.createDebugAdapterTracker(session); - assert(prompter); + assert.ok(prompter); prompter!.onDidSendMessage!(ptvsdOutputEvent); await deferred.promise; @@ -130,7 +130,7 @@ suite('Debugging - Outdated Debugger Prompt tests.', () => { const session = createSession(); const prompter = await promptFactory.createDebugAdapterTracker(session); - assert(prompter); + assert.ok(prompter); prompter!.onDidSendMessage!(debugpyOutputEvent); // Can't use deferred promise here @@ -168,7 +168,7 @@ suite('Debugging - Outdated Debugger Prompt tests.', () => { const session = createSession(); const prompter = await promptFactory.createDebugAdapterTracker(session); - assert(prompter); + assert.ok(prompter); prompter!.onDidSendMessage!(message); // Can't use deferred promise here diff --git a/src/test/debugger/extension/configuration/launch.json/launchJsonReader.unit.test.ts b/src/test/debugger/extension/configuration/launch.json/launchJsonReader.unit.test.ts index 8ed19dc254aa..4241f3526f1a 100644 --- a/src/test/debugger/extension/configuration/launch.json/launchJsonReader.unit.test.ts +++ b/src/test/debugger/extension/configuration/launch.json/launchJsonReader.unit.test.ts @@ -4,10 +4,10 @@ 'use strict'; import * as sinon from 'sinon'; -import * as fs from 'fs-extra'; import * as path from 'path'; import { Uri } from 'vscode'; import { assert } from 'chai'; +import * as fs from '../../../../../client/common/platform/fs-paths'; import { getConfigurationsForWorkspace } from '../../../../../client/debugger/extension/configuration/launch.json/launchJsonReader'; import * as vscodeApis from '../../../../../client/common/vscodeApis/workspaceApis'; diff --git a/src/test/debugger/utils.ts b/src/test/debugger/utils.ts index 749adb359597..9ccb8958b660 100644 --- a/src/test/debugger/utils.ts +++ b/src/test/debugger/utils.ts @@ -4,7 +4,7 @@ 'use strict'; import { expect } from 'chai'; -import * as fs from 'fs-extra'; +import * as fs from '../../client/common/platform/fs-paths'; import * as path from 'path'; import * as vscode from 'vscode'; import { DebugProtocol } from 'vscode-debugprotocol'; diff --git a/src/test/fakeVSCFileSystemAPI.ts b/src/test/fakeVSCFileSystemAPI.ts index df5356a04919..1811f51dcd04 100644 --- a/src/test/fakeVSCFileSystemAPI.ts +++ b/src/test/fakeVSCFileSystemAPI.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsextra from 'fs-extra'; import * as path from 'path'; import { FileStat, FileType, Uri } from 'vscode'; +import * as fsextra from '../client/common/platform/fs-paths'; import { convertStat } from '../client/common/platform/fileSystem'; import { createDeferred } from '../client/common/utils/async'; diff --git a/src/test/fixtures.ts b/src/test/fixtures.ts index 2b7a5bd9e65d..fbd8c20c9659 100644 --- a/src/test/fixtures.ts +++ b/src/test/fixtures.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fs from 'fs-extra'; +import * as fs from '../client/common/platform/fs-paths'; import { sleep } from '../client/common/utils/async'; import { PYTHON_PATH } from './common'; import { Proc, spawn } from './proc'; diff --git a/src/test/index.ts b/src/test/index.ts index 60c730bffcf2..f528a7551220 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -107,7 +107,7 @@ function configure(): SetupOptions { */ function activatePythonExtensionScript() { const ex = new Error('Failed to initialize Python extension for tests after 3 minutes'); - let timer: NodeJS.Timer | undefined; + let timer: NodeJS.Timeout | undefined; const failed = new Promise((_, reject) => { timer = setTimeout(() => reject(ex), MAX_EXTENSION_ACTIVATION_TIME); }); @@ -127,7 +127,7 @@ function activatePythonExtensionScript() { */ export async function run(): Promise { const options = configure(); - const mocha = new Mocha(options); + const mocha = new Mocha.default(options); const testsRoot = path.join(__dirname); // Enable source map support. @@ -136,7 +136,7 @@ export async function run(): Promise { // Ignore `ds.test.js` test files when running other tests. const ignoreGlob = options.testFilesSuffix.toLowerCase() === 'ds.test' ? [] : ['**/**.ds.test.js']; const testFiles = await new Promise((resolve, reject) => { - glob( + glob.default( `**/**.${options.testFilesSuffix}.js`, { ignore: ['**/**.unit.test.js', '**/**.functional.test.js'].concat(ignoreGlob), cwd: testsRoot }, (error, files) => { diff --git a/src/test/initialize.ts b/src/test/initialize.ts index 9c3f0ac387a7..0ed75a0aa5c1 100644 --- a/src/test/initialize.ts +++ b/src/test/initialize.ts @@ -38,7 +38,7 @@ export async function initialize(): Promise { const api = await activateExtension(); if (!IS_SMOKE_TEST) { // When running smoke tests, we won't have access to these. - const configSettings = await import('../client/common/configSettings'); + const configSettings = await import('../client/common/configSettings.js'); // Dispose any cached python settings (used only in test env). configSettings.PythonSettings.dispose(); } @@ -58,7 +58,7 @@ export async function initializeTest(): Promise { await closeActiveWindows(); if (!IS_SMOKE_TEST) { // When running smoke tests, we won't have access to these. - const configSettings = await import('../client/common/configSettings'); + const configSettings = await import('../client/common/configSettings.js'); // Dispose any cached python settings (used only in test env). configSettings.PythonSettings.dispose(); } diff --git a/src/test/install/channelManager.channels.test.ts b/src/test/install/channelManager.channels.test.ts index 0d8190f046a3..e43fa21daf17 100644 --- a/src/test/install/channelManager.channels.test.ts +++ b/src/test/install/channelManager.channels.test.ts @@ -16,6 +16,7 @@ import { ServiceContainer } from '../../client/ioc/container'; import { ServiceManager } from '../../client/ioc/serviceManager'; import { IServiceContainer } from '../../client/ioc/types'; import { MockAutoSelectionService } from '../mocks/autoSelector'; +import { createTypeMoq } from '../mocks/helper'; suite('Installation - installation channels', () => { let serviceManager: ServiceManager; @@ -71,7 +72,7 @@ suite('Installation - installation channels', () => { const installer1 = mockInstaller(true, '1'); const installer2 = mockInstaller(true, '2'); - const appShell = TypeMoq.Mock.ofType(); + const appShell = createTypeMoq(); serviceManager.addSingletonInstance(IApplicationShell, appShell.object); // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -98,7 +99,7 @@ suite('Installation - installation channels', () => { }); function mockInstaller(supported: boolean, name: string, priority?: number): TypeMoq.IMock { - const installer = TypeMoq.Mock.ofType(); + const installer = createTypeMoq(); installer .setup((x) => x.isSupported(TypeMoq.It.isAny())) .returns( diff --git a/src/test/install/channelManager.messages.test.ts b/src/test/install/channelManager.messages.test.ts index 326ba1ad4bfd..1e9953b8b753 100644 --- a/src/test/install/channelManager.messages.test.ts +++ b/src/test/install/channelManager.messages.test.ts @@ -21,6 +21,7 @@ import { ServiceManager } from '../../client/ioc/serviceManager'; import { IServiceContainer } from '../../client/ioc/types'; import { EnvironmentType, PythonEnvironment } from '../../client/pythonEnvironments/info'; import { MockAutoSelectionService } from '../mocks/autoSelector'; +import { createTypeMoq } from '../mocks/helper'; const info: PythonEnvironment = { architecture: Architecture.Unknown, @@ -45,16 +46,16 @@ suite('Installation - channel messages', () => { const serviceManager = new ServiceManager(cont); serviceContainer = new ServiceContainer(cont); - platform = TypeMoq.Mock.ofType(); + platform = createTypeMoq(); serviceManager.addSingletonInstance(IPlatformService, platform.object); - appShell = TypeMoq.Mock.ofType(); + appShell = createTypeMoq(); serviceManager.addSingletonInstance(IApplicationShell, appShell.object); - interpreters = TypeMoq.Mock.ofType(); + interpreters = createTypeMoq(); serviceManager.addSingletonInstance(IInterpreterService, interpreters.object); - const moduleInstaller = TypeMoq.Mock.ofType(); + const moduleInstaller = createTypeMoq(); serviceManager.addSingletonInstance(IModuleInstaller, moduleInstaller.object); serviceManager.addSingleton( IInterpreterAutoSelectionService, diff --git a/src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts b/src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts index 22b5dcf7477a..3550a92ba1ec 100644 --- a/src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts +++ b/src/test/interpreters/activation/terminalEnvVarCollectionService.unit.test.ts @@ -37,7 +37,7 @@ import { IInterpreterService } from '../../../client/interpreter/contracts'; import { PathUtils } from '../../../client/common/platform/pathUtils'; import { PythonEnvType } from '../../../client/pythonEnvironments/base/info'; import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; -import { IShellIntegrationService, ITerminalDeactivateService } from '../../../client/terminals/types'; +import { IShellIntegrationDetectionService, ITerminalDeactivateService } from '../../../client/terminals/types'; import { IEnvironmentVariablesProvider } from '../../../client/common/variables/types'; suite('Terminal Environment Variable Collection Service', () => { @@ -58,7 +58,7 @@ suite('Terminal Environment Variable Collection Service', () => { title: Interpreters.activatingTerminals, }; let configService: IConfigurationService; - let shellIntegrationService: IShellIntegrationService; + let shellIntegrationService: IShellIntegrationDetectionService; const displayPath = 'display/path'; const customShell = 'powershell'; const defaultShell = defaultShells[getOSType()]; @@ -76,7 +76,7 @@ suite('Terminal Environment Variable Collection Service', () => { context = mock(); shell = mock(); const envVarProvider = mock(); - shellIntegrationService = mock(); + shellIntegrationService = mock(); when(shellIntegrationService.isWorking()).thenResolve(true); globalCollection = mock(); collection = mock(); @@ -134,7 +134,6 @@ suite('Terminal Environment Variable Collection Service', () => { test('When not in experiment, do not apply activated variables to the collection and clear it instead', async () => { reset(experimentService); - when(context.environmentVariableCollection).thenReturn(instance(collection)); when(experimentService.inExperimentSync(TerminalEnvVarActivation.experiment)).thenReturn(false); const applyCollectionStub = sinon.stub(terminalEnvVarCollectionService, '_applyCollection'); applyCollectionStub.resolves(); @@ -147,7 +146,7 @@ suite('Terminal Environment Variable Collection Service', () => { verify(applicationEnvironment.onDidChangeShell(anything(), anything(), anything())).never(); assert(applyCollectionStub.notCalled, 'Collection should not be applied on activation'); - verify(collection.clear()).atLeast(1); + verify(globalCollection.clear()).atLeast(1); }); test('When interpreter changes, apply new activated variables to the collection', async () => { diff --git a/src/test/interpreters/interpreterService.unit.test.ts b/src/test/interpreters/interpreterService.unit.test.ts index d8a0ada23a6f..81a6a014a7e0 100644 --- a/src/test/interpreters/interpreterService.unit.test.ts +++ b/src/test/interpreters/interpreterService.unit.test.ts @@ -36,10 +36,11 @@ import { ServiceManager } from '../../client/ioc/serviceManager'; import { PYTHON_PATH } from '../common'; import { MockAutoSelectionService } from '../mocks/autoSelector'; import * as proposedApi from '../../client/environmentApi'; +import { createTypeMoq } from '../mocks/helper'; /* eslint-disable @typescript-eslint/no-explicit-any */ -use(chaiAsPromised); +use(chaiAsPromised.default); suite('Interpreters service', () => { let serviceManager: ServiceManager; @@ -67,23 +68,23 @@ suite('Interpreters service', () => { serviceManager = new ServiceManager(cont); serviceContainer = new ServiceContainer(cont); - interpreterPathService = TypeMoq.Mock.ofType(); - updater = TypeMoq.Mock.ofType(); - pyenvs = TypeMoq.Mock.ofType(); - helper = TypeMoq.Mock.ofType(); - workspace = TypeMoq.Mock.ofType(); - config = TypeMoq.Mock.ofType(); - fileSystem = TypeMoq.Mock.ofType(); - interpreterDisplay = TypeMoq.Mock.ofType(); - persistentStateFactory = TypeMoq.Mock.ofType(); - pythonExecutionFactory = TypeMoq.Mock.ofType(); - pythonExecutionService = TypeMoq.Mock.ofType(); - configService = TypeMoq.Mock.ofType(); - installer = TypeMoq.Mock.ofType(); - appShell = TypeMoq.Mock.ofType(); - experiments = TypeMoq.Mock.ofType(); - - pythonSettings = TypeMoq.Mock.ofType(); + interpreterPathService = createTypeMoq(); + updater = createTypeMoq(); + pyenvs = createTypeMoq(); + helper = createTypeMoq(); + workspace = createTypeMoq(); + config = createTypeMoq(); + fileSystem = createTypeMoq(); + interpreterDisplay = createTypeMoq(); + persistentStateFactory = createTypeMoq(); + pythonExecutionFactory = createTypeMoq(); + pythonExecutionService = createTypeMoq(); + configService = createTypeMoq(); + installer = createTypeMoq(); + appShell = createTypeMoq(); + experiments = createTypeMoq(); + + pythonSettings = createTypeMoq(); pythonSettings.setup((s) => s.pythonPath).returns(() => PYTHON_PATH); configService.setup((c) => c.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object); @@ -166,7 +167,7 @@ suite('Interpreters service', () => { test('Changes to active document should invoke interpreter.refresh method', async () => { const service = new InterpreterService(serviceContainer, pyenvs.object); - const documentManager = TypeMoq.Mock.ofType(); + const documentManager = createTypeMoq(); workspace.setup((w) => w.workspaceFolders).returns(() => [{ uri: '' }] as any); let activeTextEditorChangeHandler: (e: TextEditor | undefined) => any | undefined; @@ -179,9 +180,9 @@ suite('Interpreters service', () => { serviceManager.addSingletonInstance(IDocumentManager, documentManager.object); service.initialize(); - const textEditor = TypeMoq.Mock.ofType(); + const textEditor = createTypeMoq(); const uri = Uri.file(path.join('usr', 'file.py')); - const document = TypeMoq.Mock.ofType(); + const document = createTypeMoq(); textEditor.setup((t) => t.document).returns(() => document.object); document.setup((d) => d.uri).returns(() => uri); activeTextEditorChangeHandler!(textEditor.object); @@ -191,7 +192,7 @@ suite('Interpreters service', () => { test('If there is no active document then interpreter.refresh should not be invoked', async () => { const service = new InterpreterService(serviceContainer, pyenvs.object); - const documentManager = TypeMoq.Mock.ofType(); + const documentManager = createTypeMoq(); workspace.setup((w) => w.workspaceFolders).returns(() => [{ uri: '' }] as any); let activeTextEditorChangeHandler: (e?: TextEditor | undefined) => any | undefined; @@ -211,7 +212,7 @@ suite('Interpreters service', () => { test('Register the correct handler', async () => { const service = new InterpreterService(serviceContainer, pyenvs.object); - const documentManager = TypeMoq.Mock.ofType(); + const documentManager = createTypeMoq(); workspace.setup((w) => w.workspaceFolders).returns(() => [{ uri: '' }] as any); let interpreterPathServiceHandler: (e: InterpreterConfigurationScope) => any | undefined = () => 0; diff --git a/src/test/mocks/helper.ts b/src/test/mocks/helper.ts index 24d7a8290b18..d61bf728a25c 100644 --- a/src/test/mocks/helper.ts +++ b/src/test/mocks/helper.ts @@ -1,7 +1,11 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ +/* eslint-disable @typescript-eslint/no-explicit-any */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. - +import * as TypeMoq from 'typemoq'; import { Readable } from 'stream'; +// eslint-disable-next-line import/no-unresolved +import * as common from 'typemoq/Common/_all'; export class FakeReadableStream extends Readable { _read(_size: unknown): void | null { @@ -9,3 +13,16 @@ export class FakeReadableStream extends Readable { this.push(null); // end the stream } } + +export function createTypeMoq( + targetCtor?: common.CtorWithArgs, + behavior?: TypeMoq.MockBehavior, + shouldOverrideTarget?: boolean, + ...targetCtorArgs: any[] +): TypeMoq.IMock { + // Use typemoqs for those things that are resolved as promises. mockito doesn't allow nesting of mocks. ES6 Proxy class + // is the problem. We still need to make it thenable though. See this issue: https://github.com/florinn/typemoq/issues/67 + const result = TypeMoq.Mock.ofType(targetCtor, behavior, shouldOverrideTarget, ...targetCtorArgs); + result.setup((x: any) => x.then).returns(() => undefined); + return result; +} diff --git a/src/test/mocks/mockChildProcess.ts b/src/test/mocks/mockChildProcess.ts index c0a24b1c955f..e26ea1c7aa45 100644 --- a/src/test/mocks/mockChildProcess.ts +++ b/src/test/mocks/mockChildProcess.ts @@ -236,4 +236,8 @@ export class MockChildProcess extends EventEmitter { this.stdout?.destroy(); return true; } + + dispose(): void { + this.stdout?.destroy(); + } } diff --git a/src/test/mocks/process.ts b/src/test/mocks/process.ts index 3c1b339aff44..d290cae5bf71 100644 --- a/src/test/mocks/process.ts +++ b/src/test/mocks/process.ts @@ -4,9 +4,9 @@ 'use strict'; import { injectable } from 'inversify'; -import * as TypeMoq from 'typemoq'; import { ICurrentProcess } from '../../client/common/types'; import { EnvironmentVariables } from '../../client/common/variables/types'; +import { createTypeMoq } from './helper'; @injectable() export class MockProcess implements ICurrentProcess { @@ -24,12 +24,12 @@ export class MockProcess implements ICurrentProcess { // eslint-disable-next-line class-methods-use-this public get stdout(): NodeJS.WriteStream { - return TypeMoq.Mock.ofType().object; + return createTypeMoq().object; } // eslint-disable-next-line class-methods-use-this public get stdin(): NodeJS.ReadStream { - return TypeMoq.Mock.ofType().object; + return createTypeMoq().object; } // eslint-disable-next-line class-methods-use-this diff --git a/src/test/mocks/vsc/charCode.ts b/src/test/mocks/vsc/charCode.ts index d0fac68fbc57..fe450d491ef1 100644 --- a/src/test/mocks/vsc/charCode.ts +++ b/src/test/mocks/vsc/charCode.ts @@ -346,8 +346,8 @@ export const enum CharCode { LINE_SEPARATOR_2028 = 8232, // http://www.fileformat.info/info/unicode/category/Sk/list.htm - U_CIRCUMFLEX = 0x005e, // U+005E CIRCUMFLEX - U_GRAVE_ACCENT = 0x0060, // U+0060 GRAVE ACCENT + U_CIRCUMFLEX = Caret, // U+005E CIRCUMFLEX + U_GRAVE_ACCENT = BackTick, // U+0060 GRAVE ACCENT U_DIAERESIS = 0x00a8, // U+00A8 DIAERESIS U_MACRON = 0x00af, // U+00AF MACRON U_ACUTE_ACCENT = 0x00b4, // U+00B4 ACUTE ACCENT diff --git a/src/test/mocks/vsc/index.ts b/src/test/mocks/vsc/index.ts index 774ba388bb4e..152beb64cdf4 100644 --- a/src/test/mocks/vsc/index.ts +++ b/src/test/mocks/vsc/index.ts @@ -369,6 +369,8 @@ export class CodeActionKind { public static readonly SourceFixAll: CodeActionKind = new CodeActionKind('source.fix.all'); + public static readonly Notebook: CodeActionKind = new CodeActionKind('notebook'); + private constructor(private _value: string) {} public append(parts: string): CodeActionKind { @@ -574,3 +576,21 @@ export class Location { this.range = rangeOrPosition; } } + +/** + * The kind of executions that {@link TestRunProfile TestRunProfiles} control. + */ +export enum TestRunProfileKind { + /** + * The `Run` test profile kind. + */ + Run = 1, + /** + * The `Debug` test profile kind. + */ + Debug = 2, + /** + * The `Coverage` test profile kind. + */ + Coverage = 3, +} diff --git a/src/test/performance/load.perf.test.ts b/src/test/performance/load.perf.test.ts index 3fe9c6caa37d..0067803af8f0 100644 --- a/src/test/performance/load.perf.test.ts +++ b/src/test/performance/load.perf.test.ts @@ -4,7 +4,7 @@ 'use strict'; import { expect } from 'chai'; -import * as fs from 'fs-extra'; +import * as fs from '../../client/common/platform/fs-paths'; import { EOL } from 'os'; import * as path from 'path'; import { commands, extensions } from 'vscode'; diff --git a/src/test/performanceTest.ts b/src/test/performanceTest.ts index d4ac6bf262d0..2398f745c27a 100644 --- a/src/test/performanceTest.ts +++ b/src/test/performanceTest.ts @@ -17,7 +17,7 @@ process.env.VSC_PYTHON_PERF_TEST = '1'; import { spawn } from 'child_process'; import * as download from 'download'; -import * as fs from 'fs-extra'; +import * as fs from '../client/common/platform/fs-paths'; import * as path from 'path'; import * as bent from 'bent'; import { LanguageServerType } from '../client/activation/types'; @@ -123,7 +123,7 @@ class TestRunner { private async getReleaseVersion(): Promise { const url = `https://marketplace.visualstudio.com/items?itemName=${PVSC_EXTENSION_ID}`; - const request = bent('string', 'GET', 200); + const request = bent.default('string', 'GET', 200); const content: string = await request(url); const re = NamedRegexp('"version"S?:S?"(:\\d{4}\\.\\d{1,2}\\.\\d{1,2})"', 'g'); @@ -143,7 +143,7 @@ class TestRunner { return destination; } - await download(url, path.dirname(destination), { filename: path.basename(destination) }); + await download.default(url, path.dirname(destination), { filename: path.basename(destination) }); return destination; } } diff --git a/src/test/providers/terminal.unit.test.ts b/src/test/providers/terminal.unit.test.ts index 603c0710f8c5..1924f42d6927 100644 --- a/src/test/providers/terminal.unit.test.ts +++ b/src/test/providers/terminal.unit.test.ts @@ -233,7 +233,7 @@ suite('Terminal Provider', () => { try { await terminalProvider.initialize(undefined); } catch (ex) { - assert(false, `No error should be thrown, ${ex}`); + assert.ok(false, `No error should be thrown, ${ex}`); } }); }); diff --git a/src/test/pythonEnvironments/base/locators/envTestUtils.ts b/src/test/pythonEnvironments/base/locators/envTestUtils.ts index a46dab274b41..db29575d29ba 100644 --- a/src/test/pythonEnvironments/base/locators/envTestUtils.ts +++ b/src/test/pythonEnvironments/base/locators/envTestUtils.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import * as assert from 'assert'; import { exec } from 'child_process'; import { cloneDeep, zip } from 'lodash'; import { promisify } from 'util'; +import * as fsapi from '../../../../client/common/platform/fs-paths'; import { PythonEnvInfo, PythonVersion, UNKNOWN_PYTHON_VERSION } from '../../../../client/pythonEnvironments/base/info'; import { getEmptyVersion } from '../../../../client/pythonEnvironments/base/info/pythonVersion'; import { BasicEnvInfo } from '../../../../client/pythonEnvironments/base/locator'; diff --git a/src/test/pythonEnvironments/base/locators/lowLevel/activestateLocator.unit.test.ts b/src/test/pythonEnvironments/base/locators/lowLevel/activestateLocator.unit.test.ts index bf86db883433..b0b18fb3827e 100644 --- a/src/test/pythonEnvironments/base/locators/lowLevel/activestateLocator.unit.test.ts +++ b/src/test/pythonEnvironments/base/locators/lowLevel/activestateLocator.unit.test.ts @@ -3,7 +3,7 @@ import * as path from 'path'; import * as sinon from 'sinon'; -import * as fsapi from 'fs-extra'; +import * as fsapi from '../../../../../client/common/platform/fs-paths'; import { PythonEnvKind } from '../../../../../client/pythonEnvironments/base/info'; import * as externalDependencies from '../../../../../client/pythonEnvironments/common/externalDependencies'; import { getEnvs } from '../../../../../client/pythonEnvironments/base/locatorUtils'; @@ -38,7 +38,7 @@ suite('ActiveState Locator', () => { const stateToolDir = ActiveState.getStateToolDir(); if (stateToolDir) { - sinon.stub(fsapi, 'pathExists').callsFake((dir: string) => dir === stateToolDir); + sinon.stub(fsapi, 'pathExists').callsFake((dir: string) => Promise.resolve(dir === stateToolDir)); } sinon.stub(externalDependencies, 'getPythonSetting').returns(undefined); diff --git a/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.testvirtualenvs.ts b/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.testvirtualenvs.ts index 25a3df90202f..3c7d4348b1c5 100644 --- a/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.testvirtualenvs.ts +++ b/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.testvirtualenvs.ts @@ -3,9 +3,9 @@ // Licensed under the MIT License. import * as path from 'path'; -import * as fs from 'fs-extra'; import { assert } from 'chai'; import * as sinon from 'sinon'; +import * as fs from '../../../../../client/common/platform/fs-paths'; import * as platformUtils from '../../../../../client/common/utils/platform'; import { CondaEnvironmentLocator } from '../../../../../client/pythonEnvironments/base/locators/lowLevel/condaLocator'; import { sleep } from '../../../../core'; diff --git a/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.unit.test.ts b/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.unit.test.ts index 1bf3ef19398d..605109b7a67e 100644 --- a/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.unit.test.ts +++ b/src/test/pythonEnvironments/base/locators/lowLevel/condaLocator.unit.test.ts @@ -1,9 +1,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fsapi from 'fs-extra'; import * as path from 'path'; import * as sinon from 'sinon'; +import * as fsapi from '../../../../../client/common/platform/fs-paths'; import { PythonReleaseLevel, PythonVersion } from '../../../../../client/pythonEnvironments/base/info'; import * as externalDeps from '../../../../../client/pythonEnvironments/common/externalDependencies'; import { getPythonVersionFromConda } from '../../../../../client/pythonEnvironments/common/environmentManagers/conda'; diff --git a/src/test/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.unit.test.ts b/src/test/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.unit.test.ts index 43effcfa4538..e570c3fb72da 100644 --- a/src/test/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.unit.test.ts +++ b/src/test/pythonEnvironments/base/locators/lowLevel/customVirtualEnvLocator.unit.test.ts @@ -9,6 +9,7 @@ import * as platformUtils from '../../../../../client/common/utils/platform'; import { PythonEnvKind } from '../../../../../client/pythonEnvironments/base/info'; import { getEnvs } from '../../../../../client/pythonEnvironments/base/locatorUtils'; import { PythonEnvsChangedEvent } from '../../../../../client/pythonEnvironments/base/watcher'; +import * as helpers from '../../../../../client/common/helpers'; import * as externalDependencies from '../../../../../client/pythonEnvironments/common/externalDependencies'; import { CustomVirtualEnvironmentLocator, @@ -32,7 +33,7 @@ suite('CustomVirtualEnvironment Locator', () => { let untildify: sinon.SinonStub; setup(async () => { - untildify = sinon.stub(externalDependencies, 'untildify'); + untildify = sinon.stub(helpers, 'untildify'); untildify.callsFake((value: string) => value.replace('~', testVirtualHomeDir)); getUserHomeDirStub = sinon.stub(platformUtils, 'getUserHomeDir'); getUserHomeDirStub.returns(testVirtualHomeDir); diff --git a/src/test/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.test.ts b/src/test/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.test.ts index fc3e9b7f5663..511597dd28db 100644 --- a/src/test/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.test.ts +++ b/src/test/pythonEnvironments/base/locators/lowLevel/microsoftStoreLocator.test.ts @@ -2,9 +2,9 @@ // Licensed under the MIT License. import { assert } from 'chai'; -import * as fs from 'fs-extra'; import * as path from 'path'; import { Uri } from 'vscode'; +import * as fs from '../../../../../client/common/platform/fs-paths'; import { FileChangeType } from '../../../../../client/common/platform/fileSystemWatcher'; import { createDeferred, Deferred, sleep } from '../../../../../client/common/utils/async'; import { PythonEnvKind } from '../../../../../client/pythonEnvironments/base/info'; diff --git a/src/test/pythonEnvironments/base/locators/lowLevel/watcherTestUtils.ts b/src/test/pythonEnvironments/base/locators/lowLevel/watcherTestUtils.ts index 6e269f5680ba..e9c7be3ec321 100644 --- a/src/test/pythonEnvironments/base/locators/lowLevel/watcherTestUtils.ts +++ b/src/test/pythonEnvironments/base/locators/lowLevel/watcherTestUtils.ts @@ -2,8 +2,8 @@ // Licensed under the MIT License. import { assert } from 'chai'; -import * as fs from 'fs-extra'; import * as path from 'path'; +import * as fs from '../../../../../client/common/platform/fs-paths'; import { FileChangeType } from '../../../../../client/common/platform/fileSystemWatcher'; import { IDisposable } from '../../../../../client/common/types'; import { createDeferred, Deferred, sleep } from '../../../../../client/common/utils/async'; diff --git a/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts b/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts index d888f1d4edff..e621c25aeb62 100644 --- a/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts +++ b/src/test/pythonEnvironments/common/environmentManagers/conda.unit.test.ts @@ -1,10 +1,10 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { assert, expect } from 'chai'; -import * as fs from 'fs'; -import * as fsapi from 'fs-extra'; import * as path from 'path'; import * as sinon from 'sinon'; import * as util from 'util'; import { eq } from 'semver'; +import * as fs from '../../../../client/common/platform/fs-paths'; import * as platform from '../../../../client/common/utils/platform'; import { PythonEnvKind } from '../../../../client/pythonEnvironments/base/info'; import { getEnvs } from '../../../../client/pythonEnvironments/base/locatorUtils'; @@ -105,17 +105,17 @@ suite('Conda and its environments are located correctly', () => { sinon.stub(platform, 'getUserHomeDir').callsFake(() => homeDir); - sinon.stub(fsapi, 'lstat').callsFake(async (filePath: fs.PathLike) => { + sinon.stub(fs, 'lstat').callsFake(async (filePath: fs.PathLike) => { if (typeof filePath !== 'string') { throw new Error(`expected filePath to be string, got ${typeof filePath}`); } const file = getFile(filePath, 'throwIfMissing'); return { isDirectory: () => typeof file !== 'string', - } as fsapi.Stats; + } as fs.Stats; }); - sinon.stub(fsapi, 'pathExists').callsFake(async (filePath: string | Buffer) => { + sinon.stub(fs, 'pathExists').callsFake(async (filePath: string | Buffer) => { if (typeof filePath !== 'string') { throw new Error(`expected filePath to be string, got ${typeof filePath}`); } @@ -127,16 +127,9 @@ suite('Conda and its environments are located correctly', () => { return true; }); - sinon.stub(fsapi, 'readdir').callsFake(async (filePath: fs.PathLike) => { - if (typeof filePath !== 'string') { - throw new Error(`expected filePath to be string, got ${typeof filePath}`); - } - return (Object.keys(getFile(filePath, 'throwIfMissing')) as unknown) as fs.Dirent[]; - }); - - sinon - .stub(fs.promises, 'readdir' as any) // eslint-disable-line @typescript-eslint/no-explicit-any - .callsFake(async (filePath: fs.PathLike, options?: { withFileTypes?: boolean }) => { + sinon.stub(fs, 'readdir').callsFake( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + async (filePath: fs.PathLike, options?: { withFileTypes?: boolean }): Promise => { if (typeof filePath !== 'string') { throw new Error(`expected path to be string, got ${typeof path}`); } @@ -146,6 +139,10 @@ suite('Conda and its environments are located correctly', () => { throw new Error(`${path} is not a directory`); } + if (options === undefined) { + return (Object.keys(getFile(filePath, 'throwIfMissing')) as unknown) as fs.Dirent[]; + } + const names = Object.keys(dir); if (!options?.withFileTypes) { return names; @@ -164,27 +161,34 @@ suite('Conda and its environments are located correctly', () => { isSymbolicLink: () => false, isFIFO: () => false, isSocket: () => false, + parentPath: '', }; }, ); - }); - - sinon - .stub(fsapi, 'readFile' as any) // eslint-disable-line @typescript-eslint/no-explicit-any - .callsFake(async (filePath: string | Buffer | number, encoding: string) => { - if (typeof filePath !== 'string') { - throw new Error(`expected filePath to be string, got ${typeof filePath}`); - } else if (encoding !== 'utf8') { - throw new Error(`Unsupported encoding ${encoding}`); + }, + ); + const readFileStub = async ( + filePath: fs.PathOrFileDescriptor, + options: { encoding: BufferEncoding; flag?: string | undefined } | BufferEncoding, + ): Promise => { + if (typeof filePath !== 'string') { + throw new Error(`expected filePath to be string, got ${typeof filePath}`); + } else if (typeof options === 'string') { + if (options !== 'utf8') { + throw new Error(`Unsupported encoding ${options}`); } + } else if ((options as any).encoding !== 'utf8') { + throw new Error(`Unsupported encoding ${(options as any).encoding}`); + } - const contents = getFile(filePath); - if (typeof contents !== 'string') { - throw new Error(`${filePath} is not a file`); - } + const contents = getFile(filePath); + if (typeof contents !== 'string') { + throw new Error(`${filePath} is not a file`); + } - return contents; - }); + return contents; + }; + sinon.stub(fs, 'readFile' as any).callsFake(readFileStub as any); sinon.stub(externalDependencies, 'exec').callsFake(async (command: string, args: string[]) => { for (const prefix of ['', ...execPath]) { diff --git a/src/test/pythonEnvironments/common/environmentManagers/simplevirtualenvs.unit.test.ts b/src/test/pythonEnvironments/common/environmentManagers/simplevirtualenvs.unit.test.ts index 8ffb64b741a3..6d75668b8556 100644 --- a/src/test/pythonEnvironments/common/environmentManagers/simplevirtualenvs.unit.test.ts +++ b/src/test/pythonEnvironments/common/environmentManagers/simplevirtualenvs.unit.test.ts @@ -2,9 +2,9 @@ // Licensed under the MIT License. import * as assert from 'assert'; -import * as fsapi from 'fs-extra'; import * as path from 'path'; import * as sinon from 'sinon'; +import * as fsapi from '../../../../client/common/platform/fs-paths'; import * as platformUtils from '../../../../client/common/utils/platform'; import { PythonReleaseLevel, PythonVersion } from '../../../../client/pythonEnvironments/base/info'; import * as fileUtils from '../../../../client/pythonEnvironments/common/externalDependencies'; diff --git a/src/test/pythonEnvironments/creation/common/installCheckUtils.unit.test.ts b/src/test/pythonEnvironments/creation/common/installCheckUtils.unit.test.ts index 2ad1addbb1bc..2900b9b89c8f 100644 --- a/src/test/pythonEnvironments/creation/common/installCheckUtils.unit.test.ts +++ b/src/test/pythonEnvironments/creation/common/installCheckUtils.unit.test.ts @@ -13,7 +13,7 @@ import { SpawnOptions } from '../../../../client/common/process/types'; import { IInterpreterService } from '../../../../client/interpreter/contracts'; import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); function getSomeRequirementFile(): typemoq.IMock { const someFilePath = 'requirements.txt'; diff --git a/src/test/pythonEnvironments/creation/common/workspaceSelection.unit.test.ts b/src/test/pythonEnvironments/creation/common/workspaceSelection.unit.test.ts index 57047db1d2bc..1d3df521fd0a 100644 --- a/src/test/pythonEnvironments/creation/common/workspaceSelection.unit.test.ts +++ b/src/test/pythonEnvironments/creation/common/workspaceSelection.unit.test.ts @@ -12,7 +12,7 @@ import { pickWorkspaceFolder } from '../../../../client/pythonEnvironments/creat import * as windowApis from '../../../../client/common/vscodeApis/windowApis'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../../constants'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); suite('Create environment workspace selection tests', () => { let showQuickPickWithBackStub: sinon.SinonStub; diff --git a/src/test/pythonEnvironments/creation/createEnvApi.unit.test.ts b/src/test/pythonEnvironments/creation/createEnvApi.unit.test.ts index 786bd26a881c..f8c75f76e2b8 100644 --- a/src/test/pythonEnvironments/creation/createEnvApi.unit.test.ts +++ b/src/test/pythonEnvironments/creation/createEnvApi.unit.test.ts @@ -15,7 +15,7 @@ import * as windowApis from '../../../client/common/vscodeApis/windowApis'; import { handleCreateEnvironmentCommand } from '../../../client/pythonEnvironments/creation/createEnvironment'; import { CreateEnvironmentProvider } from '../../../client/pythonEnvironments/creation/proposed.createEnvApis'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); suite('Create Environment APIs', () => { let registerCommandStub: sinon.SinonStub; diff --git a/src/test/pythonEnvironments/creation/createEnvButtonContext.unit.test.ts b/src/test/pythonEnvironments/creation/createEnvButtonContext.unit.test.ts index eec2d066aadb..b666191b37bf 100644 --- a/src/test/pythonEnvironments/creation/createEnvButtonContext.unit.test.ts +++ b/src/test/pythonEnvironments/creation/createEnvButtonContext.unit.test.ts @@ -11,7 +11,7 @@ import * as workspaceApis from '../../../client/common/vscodeApis/workspaceApis' import { IDisposableRegistry } from '../../../client/common/types'; import { registerCreateEnvironmentButtonFeatures } from '../../../client/pythonEnvironments/creation/createEnvButtonContext'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); class FakeDisposable { public dispose() { diff --git a/src/test/pythonEnvironments/creation/createEnvironment.unit.test.ts b/src/test/pythonEnvironments/creation/createEnvironment.unit.test.ts index f16f81233369..9aa9a606d22f 100644 --- a/src/test/pythonEnvironments/creation/createEnvironment.unit.test.ts +++ b/src/test/pythonEnvironments/creation/createEnvironment.unit.test.ts @@ -12,7 +12,7 @@ import { IDisposableRegistry } from '../../../client/common/types'; import { onCreateEnvironmentStarted } from '../../../client/pythonEnvironments/creation/createEnvApi'; import { CreateEnvironmentProvider } from '../../../client/pythonEnvironments/creation/proposed.createEnvApis'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); suite('Create Environments Tests', () => { let showQuickPickStub: sinon.SinonStub; diff --git a/src/test/pythonEnvironments/creation/installedPackagesDiagnostics.unit.test.ts b/src/test/pythonEnvironments/creation/installedPackagesDiagnostics.unit.test.ts index ca984b6122f0..21bddd33c678 100644 --- a/src/test/pythonEnvironments/creation/installedPackagesDiagnostics.unit.test.ts +++ b/src/test/pythonEnvironments/creation/installedPackagesDiagnostics.unit.test.ts @@ -18,7 +18,7 @@ import { } from '../../../client/pythonEnvironments/creation/installedPackagesDiagnostic'; import { IInterpreterService } from '../../../client/interpreter/contracts'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); class FakeDisposable { public dispose() { diff --git a/src/test/pythonEnvironments/creation/provider/commonUtils.unit.test.ts b/src/test/pythonEnvironments/creation/provider/commonUtils.unit.test.ts index 55ad81cdb486..ee177a58c779 100644 --- a/src/test/pythonEnvironments/creation/provider/commonUtils.unit.test.ts +++ b/src/test/pythonEnvironments/creation/provider/commonUtils.unit.test.ts @@ -2,10 +2,10 @@ // Licensed under the MIT License. import { expect } from 'chai'; -import * as fs from 'fs-extra'; import * as path from 'path'; import * as sinon from 'sinon'; import { Uri } from 'vscode'; +import * as fs from '../../../../client/common/platform/fs-paths'; import { hasVenv } from '../../../../client/pythonEnvironments/creation/common/commonUtils'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../../constants'; diff --git a/src/test/pythonEnvironments/creation/provider/condaCreationProvider.unit.test.ts b/src/test/pythonEnvironments/creation/provider/condaCreationProvider.unit.test.ts index e1344dc5f3ad..e2ff9b2ab486 100644 --- a/src/test/pythonEnvironments/creation/provider/condaCreationProvider.unit.test.ts +++ b/src/test/pythonEnvironments/creation/provider/condaCreationProvider.unit.test.ts @@ -24,7 +24,7 @@ import { CreateEnvironmentResult, } from '../../../../client/pythonEnvironments/creation/proposed.createEnvApis'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); suite('Conda Creation provider tests', () => { let condaProvider: CreateEnvironmentProvider; @@ -166,6 +166,7 @@ suite('Conda Creation provider tests', () => { out: { subscribe: ( _next?: (value: Output) => void, + // eslint-disable-next-line no-shadow error?: (error: unknown) => void, complete?: () => void, ) => { diff --git a/src/test/pythonEnvironments/creation/provider/venvCreationProvider.unit.test.ts b/src/test/pythonEnvironments/creation/provider/venvCreationProvider.unit.test.ts index 72914b9118e2..aa2d317c405e 100644 --- a/src/test/pythonEnvironments/creation/provider/venvCreationProvider.unit.test.ts +++ b/src/test/pythonEnvironments/creation/provider/venvCreationProvider.unit.test.ts @@ -24,7 +24,7 @@ import { CreateEnvironmentResult, } from '../../../../client/pythonEnvironments/creation/proposed.createEnvApis'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); suite('venv Creation provider tests', () => { let venvProvider: CreateEnvironmentProvider; @@ -198,6 +198,7 @@ suite('venv Creation provider tests', () => { out: { subscribe: ( _next?: (value: Output) => void, + // eslint-disable-next-line no-shadow error?: (error: unknown) => void, complete?: () => void, ) => { diff --git a/src/test/pythonEnvironments/creation/provider/venvDeleteUtils.unit.test.ts b/src/test/pythonEnvironments/creation/provider/venvDeleteUtils.unit.test.ts index d075979b70b1..231222acbaec 100644 --- a/src/test/pythonEnvironments/creation/provider/venvDeleteUtils.unit.test.ts +++ b/src/test/pythonEnvironments/creation/provider/venvDeleteUtils.unit.test.ts @@ -1,10 +1,10 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import * as fs from 'fs-extra'; import * as sinon from 'sinon'; import { Uri, WorkspaceFolder } from 'vscode'; import { assert } from 'chai'; import * as path from 'path'; +import * as fs from '../../../../client/common/platform/fs-paths'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../../constants'; import * as commonUtils from '../../../../client/pythonEnvironments/creation/common/commonUtils'; import { diff --git a/src/test/pythonEnvironments/creation/provider/venvUtils.unit.test.ts b/src/test/pythonEnvironments/creation/provider/venvUtils.unit.test.ts index 053524331ba9..2c8ec2ebce87 100644 --- a/src/test/pythonEnvironments/creation/provider/venvUtils.unit.test.ts +++ b/src/test/pythonEnvironments/creation/provider/venvUtils.unit.test.ts @@ -2,10 +2,10 @@ // Licensed under the MIT License. import { assert, use as chaiUse } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; -import * as fs from 'fs-extra'; import * as sinon from 'sinon'; import { Uri } from 'vscode'; import * as path from 'path'; +import * as fs from '../../../../client/common/platform/fs-paths'; import * as windowApis from '../../../../client/common/vscodeApis/windowApis'; import * as workspaceApis from '../../../../client/common/vscodeApis/workspaceApis'; import { @@ -18,7 +18,7 @@ import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../../constants'; import { CreateEnv } from '../../../../client/common/utils/localize'; import { createDeferred } from '../../../../client/common/utils/async'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); suite('Venv Utils test', () => { let findFilesStub: sinon.SinonStub; diff --git a/src/test/pythonEnvironments/creation/pyProjectTomlContext.unit.test.ts b/src/test/pythonEnvironments/creation/pyProjectTomlContext.unit.test.ts index 7106ee64162f..8363837a4a36 100644 --- a/src/test/pythonEnvironments/creation/pyProjectTomlContext.unit.test.ts +++ b/src/test/pythonEnvironments/creation/pyProjectTomlContext.unit.test.ts @@ -12,7 +12,7 @@ import * as workspaceApis from '../../../client/common/vscodeApis/workspaceApis' import { IDisposableRegistry } from '../../../client/common/types'; import { registerPyProjectTomlFeatures } from '../../../client/pythonEnvironments/creation/pyProjectTomlContext'; -chaiUse(chaiAsPromised); +chaiUse(chaiAsPromised.default); class FakeDisposable { public dispose() { diff --git a/src/test/repl/variableProvider.test.ts b/src/test/repl/variableProvider.test.ts new file mode 100644 index 000000000000..1b151d34c096 --- /dev/null +++ b/src/test/repl/variableProvider.test.ts @@ -0,0 +1,240 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { assert } from 'chai'; +import { NotebookDocument, CancellationTokenSource, VariablesResult, Variable, EventEmitter } from 'vscode'; +import * as TypeMoq from 'typemoq'; +import { IVariableDescription } from '../../client/repl/variables/types'; +import { VariablesProvider } from '../../client/repl/variables/variablesProvider'; +import { VariableRequester } from '../../client/repl/variables/variableRequester'; + +suite('ReplVariablesProvider', () => { + let provider: VariablesProvider; + let varRequester: TypeMoq.IMock; + let notebook: TypeMoq.IMock; + const executionEventEmitter = new EventEmitter(); + const cancellationToken = new CancellationTokenSource().token; + + const objectVariable: IVariableDescription = { + name: 'myObject', + value: '...', + root: 'myObject', + hasNamedChildren: true, + propertyChain: [], + }; + + const listVariable: IVariableDescription = { + name: 'myList', + value: '[...]', + count: 3, + root: 'myObject', + propertyChain: ['myList'], + }; + + function createListItem(index: number): IVariableDescription { + return { + name: index.toString(), + value: `value${index}`, + count: index, + root: 'myObject', + propertyChain: ['myList', index], + }; + } + + function setVariablesForParent( + parent: IVariableDescription | undefined, + result: IVariableDescription[], + updated?: IVariableDescription[], + startIndex?: number, + ) { + let returnedOnce = false; + varRequester + .setup((v) => v.getAllVariableDescriptions(parent, startIndex ?? TypeMoq.It.isAny(), TypeMoq.It.isAny())) + .returns(() => { + if (updated && returnedOnce) { + return Promise.resolve(updated); + } + returnedOnce = true; + return Promise.resolve(result); + }); + } + + async function provideVariables(parent: Variable | undefined, kind = 1) { + const results: VariablesResult[] = []; + for await (const result of provider.provideVariables(notebook.object, parent, kind, 0, cancellationToken)) { + results.push(result); + } + return results; + } + + setup(() => { + varRequester = TypeMoq.Mock.ofType(); + notebook = TypeMoq.Mock.ofType(); + provider = new VariablesProvider(varRequester.object, () => notebook.object, executionEventEmitter.event); + }); + + test('provideVariables without parent should yield variables', async () => { + setVariablesForParent(undefined, [objectVariable]); + + const results = await provideVariables(undefined); + + assert.isNotEmpty(results); + assert.equal(results.length, 1); + assert.equal(results[0].variable.name, 'myObject'); + assert.equal(results[0].variable.expression, 'myObject'); + }); + + test('provideVariables with a parent should call get children correctly', async () => { + const listVariableItems = [0, 1, 2].map(createListItem); + setVariablesForParent(undefined, [objectVariable]); + + // pass each the result as the parent in the next call + const rootVariable = (await provideVariables(undefined))[0]; + setVariablesForParent(rootVariable.variable as IVariableDescription, [listVariable]); + const listResult = (await provideVariables(rootVariable!.variable))[0]; + setVariablesForParent(listResult.variable as IVariableDescription, listVariableItems); + const listItems = await provideVariables(listResult!.variable, 2); + + assert.equal(listResult.variable.name, 'myList'); + assert.equal(listResult.variable.expression, 'myObject.myList'); + assert.isNotEmpty(listItems); + assert.equal(listItems.length, 3); + listItems.forEach((item, index) => { + assert.equal(item.variable.name, index.toString()); + assert.equal(item.variable.value, `value${index}`); + assert.equal(item.variable.expression, `myObject.myList[${index}]`); + }); + }); + + test('All indexed variables should be returned when requested', async () => { + const listVariable: IVariableDescription = { + name: 'myList', + value: '[...]', + count: 6, + root: 'myList', + propertyChain: [], + }; + + setVariablesForParent(undefined, [listVariable]); + const rootVariable = (await provideVariables(undefined))[0]; + const firstPage = [0, 1, 2].map(createListItem); + const secondPage = [3, 4, 5].map(createListItem); + setVariablesForParent(rootVariable.variable as IVariableDescription, firstPage, undefined, 0); + setVariablesForParent(rootVariable.variable as IVariableDescription, secondPage, undefined, firstPage.length); + + const listItemResult = await provideVariables(rootVariable!.variable, 2); + + assert.equal(listItemResult.length, 6, 'full list of items should be returned'); + listItemResult.forEach((item, index) => { + assert.equal(item.variable.name, index.toString()); + assert.equal(item.variable.value, `value${index}`); + }); + }); + + test('Getting less indexed items than the specified count is handled', async () => { + const listVariable: IVariableDescription = { + name: 'myList', + value: '[...]', + count: 6, + root: 'myList', + propertyChain: [], + }; + + const firstPage = [0, 1, 2].map(createListItem); + const secondPage = [3, 4].map(createListItem); + setVariablesForParent(undefined, [listVariable]); + const rootVariable = (await provideVariables(undefined))[0]; + setVariablesForParent(rootVariable.variable as IVariableDescription, firstPage, undefined, 0); + setVariablesForParent(rootVariable.variable as IVariableDescription, secondPage, undefined, firstPage.length); + setVariablesForParent(rootVariable.variable as IVariableDescription, [], undefined, 5); + + const listItemResult = await provideVariables(rootVariable!.variable, 2); + + assert.equal(listItemResult.length, 5); + listItemResult.forEach((item, index) => { + assert.equal(item.variable.name, index.toString()); + assert.equal(item.variable.value, `value${index}`); + }); + }); + + test('Getting variables again with new execution count should get updated variables', async () => { + const intVariable: IVariableDescription = { + name: 'myInt', + value: '1', + root: '', + propertyChain: [], + }; + setVariablesForParent(undefined, [intVariable], [{ ...intVariable, value: '2' }]); + + const first = await provideVariables(undefined); + executionEventEmitter.fire(); + const second = await provideVariables(undefined); + + assert.equal(first.length, 1); + assert.equal(second.length, 1); + assert.equal(first[0].variable.value, '1'); + assert.equal(second[0].variable.value, '2'); + }); + + test('Getting variables again with same execution count should not make another call', async () => { + const intVariable: IVariableDescription = { + name: 'myInt', + value: '1', + root: '', + propertyChain: [], + }; + + setVariablesForParent(undefined, [intVariable]); + + const first = await provideVariables(undefined); + const second = await provideVariables(undefined); + + assert.equal(first.length, 1); + assert.equal(second.length, 1); + assert.equal(first[0].variable.value, '1'); + + varRequester.verify( + (x) => x.getAllVariableDescriptions(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), + TypeMoq.Times.once(), + ); + }); + + test('Cache pages of indexed children correctly', async () => { + const listVariable: IVariableDescription = { + name: 'myList', + value: '[...]', + count: 6, + root: 'myList', + propertyChain: [], + }; + + const firstPage = [0, 1, 2].map(createListItem); + const secondPage = [3, 4, 5].map(createListItem); + setVariablesForParent(undefined, [listVariable]); + const rootVariable = (await provideVariables(undefined))[0]; + setVariablesForParent(rootVariable.variable as IVariableDescription, firstPage, undefined, 0); + setVariablesForParent(rootVariable.variable as IVariableDescription, secondPage, undefined, firstPage.length); + + await provideVariables(rootVariable!.variable, 2); + + // once for the parent and once for each of the two pages of list items + varRequester.verify( + (x) => x.getAllVariableDescriptions(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), + TypeMoq.Times.exactly(3), + ); + + const listItemResult = await provideVariables(rootVariable!.variable, 2); + + assert.equal(listItemResult.length, 6, 'full list of items should be returned'); + listItemResult.forEach((item, index) => { + assert.equal(item.variable.name, index.toString()); + assert.equal(item.variable.value, `value${index}`); + }); + + // no extra calls for getting the children again + varRequester.verify( + (x) => x.getAllVariableDescriptions(TypeMoq.It.isAny(), TypeMoq.It.isAny(), TypeMoq.It.isAny()), + TypeMoq.Times.exactly(3), + ); + }); +}); diff --git a/src/test/serviceRegistry.ts b/src/test/serviceRegistry.ts index a175b3303223..9da8ec9a3fd3 100644 --- a/src/test/serviceRegistry.ts +++ b/src/test/serviceRegistry.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { Container } from 'inversify'; -import { anything, instance, mock, when } from 'ts-mockito'; +import { anything } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; import { Disposable, Memento } from 'vscode'; import { FileSystem } from '../client/common/platform/fileSystem'; @@ -53,6 +53,7 @@ import { MockMemento } from './mocks/mementos'; import { MockProcessService } from './mocks/proc'; import { MockProcess } from './mocks/process'; import { registerForIOC } from './pythonEnvironments/legacyIOC'; +import { createTypeMoq } from './mocks/helper'; export class IocContainer { // This may be set (before any registration happens) to indicate @@ -125,12 +126,10 @@ export class IocContainer { public registerProcessTypes(): void { processRegisterTypes(this.serviceManager); - const mockEnvironmentActivationService = mock(EnvironmentActivationService); - when(mockEnvironmentActivationService.getActivatedEnvironmentVariables(anything())).thenResolve(); - this.serviceManager.addSingletonInstance( - IEnvironmentActivationService, - instance(mockEnvironmentActivationService), - ); + const mockEnvironmentActivationService = createTypeMoq(); + mockEnvironmentActivationService + .setup((f) => f.getActivatedEnvironmentVariables(anything())) + .returns(() => Promise.resolve(undefined)); } public registerVariableTypes(): void { @@ -151,7 +150,7 @@ export class IocContainer { } public registerMockProcessTypes(): void { - const processServiceFactory = TypeMoq.Mock.ofType(); + const processServiceFactory = createTypeMoq(); // eslint-disable-next-line @typescript-eslint/no-explicit-any const processService = new MockProcessService(new ProcessService(process.env as any)); @@ -169,11 +168,13 @@ export class IocContainer { IEnvironmentActivationService, EnvironmentActivationService, ); - const mockEnvironmentActivationService = mock(EnvironmentActivationService); - when(mockEnvironmentActivationService.getActivatedEnvironmentVariables(anything())).thenResolve(); + const mockEnvironmentActivationService = createTypeMoq(); + mockEnvironmentActivationService + .setup((m) => m.getActivatedEnvironmentVariables(anything())) + .returns(() => Promise.resolve(undefined)); this.serviceManager.rebindInstance( IEnvironmentActivationService, - instance(mockEnvironmentActivationService), + mockEnvironmentActivationService.object, ); } diff --git a/src/test/smoke/common.ts b/src/test/smoke/common.ts index faf18ebd286e..5f5b691fb496 100644 --- a/src/test/smoke/common.ts +++ b/src/test/smoke/common.ts @@ -4,10 +4,10 @@ 'use strict'; import * as assert from 'assert'; -import * as fs from 'fs-extra'; import * as glob from 'glob'; import * as path from 'path'; import * as vscode from 'vscode'; +import * as fs from '../../client/common/platform/fs-paths'; import { JUPYTER_EXTENSION_ID } from '../../client/common/constants'; import { SMOKE_TEST_EXTENSIONS_DIR } from '../constants'; import { noop, sleep } from '../core'; @@ -25,7 +25,7 @@ export async function removeLanguageServerFiles(): Promise { } async function getLanguageServerFolders(): Promise { return new Promise((resolve, reject) => { - glob('languageServer.*', { cwd: SMOKE_TEST_EXTENSIONS_DIR }, (ex, matches) => { + glob.default('languageServer.*', { cwd: SMOKE_TEST_EXTENSIONS_DIR }, (ex, matches) => { if (ex) { reject(ex); } else { @@ -51,7 +51,7 @@ export async function openNotebook(file: string): Promise { assert.fail(`Something went wrong showing the text document: ${err}`); }); - assert(vscode.window.activeTextEditor, 'No active editor'); + assert.ok(vscode.window.activeTextEditor, 'No active editor'); // Make sure LS completes file loading and analysis. // In test mode it awaits for the completion before trying // to fetch data for completion, hover.etc. diff --git a/src/test/smoke/datascience.smoke.test.ts b/src/test/smoke/datascience.smoke.test.ts index 30298183c511..9f4421de4676 100644 --- a/src/test/smoke/datascience.smoke.test.ts +++ b/src/test/smoke/datascience.smoke.test.ts @@ -4,9 +4,9 @@ 'use strict'; import * as assert from 'assert'; -import * as fs from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; +import * as fs from '../../client/common/platform/fs-paths'; import { openFile, waitForCondition } from '../common'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../constants'; import { sleep } from '../core'; diff --git a/src/test/smoke/jedilsp.smoke.test.ts b/src/test/smoke/jedilsp.smoke.test.ts index e25d2bcdd1cc..a2087ff42085 100644 --- a/src/test/smoke/jedilsp.smoke.test.ts +++ b/src/test/smoke/jedilsp.smoke.test.ts @@ -3,9 +3,9 @@ 'use strict'; -import * as fs from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; +import * as fs from '../../client/common/platform/fs-paths'; import { openFile, waitForCondition } from '../common'; import { EXTENSION_ROOT_DIR_FOR_TESTS, IS_SMOKE_TEST } from '../constants'; diff --git a/src/test/smoke/runInTerminal.smoke.test.ts b/src/test/smoke/runInTerminal.smoke.test.ts index 43b53e4480e0..bd4c88e44e80 100644 --- a/src/test/smoke/runInTerminal.smoke.test.ts +++ b/src/test/smoke/runInTerminal.smoke.test.ts @@ -4,9 +4,9 @@ 'use strict'; import * as assert from 'assert'; -import * as fs from 'fs-extra'; import * as path from 'path'; import * as vscode from 'vscode'; +import * as fs from '../../client/common/platform/fs-paths'; import { openFile, waitForCondition } from '../common'; import { EXTENSION_ROOT_DIR_FOR_TESTS, IS_SMOKE_TEST } from '../constants'; import { closeActiveWindows, initialize, initializeTest } from '../initialize'; diff --git a/src/test/smoke/smartSend.smoke.test.ts b/src/test/smoke/smartSend.smoke.test.ts index 20ec70af9b5b..7f894df923ee 100644 --- a/src/test/smoke/smartSend.smoke.test.ts +++ b/src/test/smoke/smartSend.smoke.test.ts @@ -1,83 +1,86 @@ import * as vscode from 'vscode'; import * as path from 'path'; -import * as fs from 'fs-extra'; import { assert } from 'chai'; +import * as fs from '../../client/common/platform/fs-paths'; import { EXTENSION_ROOT_DIR_FOR_TESTS, IS_SMOKE_TEST } from '../constants'; import { closeActiveWindows, initialize, initializeTest } from '../initialize'; import { openFile, waitForCondition } from '../common'; -suite('Smoke Test: Run Smart Selection and Advance Cursor', () => { - suiteSetup(async function () { - if (!IS_SMOKE_TEST) { - return this.skip(); - } - await initialize(); - return undefined; - }); +// TODO: This test is being flaky for windows, need to investigate why only fails on windows +if (process.platform !== 'win32') { + suite('Smoke Test: Run Smart Selection and Advance Cursor', () => { + suiteSetup(async function () { + if (!IS_SMOKE_TEST) { + return this.skip(); + } + await initialize(); + return undefined; + }); - setup(initializeTest); - suiteTeardown(closeActiveWindows); - teardown(closeActiveWindows); + setup(initializeTest); + suiteTeardown(closeActiveWindows); + teardown(closeActiveWindows); - test('Smart Send', async () => { - const file = path.join( - EXTENSION_ROOT_DIR_FOR_TESTS, - 'src', - 'testMultiRootWkspc', - 'smokeTests', - 'create_delete_file.py', - ); - const outputFile = path.join( - EXTENSION_ROOT_DIR_FOR_TESTS, - 'src', - 'testMultiRootWkspc', - 'smokeTests', - 'smart_send_smoke.txt', - ); + test('Smart Send', async () => { + const file = path.join( + EXTENSION_ROOT_DIR_FOR_TESTS, + 'src', + 'testMultiRootWkspc', + 'smokeTests', + 'create_delete_file.py', + ); + const outputFile = path.join( + EXTENSION_ROOT_DIR_FOR_TESTS, + 'src', + 'testMultiRootWkspc', + 'smokeTests', + 'smart_send_smoke.txt', + ); - await fs.remove(outputFile); + await fs.remove(outputFile); - const textDocument = await openFile(file); + const textDocument = await openFile(file); - if (vscode.window.activeTextEditor) { - const myPos = new vscode.Position(0, 0); - vscode.window.activeTextEditor!.selections = [new vscode.Selection(myPos, myPos)]; - } - await vscode.commands - .executeCommand('python.execSelectionInTerminal', textDocument.uri) - .then(undefined, (err) => { - assert.fail(`Something went wrong running the Python file in the terminal: ${err}`); - }); + if (vscode.window.activeTextEditor) { + const myPos = new vscode.Position(0, 0); + vscode.window.activeTextEditor!.selections = [new vscode.Selection(myPos, myPos)]; + } + await vscode.commands + .executeCommand('python.execSelectionInTerminal', textDocument.uri) + .then(undefined, (err) => { + assert.fail(`Something went wrong running the Python file in the terminal: ${err}`); + }); - const checkIfFileHasBeenCreated = () => fs.pathExists(outputFile); - await waitForCondition(checkIfFileHasBeenCreated, 10_000, `"${outputFile}" file not created`); + const checkIfFileHasBeenCreated = () => fs.pathExists(outputFile); + await waitForCondition(checkIfFileHasBeenCreated, 10_000, `"${outputFile}" file not created`); - await vscode.commands - .executeCommand('python.execSelectionInTerminal', textDocument.uri) - .then(undefined, (err) => { - assert.fail(`Something went wrong running the Python file in the terminal: ${err}`); - }); - await vscode.commands - .executeCommand('python.execSelectionInTerminal', textDocument.uri) - .then(undefined, (err) => { - assert.fail(`Something went wrong running the Python file in the terminal: ${err}`); - }); + await vscode.commands + .executeCommand('python.execSelectionInTerminal', textDocument.uri) + .then(undefined, (err) => { + assert.fail(`Something went wrong running the Python file in the terminal: ${err}`); + }); + await vscode.commands + .executeCommand('python.execSelectionInTerminal', textDocument.uri) + .then(undefined, (err) => { + assert.fail(`Something went wrong running the Python file in the terminal: ${err}`); + }); - async function wait() { - return new Promise((resolve) => { - setTimeout(() => { - resolve(); - }, 10000); - }); - } + async function wait() { + return new Promise((resolve) => { + setTimeout(() => { + resolve(); + }, 10000); + }); + } - await wait(); + await wait(); - const deletedFile = !(await fs.pathExists(outputFile)); - if (deletedFile) { - assert.ok(true, `"${outputFile}" file has been deleted`); - } else { - assert.fail(`"${outputFile}" file still exists`); - } + const deletedFile = !(await fs.pathExists(outputFile)); + if (deletedFile) { + assert.ok(true, `"${outputFile}" file has been deleted`); + } else { + assert.fail(`"${outputFile}" file still exists`); + } + }); }); -}); +} diff --git a/src/test/smokeTest.ts b/src/test/smokeTest.ts index de66e7aba5f0..bcd70c0e3417 100644 --- a/src/test/smokeTest.ts +++ b/src/test/smokeTest.ts @@ -7,7 +7,7 @@ process.env.VSC_PYTHON_SMOKE_TEST = '1'; import { spawn } from 'child_process'; -import * as fs from 'fs-extra'; +import * as fs from '../client/common/platform/fs-paths'; import * as glob from 'glob'; import * as path from 'path'; import { unzip } from './common'; @@ -81,7 +81,7 @@ class TestRunner { private async extractLatestExtension(targetDir: string): Promise { const extensionFile = await new Promise((resolve, reject) => - glob('*.vsix', (ex, files) => (ex ? reject(ex) : resolve(files[0]))), + glob.default('*.vsix', (ex, files) => (ex ? reject(ex) : resolve(files[0]))), ); await unzip(extensionFile, targetDir); } diff --git a/src/test/standardTest.ts b/src/test/standardTest.ts index 0fe53437cf3d..00eb3d7cf8c4 100644 --- a/src/test/standardTest.ts +++ b/src/test/standardTest.ts @@ -1,5 +1,5 @@ import { spawnSync } from 'child_process'; -import * as fs from 'fs-extra'; +import * as fs from '../client/common/platform/fs-paths'; import * as os from 'os'; import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliPathFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; diff --git a/src/test/telemetry/index.unit.test.ts b/src/test/telemetry/index.unit.test.ts index e155ac0a2092..d8a6b72eedc6 100644 --- a/src/test/telemetry/index.unit.test.ts +++ b/src/test/telemetry/index.unit.test.ts @@ -5,7 +5,7 @@ import { expect } from 'chai'; import rewiremock from 'rewiremock'; import * as sinon from 'sinon'; -import * as fs from 'fs-extra'; +import * as fs from '../../client/common/platform/fs-paths'; import { _resetSharedProperties, diff --git a/src/test/tensorBoard/tensorBoardFileWatcher.test.ts b/src/test/tensorBoard/tensorBoardFileWatcher.test.ts index cd2692aabcfd..3ad9ada21bdb 100644 --- a/src/test/tensorBoard/tensorBoardFileWatcher.test.ts +++ b/src/test/tensorBoard/tensorBoardFileWatcher.test.ts @@ -1,7 +1,7 @@ import { assert } from 'chai'; -import * as fse from 'fs-extra'; import * as path from 'path'; import * as sinon from 'sinon'; +import * as fse from '../../client/common/platform/fs-paths'; import { IWorkspaceService } from '../../client/common/application/types'; import { IExperimentService } from '../../client/common/types'; import { TensorBoardFileWatcher } from '../../client/tensorBoard/tensorBoardFileWatcher'; diff --git a/src/test/terminals/codeExecution/helper.test.ts b/src/test/terminals/codeExecution/helper.test.ts index 6e2ea2a61061..ebadd153705e 100644 --- a/src/test/terminals/codeExecution/helper.test.ts +++ b/src/test/terminals/codeExecution/helper.test.ts @@ -4,11 +4,11 @@ 'use strict'; import { expect } from 'chai'; -import * as fs from 'fs-extra'; import * as path from 'path'; import { SemVer } from 'semver'; import * as TypeMoq from 'typemoq'; import { Position, Range, Selection, TextDocument, TextEditor, TextLine, Uri } from 'vscode'; +import * as fs from '../../../client/common/platform/fs-paths'; import { IActiveResourceService, IApplicationShell, @@ -112,7 +112,11 @@ suite('Terminal - Code Execution Helper', () => { activeResourceService.setup((a) => a.getActiveResource()).returns(() => resource); pythonSettings .setup((s) => s.REPL) - .returns(() => ({ enableREPLSmartSend: false, REPLSmartSend: false, sendToNativeREPL: false })); + .returns(() => ({ + enableREPLSmartSend: false, + REPLSmartSend: false, + sendToNativeREPL: false, + })); configurationService.setup((x) => x.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object); configurationService .setup((c) => c.getSettings(TypeMoq.It.isAny())) diff --git a/src/test/terminals/codeExecution/smartSend.test.ts b/src/test/terminals/codeExecution/smartSend.test.ts index c6f4ae195d16..f315bc004d4e 100644 --- a/src/test/terminals/codeExecution/smartSend.test.ts +++ b/src/test/terminals/codeExecution/smartSend.test.ts @@ -1,9 +1,9 @@ import * as TypeMoq from 'typemoq'; import * as path from 'path'; import { TextEditor, Selection, Position, TextDocument, Uri } from 'vscode'; -import * as fs from 'fs-extra'; import { SemVer } from 'semver'; import { assert, expect } from 'chai'; +import * as fs from '../../../client/common/platform/fs-paths'; import { IActiveResourceService, IApplicationShell, @@ -109,7 +109,11 @@ suite('REPL - Smart Send', () => { pythonSettings .setup((s) => s.REPL) - .returns(() => ({ enableREPLSmartSend: true, REPLSmartSend: true, sendToNativeREPL: false })); + .returns(() => ({ + enableREPLSmartSend: true, + REPLSmartSend: true, + sendToNativeREPL: false, + })); configurationService.setup((x) => x.getSettings(TypeMoq.It.isAny())).returns(() => pythonSettings.object); diff --git a/src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts b/src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts index 4f60adb3b931..4b5537f515d2 100644 --- a/src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts +++ b/src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts @@ -643,10 +643,10 @@ suite('Terminal - Code Execution', () => { terminalSettings.setup((t) => t.launchArgs).returns(() => terminalArgs); await executor.execute('cmd1'); - terminalService.verify(async (t) => t.sendText('cmd1'), TypeMoq.Times.once()); + terminalService.verify(async (t) => t.executeCommand('cmd1'), TypeMoq.Times.once()); await executor.execute('cmd2'); - terminalService.verify(async (t) => t.sendText('cmd2'), TypeMoq.Times.once()); + terminalService.verify(async (t) => t.executeCommand('cmd2'), TypeMoq.Times.once()); }); test('Ensure code is sent to the same terminal for a particular resource', async () => { @@ -668,10 +668,10 @@ suite('Terminal - Code Execution', () => { terminalSettings.setup((t) => t.launchArgs).returns(() => terminalArgs); await executor.execute('cmd1', resource); - terminalService.verify(async (t) => t.sendText('cmd1'), TypeMoq.Times.once()); + terminalService.verify(async (t) => t.executeCommand('cmd1'), TypeMoq.Times.once()); await executor.execute('cmd2', resource); - terminalService.verify(async (t) => t.sendText('cmd2'), TypeMoq.Times.once()); + terminalService.verify(async (t) => t.executeCommand('cmd2'), TypeMoq.Times.once()); }); }); }); diff --git a/src/test/terminals/serviceRegistry.unit.test.ts b/src/test/terminals/serviceRegistry.unit.test.ts index 8c2a0a69eae9..4f865cdedc0d 100644 --- a/src/test/terminals/serviceRegistry.unit.test.ts +++ b/src/test/terminals/serviceRegistry.unit.test.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -13,17 +14,17 @@ import { TerminalCodeExecutionProvider } from '../../client/terminals/codeExecut import { TerminalDeactivateService } from '../../client/terminals/envCollectionActivation/deactivateService'; import { TerminalIndicatorPrompt } from '../../client/terminals/envCollectionActivation/indicatorPrompt'; import { TerminalEnvVarCollectionService } from '../../client/terminals/envCollectionActivation/service'; -import { ShellIntegrationService } from '../../client/terminals/envCollectionActivation/shellIntegrationService'; import { registerTypes } from '../../client/terminals/serviceRegistry'; import { ICodeExecutionHelper, ICodeExecutionManager, ICodeExecutionService, - IShellIntegrationService, + IShellIntegrationDetectionService, ITerminalAutoActivation, ITerminalDeactivateService, ITerminalEnvVarCollectionService, } from '../../client/terminals/types'; +import { ShellIntegrationDetectionService } from '../../client/terminals/envCollectionActivation/shellIntegrationService'; suite('Terminal - Service Registry', () => { test('Ensure all services get registered', () => { @@ -38,14 +39,14 @@ suite('Terminal - Service Registry', () => { [ITerminalEnvVarCollectionService, TerminalEnvVarCollectionService], [IExtensionSingleActivationService, TerminalIndicatorPrompt], [ITerminalDeactivateService, TerminalDeactivateService], - [IShellIntegrationService, ShellIntegrationService], + [IShellIntegrationDetectionService, ShellIntegrationDetectionService], ].forEach((args) => { if (args.length === 2) { services .setup((s) => s.addSingleton( - typemoq.It.is((v) => args[0] === v), - typemoq.It.is((value) => args[1] === value), + typemoq.It.is((v: any) => args[0] === v), + typemoq.It.is((value: any) => args[1] === value), ), ) .verifiable(typemoq.Times.once()); @@ -53,8 +54,8 @@ suite('Terminal - Service Registry', () => { services .setup((s) => s.addSingleton( - typemoq.It.is((v) => args[0] === v), - typemoq.It.is((value) => args[1] === value), + typemoq.It.is((v: any) => args[0] === v), + typemoq.It.is((value: any) => args[1] === value), typemoq.It.isValue((args[2] as unknown) as string), ), @@ -65,8 +66,8 @@ suite('Terminal - Service Registry', () => { services .setup((s) => s.addBinding( - typemoq.It.is((v) => ITerminalEnvVarCollectionService === v), - typemoq.It.is((value) => IExtensionActivationService === value), + typemoq.It.is((v: any) => ITerminalEnvVarCollectionService === v), + typemoq.It.is((value: any) => IExtensionActivationService === value), ), ) .verifiable(typemoq.Times.once()); diff --git a/src/test/testBootstrap.ts b/src/test/testBootstrap.ts index 03f24a680d0d..ab902255203b 100644 --- a/src/test/testBootstrap.ts +++ b/src/test/testBootstrap.ts @@ -4,7 +4,7 @@ 'use strict'; import { ChildProcess, spawn, SpawnOptions } from 'child_process'; -import * as fs from 'fs-extra'; +import * as fs from '../client/common/platform/fs-paths'; import { AddressInfo, createServer, Server } from 'net'; import * as path from 'path'; import { EXTENSION_ROOT_DIR } from '../client/constants'; diff --git a/src/test/testRunner.ts b/src/test/testRunner.ts index 9dd9ead56e58..6187597a46a3 100644 --- a/src/test/testRunner.ts +++ b/src/test/testRunner.ts @@ -19,7 +19,7 @@ if (!tty.getWindowSize) { }; } -let mocha = new Mocha({ +let mocha = new Mocha.default({ ui: 'tdd', colors: true, }); @@ -40,7 +40,7 @@ export function configure(setupOptions: SetupOptions): void { } // Force Mocha to exit. (setupOptions as any).exit = true; - mocha = new Mocha(setupOptions); + mocha = new Mocha.default(setupOptions); } export async function run(): Promise { @@ -59,7 +59,7 @@ export async function run(): Promise { */ function initializationScript() { const ex = new Error('Failed to initialize Python extension for tests after 3 minutes'); - let timer: NodeJS.Timer | undefined; + let timer: NodeJS.Timeout | undefined; const failed = new Promise((_, reject) => { timer = setTimeout(() => reject(ex), MAX_EXTENSION_ACTIVATION_TIME); }); @@ -69,7 +69,7 @@ export async function run(): Promise { } // Run the tests. await new Promise((resolve, reject) => { - glob( + glob.default( `**/**.${testFilesGlob}.js`, { ignore: ['**/**.unit.test.js', '**/**.functional.test.js'], cwd: testsRoot }, (error, files) => { diff --git a/src/test/testing/common/debugLauncher.unit.test.ts b/src/test/testing/common/debugLauncher.unit.test.ts index bdcb7b63762c..e31579640c9a 100644 --- a/src/test/testing/common/debugLauncher.unit.test.ts +++ b/src/test/testing/common/debugLauncher.unit.test.ts @@ -8,7 +8,7 @@ import * as chaiAsPromised from 'chai-as-promised'; import * as path from 'path'; import * as sinon from 'sinon'; import * as TypeMoq from 'typemoq'; -import * as fs from 'fs-extra'; +import * as fs from '../../../client/common/platform/fs-paths'; import * as workspaceApis from '../../../client/common/vscodeApis/workspaceApis'; import { CancellationTokenSource, DebugConfiguration, DebugSession, Uri, WorkspaceFolder } from 'vscode'; import { IInvalidPythonPathInDebuggerService } from '../../../client/application/diagnostics/types'; @@ -32,7 +32,7 @@ import { IEnvironmentActivationService } from '../../../client/interpreter/activ import * as util from '../../../client/testing/testController/common/utils'; import { createDeferred } from '../../../client/common/utils/async'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('Unit Tests - Debug Launcher', () => { let serviceContainer: TypeMoq.IMock; diff --git a/src/test/testing/common/services/configSettingService.unit.test.ts b/src/test/testing/common/services/configSettingService.unit.test.ts index 92d66f021491..d369d7ead825 100644 --- a/src/test/testing/common/services/configSettingService.unit.test.ts +++ b/src/test/testing/common/services/configSettingService.unit.test.ts @@ -16,7 +16,7 @@ import { TestConfigSettingsService } from '../../../../client/testing/common/con import { ITestConfigSettingsService, UnitTestProduct } from '../../../../client/testing/common/types'; import { BufferedTestConfigSettingsService } from '../../../../client/testing/common/bufferedTestConfigSettingService'; -use(chaiPromise); +use(chaiPromise.default); const updateMethods: (keyof Omit)[] = [ 'updateTestArgs', diff --git a/src/test/testing/common/testingAdapter.test.ts b/src/test/testing/common/testingAdapter.test.ts index c01fed29bac7..d0dd5b02d283 100644 --- a/src/test/testing/common/testingAdapter.test.ts +++ b/src/test/testing/common/testingAdapter.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { TestController, TestRun, Uri } from 'vscode'; +import { TestController, TestRun, TestRunProfileKind, Uri } from 'vscode'; import * as typeMoq from 'typemoq'; import * as path from 'path'; import * as assert from 'assert'; @@ -21,6 +21,7 @@ import { PythonResultResolver } from '../../../client/testing/testController/com import { TestProvider } from '../../../client/testing/types'; import { PYTEST_PROVIDER, UNITTEST_PROVIDER } from '../../../client/testing/common/constants'; import { IEnvironmentVariablesProvider } from '../../../client/common/variables/types'; +import { createTypeMoq } from '../../mocks/helper'; suite('End to End Tests: test adapters', () => { let resultResolver: ITestResultResolver; @@ -70,6 +71,12 @@ suite('End to End Tests: test adapters', () => { 'testTestingRootWkspc', 'symlink_parent-folder', ); + const rootPathCoverageWorkspace = path.join( + EXTENSION_ROOT_DIR_FOR_TESTS, + 'src', + 'testTestingRootWkspc', + 'coverageWorkspace', + ); suiteSetup(async () => { serviceContainer = (await initialize()).serviceContainer; @@ -105,7 +112,7 @@ suite('End to End Tests: test adapters', () => { // create objects that were not injected - testOutputChannel = typeMoq.Mock.ofType(); + testOutputChannel = createTypeMoq(); testOutputChannel .setup((x) => x.append(typeMoq.It.isAny())) .callback((appendVal: any) => { @@ -198,7 +205,6 @@ suite('End to End Tests: test adapters', () => { assert.strictEqual(callCount, 1, 'Expected _resolveDiscovery to be called once'); }); }); - test('unittest discovery adapter large workspace', async () => { // result resolver and saved data for assertions let actualData: { @@ -561,7 +567,7 @@ suite('End to End Tests: test adapters', () => { .runTests( workspaceUri, ['test_simple.SimpleClass.test_simple_unit'], - false, + TestRunProfileKind.Run, testRun.object, pythonExecFactory, ) @@ -641,7 +647,7 @@ suite('End to End Tests: test adapters', () => { .runTests( workspaceUri, ['test_parameterized_subtest.NumbersTest.test_even'], - false, + TestRunProfileKind.Run, testRun.object, pythonExecFactory, ) @@ -716,7 +722,7 @@ suite('End to End Tests: test adapters', () => { .runTests( workspaceUri, [`${rootPathSmallWorkspace}/test_simple.py::test_a`], - false, + TestRunProfileKind.Run, testRun.object, pythonExecFactory, ) @@ -750,6 +756,118 @@ suite('End to End Tests: test adapters', () => { } }); }); + + test('Unittest execution with coverage, small workspace', async () => { + // result resolver and saved data for assertions + resultResolver = new PythonResultResolver(testController, unittestProvider, workspaceUri); + resultResolver._resolveCoverage = async (payload, _token?) => { + assert.strictEqual(payload.cwd, rootPathCoverageWorkspace, 'Expected cwd to be the workspace folder'); + assert.ok(payload.result, 'Expected results to be present'); + const simpleFileCov = payload.result[`${rootPathCoverageWorkspace}/even.py`]; + assert.ok(simpleFileCov, 'Expected test_simple.py coverage to be present'); + // since only one test was run, the other test in the same file will have missed coverage lines + assert.strictEqual(simpleFileCov.lines_covered.length, 3, 'Expected 1 line to be covered in even.py'); + assert.strictEqual(simpleFileCov.lines_missed.length, 1, 'Expected 3 lines to be missed in even.py'); + assert.strictEqual(simpleFileCov.executed_branches, 1, 'Expected 3 lines to be missed in even.py'); + assert.strictEqual(simpleFileCov.total_branches, 2, 'Expected 3 lines to be missed in even.py'); + return Promise.resolve(); + }; + + // set workspace to test workspace folder + workspaceUri = Uri.parse(rootPathCoverageWorkspace); + configService.getSettings(workspaceUri).testing.unittestArgs = ['-s', '.', '-p', '*test*.py']; + // run execution + const executionAdapter = new UnittestTestExecutionAdapter( + configService, + testOutputChannel.object, + resultResolver, + envVarsService, + ); + const testRun = typeMoq.Mock.ofType(); + testRun + .setup((t) => t.token) + .returns( + () => + ({ + onCancellationRequested: () => undefined, + } as any), + ); + let collectedOutput = ''; + testRun + .setup((t) => t.appendOutput(typeMoq.It.isAny())) + .callback((output: string) => { + collectedOutput += output; + traceLog('appendOutput was called with:', output); + }) + .returns(() => false); + await executionAdapter + .runTests( + workspaceUri, + ['test_even.TestNumbers.test_odd'], + TestRunProfileKind.Coverage, + testRun.object, + pythonExecFactory, + ) + .finally(() => { + assert.ok(collectedOutput, 'expect output to be collected'); + }); + }); + test('pytest coverage execution, small workspace', async () => { + // result resolver and saved data for assertions + resultResolver = new PythonResultResolver(testController, pytestProvider, workspaceUri); + resultResolver._resolveCoverage = async (payload, _runInstance?) => { + assert.strictEqual(payload.cwd, rootPathCoverageWorkspace, 'Expected cwd to be the workspace folder'); + assert.ok(payload.result, 'Expected results to be present'); + const simpleFileCov = payload.result[`${rootPathCoverageWorkspace}/even.py`]; + assert.ok(simpleFileCov, 'Expected test_simple.py coverage to be present'); + // since only one test was run, the other test in the same file will have missed coverage lines + assert.strictEqual(simpleFileCov.lines_covered.length, 3, 'Expected 1 line to be covered in even.py'); + assert.strictEqual(simpleFileCov.lines_missed.length, 1, 'Expected 3 lines to be missed in even.py'); + assert.strictEqual(simpleFileCov.executed_branches, 1, 'Expected 3 lines to be missed in even.py'); + assert.strictEqual(simpleFileCov.total_branches, 2, 'Expected 3 lines to be missed in even.py'); + + return Promise.resolve(); + }; + // set workspace to test workspace folder + workspaceUri = Uri.parse(rootPathCoverageWorkspace); + configService.getSettings(workspaceUri).testing.pytestArgs = []; + + // run pytest execution + const executionAdapter = new PytestTestExecutionAdapter( + configService, + testOutputChannel.object, + resultResolver, + envVarsService, + ); + const testRun = typeMoq.Mock.ofType(); + testRun + .setup((t) => t.token) + .returns( + () => + ({ + onCancellationRequested: () => undefined, + } as any), + ); + let collectedOutput = ''; + testRun + .setup((t) => t.appendOutput(typeMoq.It.isAny())) + .callback((output: string) => { + collectedOutput += output; + traceLog('appendOutput was called with:', output); + }) + .returns(() => false); + await executionAdapter + .runTests( + workspaceUri, + [`${rootPathCoverageWorkspace}/test_even.py::TestNumbers::test_odd`], + TestRunProfileKind.Coverage, + testRun.object, + pythonExecFactory, + ) + .then(() => { + assert.ok(collectedOutput, 'expect output to be collected'); + }); + }); test('pytest execution adapter large workspace', async () => { // result resolver and saved data for assertions resultResolver = new PythonResultResolver(testController, unittestProvider, workspaceUri); @@ -809,17 +927,19 @@ suite('End to End Tests: test adapters', () => { traceLog('appendOutput was called with:', output); }) .returns(() => false); - await executionAdapter.runTests(workspaceUri, testIds, false, testRun.object, pythonExecFactory).then(() => { - // verify that the _resolveExecution was called once per test - assert.strictEqual(callCount, 2000, 'Expected _resolveExecution to be called once'); - assert.strictEqual(failureOccurred, false, failureMsg); + await executionAdapter + .runTests(workspaceUri, testIds, TestRunProfileKind.Run, testRun.object, pythonExecFactory) + .then(() => { + // verify that the _resolveExecution was called once per test + assert.strictEqual(callCount, 2000, 'Expected _resolveExecution to be called once'); + assert.strictEqual(failureOccurred, false, failureMsg); - // verify output works for large repo - assert.ok( - collectedOutput.includes('test session starts'), - 'The test string does not contain the expected stdout output from pytest.', - ); - }); + // verify output works for large repo + assert.ok( + collectedOutput.includes('test session starts'), + 'The test string does not contain the expected stdout output from pytest.', + ); + }); }); test('unittest discovery adapter seg fault error handling', async () => { resultResolver = new PythonResultResolver(testController, unittestProvider, workspaceUri); @@ -1007,10 +1127,12 @@ suite('End to End Tests: test adapters', () => { onCancellationRequested: () => undefined, } as any), ); - await executionAdapter.runTests(workspaceUri, testIds, false, testRun.object, pythonExecFactory).finally(() => { - assert.strictEqual(callCount, 1, 'Expected _resolveExecution to be called once'); - assert.strictEqual(failureOccurred, false, failureMsg); - }); + await executionAdapter + .runTests(workspaceUri, testIds, TestRunProfileKind.Run, testRun.object, pythonExecFactory) + .finally(() => { + assert.strictEqual(callCount, 1, 'Expected _resolveExecution to be called once'); + assert.strictEqual(failureOccurred, false, failureMsg); + }); }); test('pytest execution adapter seg fault error handling', async () => { resultResolver = new PythonResultResolver(testController, pytestProvider, workspaceUri); @@ -1068,9 +1190,11 @@ suite('End to End Tests: test adapters', () => { onCancellationRequested: () => undefined, } as any), ); - await executionAdapter.runTests(workspaceUri, testIds, false, testRun.object, pythonExecFactory).finally(() => { - assert.strictEqual(callCount, 1, 'Expected _resolveExecution to be called once'); - assert.strictEqual(failureOccurred, false, failureMsg); - }); + await executionAdapter + .runTests(workspaceUri, testIds, TestRunProfileKind.Run, testRun.object, pythonExecFactory) + .finally(() => { + assert.strictEqual(callCount, 1, 'Expected _resolveExecution to be called once'); + assert.strictEqual(failureOccurred, false, failureMsg); + }); }); }); diff --git a/src/test/testing/configuration.unit.test.ts b/src/test/testing/configuration.unit.test.ts index abb57aac2309..6682abf019b8 100644 --- a/src/test/testing/configuration.unit.test.ts +++ b/src/test/testing/configuration.unit.test.ts @@ -250,6 +250,15 @@ suite('Unit Tests - ConfigurationService', () => { expect(selectedItem).to.be.equal(undefined, 'invalid value'); appShell.verifyAll(); }); + test('Correctly returns hasConfiguredTests', () => { + let enabled = false; + unitTestSettings.setup((u) => u.unittestEnabled).returns(() => false); + unitTestSettings.setup((u) => u.pytestEnabled).returns(() => enabled); + + expect(testConfigService.target.hasConfiguredTests(workspaceUri)).to.equal(false); + enabled = true; + expect(testConfigService.target.hasConfiguredTests(workspaceUri)).to.equal(true); + }); test('Prompt to enable a test if a test framework is not enabled', async () => { unitTestSettings.setup((u) => u.pytestEnabled).returns(() => false); unitTestSettings.setup((u) => u.unittestEnabled).returns(() => false); diff --git a/src/test/testing/configurationFactory.unit.test.ts b/src/test/testing/configurationFactory.unit.test.ts index 74f7dd0da19b..0813e3f4aae1 100644 --- a/src/test/testing/configurationFactory.unit.test.ts +++ b/src/test/testing/configurationFactory.unit.test.ts @@ -14,7 +14,7 @@ import { TestConfigurationManagerFactory } from '../../client/testing/configurat import * as pytest from '../../client/testing/configuration/pytest/testConfigurationManager'; import * as unittest from '../../client/testing/configuration/unittest/testConfigurationManager'; -use(chaiAsPromised); +use(chaiAsPromised.default); suite('Unit Tests - ConfigurationManagerFactory', () => { let factory: ITestConfigurationManagerFactory; diff --git a/src/test/testing/testController/pytest/pytestDiscoveryAdapter.unit.test.ts b/src/test/testing/testController/pytest/pytestDiscoveryAdapter.unit.test.ts index d1587f59bd2d..87b91f6ae2da 100644 --- a/src/test/testing/testController/pytest/pytestDiscoveryAdapter.unit.test.ts +++ b/src/test/testing/testController/pytest/pytestDiscoveryAdapter.unit.test.ts @@ -81,7 +81,7 @@ suite('pytest test discovery adapter', () => { .returns(() => { deferred2.resolve(); return { - proc: mockProc, + proc: mockProc as any, out: output, dispose: () => { /* no-body */ diff --git a/src/test/testing/testController/pytest/pytestExecutionAdapter.unit.test.ts b/src/test/testing/testController/pytest/pytestExecutionAdapter.unit.test.ts index b82a663cf86c..8ab701ad6f57 100644 --- a/src/test/testing/testController/pytest/pytestExecutionAdapter.unit.test.ts +++ b/src/test/testing/testController/pytest/pytestExecutionAdapter.unit.test.ts @@ -2,7 +2,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import * as assert from 'assert'; -import { TestRun, Uri } from 'vscode'; +import { TestRun, Uri, TestRunProfileKind } from 'vscode'; import * as typeMoq from 'typemoq'; import * as sinon from 'sinon'; import * as path from 'path'; @@ -33,7 +33,7 @@ suite('pytest test execution adapter', () => { (global as any).EXTENSION_ROOT_DIR = EXTENSION_ROOT_DIR; let myTestPath: string; let mockProc: MockChildProcess; - let utilsStartTestIdsNamedPipeStub: sinon.SinonStub; + let utilsWriteTestIdsFileStub: sinon.SinonStub; let utilsStartRunResultNamedPipeStub: sinon.SinonStub; setup(() => { configService = ({ @@ -55,7 +55,7 @@ suite('pytest test execution adapter', () => { .returns(() => { deferred4.resolve(); return { - proc: mockProc, + proc: mockProc as any, out: output, dispose: () => { /* no-body */ @@ -65,7 +65,7 @@ suite('pytest test execution adapter', () => { execFactory = typeMoq.Mock.ofType(); // added - utilsStartTestIdsNamedPipeStub = sinon.stub(util, 'startTestIdsNamedPipe'); + utilsWriteTestIdsFileStub = sinon.stub(util, 'writeTestIdsFile'); debugLauncher = typeMoq.Mock.ofType(); execFactory .setup((x) => x.createActivatedEnvironment(typeMoq.It.isAny())) @@ -95,7 +95,7 @@ suite('pytest test execution adapter', () => { teardown(() => { sinon.restore(); }); - test('startTestIdServer called with correct testIds', async () => { + test('WriteTestIdsFile called with correct testIds', async () => { const deferred2 = createDeferred(); const deferred3 = createDeferred(); execFactory = typeMoq.Mock.ofType(); @@ -105,7 +105,7 @@ suite('pytest test execution adapter', () => { deferred2.resolve(); return Promise.resolve(execService.object); }); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve({ name: 'mockName', @@ -121,7 +121,7 @@ suite('pytest test execution adapter', () => { adapter = new PytestTestExecutionAdapter(configService, outputChannel.object); const testIds = ['test1id', 'test2id']; - adapter.runTests(uri, testIds, false, testRun.object, execFactory.object); + adapter.runTests(uri, testIds, TestRunProfileKind.Run, testRun.object, execFactory.object); // add in await and trigger await deferred2.promise; @@ -129,7 +129,7 @@ suite('pytest test execution adapter', () => { mockProc.trigger('close'); // assert - sinon.assert.calledWithExactly(utilsStartTestIdsNamedPipeStub, testIds); + sinon.assert.calledWithExactly(utilsWriteTestIdsFileStub, testIds); }); test('pytest execution called with correct args', async () => { const deferred2 = createDeferred(); @@ -141,7 +141,7 @@ suite('pytest test execution adapter', () => { deferred2.resolve(); return Promise.resolve(execService.object); }); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve('testIdPipe-mockName'); }); @@ -150,7 +150,7 @@ suite('pytest test execution adapter', () => { const uri = Uri.file(myTestPath); const outputChannel = typeMoq.Mock.ofType(); adapter = new PytestTestExecutionAdapter(configService, outputChannel.object); - adapter.runTests(uri, [], false, testRun.object, execFactory.object); + adapter.runTests(uri, [], TestRunProfileKind.Run, testRun.object, execFactory.object); await deferred2.promise; await deferred3.promise; @@ -174,6 +174,7 @@ suite('pytest test execution adapter', () => { assert.equal(options.env?.PYTHONPATH, expectedExtraVariables.PYTHONPATH); assert.equal(options.env?.TEST_RUN_PIPE, expectedExtraVariables.TEST_RUN_PIPE); assert.equal(options.env?.RUN_TEST_IDS_PIPE, expectedExtraVariables.RUN_TEST_IDS_PIPE); + assert.equal(options.env?.COVERAGE_ENABLED, undefined); // coverage not enabled assert.equal(options.cwd, uri.fsPath); assert.equal(options.throwOnStdErr, true); return true; @@ -192,7 +193,7 @@ suite('pytest test execution adapter', () => { deferred2.resolve(); return Promise.resolve(execService.object); }); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve('testIdPipe-mockName'); }); @@ -208,7 +209,7 @@ suite('pytest test execution adapter', () => { const uri = Uri.file(myTestPath); const outputChannel = typeMoq.Mock.ofType(); adapter = new PytestTestExecutionAdapter(configService, outputChannel.object); - adapter.runTests(uri, [], false, testRun.object, execFactory.object); + adapter.runTests(uri, [], TestRunProfileKind.Run, testRun.object, execFactory.object); await deferred2.promise; await deferred3.promise; @@ -243,7 +244,7 @@ suite('pytest test execution adapter', () => { test('Debug launched correctly for pytest', async () => { const deferred3 = createDeferred(); const deferredEOT = createDeferred(); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve('testIdPipe-mockName'); }); @@ -267,7 +268,14 @@ suite('pytest test execution adapter', () => { const uri = Uri.file(myTestPath); const outputChannel = typeMoq.Mock.ofType(); adapter = new PytestTestExecutionAdapter(configService, outputChannel.object); - await adapter.runTests(uri, [], true, testRun.object, execFactory.object, debugLauncher.object); + await adapter.runTests( + uri, + [], + TestRunProfileKind.Debug, + testRun.object, + execFactory.object, + debugLauncher.object, + ); await deferred3.promise; debugLauncher.verify( (x) => @@ -286,4 +294,46 @@ suite('pytest test execution adapter', () => { typeMoq.Times.once(), ); }); + test('pytest execution with coverage turns on correctly', async () => { + const deferred2 = createDeferred(); + const deferred3 = createDeferred(); + execFactory = typeMoq.Mock.ofType(); + execFactory + .setup((x) => x.createActivatedEnvironment(typeMoq.It.isAny())) + .returns(() => { + deferred2.resolve(); + return Promise.resolve(execService.object); + }); + utilsWriteTestIdsFileStub.callsFake(() => { + deferred3.resolve(); + return Promise.resolve('testIdPipe-mockName'); + }); + const testRun = typeMoq.Mock.ofType(); + testRun.setup((t) => t.token).returns(() => ({ onCancellationRequested: () => undefined } as any)); + const uri = Uri.file(myTestPath); + const outputChannel = typeMoq.Mock.ofType(); + adapter = new PytestTestExecutionAdapter(configService, outputChannel.object); + adapter.runTests(uri, [], TestRunProfileKind.Coverage, testRun.object, execFactory.object); + + await deferred2.promise; + await deferred3.promise; + await deferred4.promise; + mockProc.trigger('close'); + + const pathToPythonFiles = path.join(EXTENSION_ROOT_DIR, 'python_files'); + const pathToPythonScript = path.join(pathToPythonFiles, 'vscode_pytest', 'run_pytest_script.py'); + const rootDirArg = `--rootdir=${myTestPath}`; + const expectedArgs = [pathToPythonScript, rootDirArg]; + execService.verify( + (x) => + x.execObservable( + expectedArgs, + typeMoq.It.is((options) => { + assert.equal(options.env?.COVERAGE_ENABLED, 'True'); + return true; + }), + ), + typeMoq.Times.once(), + ); + }); }); diff --git a/src/test/testing/testController/testCancellationRunAdapters.unit.test.ts b/src/test/testing/testController/testCancellationRunAdapters.unit.test.ts index bddf057d4f0c..41f2fe257681 100644 --- a/src/test/testing/testController/testCancellationRunAdapters.unit.test.ts +++ b/src/test/testing/testController/testCancellationRunAdapters.unit.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -import { CancellationTokenSource, TestRun, Uri } from 'vscode'; +import { CancellationTokenSource, TestRun, TestRunProfileKind, Uri } from 'vscode'; import * as typeMoq from 'typemoq'; import * as sinon from 'sinon'; import * as path from 'path'; @@ -28,7 +28,7 @@ suite('Execution Flow Run Adapters', () => { (global as any).EXTENSION_ROOT_DIR = EXTENSION_ROOT_DIR; let myTestPath: string; let mockProc: MockChildProcess; - let utilsStartTestIdsNamedPipe: sinon.SinonStub; + let utilsWriteTestIdsFileStub: sinon.SinonStub; let utilsStartRunResultNamedPipe: sinon.SinonStub; let serverDisposeStub: sinon.SinonStub; @@ -47,7 +47,7 @@ suite('Execution Flow Run Adapters', () => { execFactoryStub = typeMoq.Mock.ofType(); // mocked utility functions that handle pipe related functions - utilsStartTestIdsNamedPipe = sinon.stub(util, 'startTestIdsNamedPipe'); + utilsWriteTestIdsFileStub = sinon.stub(util, 'writeTestIdsFile'); utilsStartRunResultNamedPipe = sinon.stub(util, 'startRunResultNamedPipe'); serverDisposeStub = sinon.stub(); @@ -72,7 +72,7 @@ suite('Execution Flow Run Adapters', () => { .returns(() => { cancellationToken.cancel(); return { - proc: mockProc, + proc: mockProc as any, out: typeMoq.Mock.ofType>>().object, dispose: () => { /* no-body */ @@ -87,7 +87,7 @@ suite('Execution Flow Run Adapters', () => { // test ids named pipe mocking const deferredStartTestIdsNamedPipe = createDeferred(); - utilsStartTestIdsNamedPipe.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferredStartTestIdsNamedPipe.resolve(); return Promise.resolve('named-pipe'); }); @@ -126,7 +126,7 @@ suite('Execution Flow Run Adapters', () => { await testAdapter.runTests( Uri.file(myTestPath), [], - false, + TestRunProfileKind.Run, testRunMock.object, execFactoryStub.object, debugLauncher.object, @@ -150,7 +150,7 @@ suite('Execution Flow Run Adapters', () => { .returns(() => { cancellationToken.cancel(); return { - proc: mockProc, + proc: mockProc as any, out: typeMoq.Mock.ofType>>().object, dispose: () => { /* no-body */ @@ -165,7 +165,7 @@ suite('Execution Flow Run Adapters', () => { // test ids named pipe mocking const deferredStartTestIdsNamedPipe = createDeferred(); - utilsStartTestIdsNamedPipe.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferredStartTestIdsNamedPipe.resolve(); return Promise.resolve('named-pipe'); }); @@ -220,7 +220,7 @@ suite('Execution Flow Run Adapters', () => { await testAdapter.runTests( Uri.file(myTestPath), [], - true, + TestRunProfileKind.Debug, testRunMock.object, execFactoryStub.object, debugLauncher.object, diff --git a/src/test/testing/testController/unittest/testDiscoveryAdapter.unit.test.ts b/src/test/testing/testController/unittest/testDiscoveryAdapter.unit.test.ts index 7c700fdd4ec4..e0442197467f 100644 --- a/src/test/testing/testController/unittest/testDiscoveryAdapter.unit.test.ts +++ b/src/test/testing/testController/unittest/testDiscoveryAdapter.unit.test.ts @@ -54,7 +54,7 @@ suite('Unittest test discovery adapter', () => { deferred.resolve(); console.log('execObservable is returning'); return { - proc: mockProc, + proc: mockProc as any, out: output, dispose: () => { /* no-body */ diff --git a/src/test/testing/testController/unittest/testExecutionAdapter.unit.test.ts b/src/test/testing/testController/unittest/testExecutionAdapter.unit.test.ts index 6d4757eff8d1..88292c2254d8 100644 --- a/src/test/testing/testController/unittest/testExecutionAdapter.unit.test.ts +++ b/src/test/testing/testController/unittest/testExecutionAdapter.unit.test.ts @@ -2,7 +2,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import * as assert from 'assert'; -import { TestRun, Uri } from 'vscode'; +import { TestRun, TestRunProfileKind, Uri } from 'vscode'; import * as typeMoq from 'typemoq'; import * as sinon from 'sinon'; import * as path from 'path'; @@ -33,7 +33,7 @@ suite('Unittest test execution adapter', () => { (global as any).EXTENSION_ROOT_DIR = EXTENSION_ROOT_DIR; let myTestPath: string; let mockProc: MockChildProcess; - let utilsStartTestIdsNamedPipeStub: sinon.SinonStub; + let utilsWriteTestIdsFileStub: sinon.SinonStub; let utilsStartRunResultNamedPipeStub: sinon.SinonStub; setup(() => { configService = ({ @@ -55,7 +55,7 @@ suite('Unittest test execution adapter', () => { .returns(() => { deferred4.resolve(); return { - proc: mockProc, + proc: mockProc as any, out: output, dispose: () => { /* no-body */ @@ -65,7 +65,7 @@ suite('Unittest test execution adapter', () => { execFactory = typeMoq.Mock.ofType(); // added - utilsStartTestIdsNamedPipeStub = sinon.stub(util, 'startTestIdsNamedPipe'); + utilsWriteTestIdsFileStub = sinon.stub(util, 'writeTestIdsFile'); debugLauncher = typeMoq.Mock.ofType(); execFactory .setup((x) => x.createActivatedEnvironment(typeMoq.It.isAny())) @@ -105,7 +105,7 @@ suite('Unittest test execution adapter', () => { deferred2.resolve(); return Promise.resolve(execService.object); }); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve({ name: 'mockName', @@ -121,7 +121,7 @@ suite('Unittest test execution adapter', () => { adapter = new UnittestTestExecutionAdapter(configService, outputChannel.object); const testIds = ['test1id', 'test2id']; - adapter.runTests(uri, testIds, false, testRun.object, execFactory.object); + adapter.runTests(uri, testIds, TestRunProfileKind.Run, testRun.object, execFactory.object); // add in await and trigger await deferred2.promise; @@ -129,7 +129,7 @@ suite('Unittest test execution adapter', () => { mockProc.trigger('close'); // assert - sinon.assert.calledWithExactly(utilsStartTestIdsNamedPipeStub, testIds); + sinon.assert.calledWithExactly(utilsWriteTestIdsFileStub, testIds); }); test('unittest execution called with correct args', async () => { const deferred2 = createDeferred(); @@ -141,7 +141,7 @@ suite('Unittest test execution adapter', () => { deferred2.resolve(); return Promise.resolve(execService.object); }); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve('testIdPipe-mockName'); }); @@ -150,7 +150,7 @@ suite('Unittest test execution adapter', () => { const uri = Uri.file(myTestPath); const outputChannel = typeMoq.Mock.ofType(); adapter = new UnittestTestExecutionAdapter(configService, outputChannel.object); - adapter.runTests(uri, [], false, testRun.object, execFactory.object); + adapter.runTests(uri, [], TestRunProfileKind.Run, testRun.object, execFactory.object); await deferred2.promise; await deferred3.promise; @@ -173,6 +173,7 @@ suite('Unittest test execution adapter', () => { assert.equal(options.env?.PYTHONPATH, expectedExtraVariables.PYTHONPATH); assert.equal(options.env?.TEST_RUN_PIPE, expectedExtraVariables.TEST_RUN_PIPE); assert.equal(options.env?.RUN_TEST_IDS_PIPE, expectedExtraVariables.RUN_TEST_IDS_PIPE); + assert.equal(options.env?.COVERAGE_ENABLED, undefined); // coverage not enabled assert.equal(options.cwd, uri.fsPath); assert.equal(options.throwOnStdErr, true); return true; @@ -191,7 +192,7 @@ suite('Unittest test execution adapter', () => { deferred2.resolve(); return Promise.resolve(execService.object); }); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve('testIdPipe-mockName'); }); @@ -207,7 +208,7 @@ suite('Unittest test execution adapter', () => { const uri = Uri.file(myTestPath); const outputChannel = typeMoq.Mock.ofType(); adapter = new UnittestTestExecutionAdapter(configService, outputChannel.object); - adapter.runTests(uri, [], false, testRun.object, execFactory.object); + adapter.runTests(uri, [], TestRunProfileKind.Run, testRun.object, execFactory.object); await deferred2.promise; await deferred3.promise; @@ -242,7 +243,7 @@ suite('Unittest test execution adapter', () => { test('Debug launched correctly for unittest', async () => { const deferred3 = createDeferred(); const deferredEOT = createDeferred(); - utilsStartTestIdsNamedPipeStub.callsFake(() => { + utilsWriteTestIdsFileStub.callsFake(() => { deferred3.resolve(); return Promise.resolve('testIdPipe-mockName'); }); @@ -266,7 +267,14 @@ suite('Unittest test execution adapter', () => { const uri = Uri.file(myTestPath); const outputChannel = typeMoq.Mock.ofType(); adapter = new UnittestTestExecutionAdapter(configService, outputChannel.object); - await adapter.runTests(uri, [], true, testRun.object, execFactory.object, debugLauncher.object); + await adapter.runTests( + uri, + [], + TestRunProfileKind.Debug, + testRun.object, + execFactory.object, + debugLauncher.object, + ); await deferred3.promise; debugLauncher.verify( (x) => @@ -284,4 +292,45 @@ suite('Unittest test execution adapter', () => { typeMoq.Times.once(), ); }); + test('unittest execution with coverage turned on correctly', async () => { + const deferred2 = createDeferred(); + const deferred3 = createDeferred(); + execFactory = typeMoq.Mock.ofType(); + execFactory + .setup((x) => x.createActivatedEnvironment(typeMoq.It.isAny())) + .returns(() => { + deferred2.resolve(); + return Promise.resolve(execService.object); + }); + utilsWriteTestIdsFileStub.callsFake(() => { + deferred3.resolve(); + return Promise.resolve('testIdPipe-mockName'); + }); + const testRun = typeMoq.Mock.ofType(); + testRun.setup((t) => t.token).returns(() => ({ onCancellationRequested: () => undefined } as any)); + const uri = Uri.file(myTestPath); + const outputChannel = typeMoq.Mock.ofType(); + adapter = new UnittestTestExecutionAdapter(configService, outputChannel.object); + adapter.runTests(uri, [], TestRunProfileKind.Coverage, testRun.object, execFactory.object); + + await deferred2.promise; + await deferred3.promise; + await deferred4.promise; + mockProc.trigger('close'); + + const pathToPythonFiles = path.join(EXTENSION_ROOT_DIR, 'python_files'); + const pathToExecutionScript = path.join(pathToPythonFiles, 'unittestadapter', 'execution.py'); + const expectedArgs = [pathToExecutionScript, '--udiscovery', '.']; + execService.verify( + (x) => + x.execObservable( + expectedArgs, + typeMoq.It.is((options) => { + assert.equal(options.env?.COVERAGE_ENABLED, uri.fsPath); + return true; + }), + ), + typeMoq.Times.once(), + ); + }); }); diff --git a/src/test/utils/fs.ts b/src/test/utils/fs.ts index 2b78184d13e2..13f46bd38f82 100644 --- a/src/test/utils/fs.ts +++ b/src/test/utils/fs.ts @@ -3,7 +3,7 @@ 'use strict'; -import * as fsapi from 'fs-extra'; +import * as fsapi from '../../client/common/platform/fs-paths'; import * as path from 'path'; import * as tmp from 'tmp'; import { parseTree } from '../../client/common/utils/text'; diff --git a/src/test/utils/vscode.ts b/src/test/utils/vscode.ts index a10ceb2e8881..4364c507c36f 100644 --- a/src/test/utils/vscode.ts +++ b/src/test/utils/vscode.ts @@ -1,5 +1,5 @@ import * as path from 'path'; -import * as fs from 'fs-extra'; +import * as fs from '../../client/common/platform/fs-paths'; import { EXTENSION_ROOT_DIR } from '../../client/common/constants'; const insidersVersion = /^\^(\d+\.\d+\.\d+)-(insider|\d{8})$/; diff --git a/src/test/vscode-mock.ts b/src/test/vscode-mock.ts index ec44d302d063..0605b1718166 100644 --- a/src/test/vscode-mock.ts +++ b/src/test/vscode-mock.ts @@ -113,7 +113,7 @@ mockedVSCode.ViewColumn = vscodeMocks.vscMockExtHostedTypes.ViewColumn; mockedVSCode.TextEditorRevealType = vscodeMocks.vscMockExtHostedTypes.TextEditorRevealType; mockedVSCode.TreeItem = vscodeMocks.vscMockExtHostedTypes.TreeItem; mockedVSCode.TreeItemCollapsibleState = vscodeMocks.vscMockExtHostedTypes.TreeItemCollapsibleState; -mockedVSCode.CodeActionKind = vscodeMocks.CodeActionKind; +(mockedVSCode as any).CodeActionKind = vscodeMocks.CodeActionKind; mockedVSCode.CompletionItemKind = vscodeMocks.CompletionItemKind; mockedVSCode.CompletionTriggerKind = vscodeMocks.CompletionTriggerKind; mockedVSCode.DebugAdapterExecutable = vscodeMocks.DebugAdapterExecutable; @@ -133,3 +133,4 @@ mockedVSCode.LogLevel = vscodeMocks.LogLevel; (mockedVSCode as any).ProtocolTypeHierarchyItem = vscodeMocks.vscMockExtHostedTypes.ProtocolTypeHierarchyItem; (mockedVSCode as any).CancellationError = vscodeMocks.vscMockExtHostedTypes.CancellationError; (mockedVSCode as any).LSPCancellationError = vscodeMocks.vscMockExtHostedTypes.LSPCancellationError; +mockedVSCode.TestRunProfileKind = vscodeMocks.TestRunProfileKind; diff --git a/src/testTestingRootWkspc/coverageWorkspace/even.py b/src/testTestingRootWkspc/coverageWorkspace/even.py new file mode 100644 index 000000000000..e395b024ecc5 --- /dev/null +++ b/src/testTestingRootWkspc/coverageWorkspace/even.py @@ -0,0 +1,8 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + + +def number_type(n: int) -> str: + if n % 2 == 0: + return "even" + return "odd" diff --git a/src/testTestingRootWkspc/coverageWorkspace/test_even.py b/src/testTestingRootWkspc/coverageWorkspace/test_even.py new file mode 100644 index 000000000000..ca78535860f4 --- /dev/null +++ b/src/testTestingRootWkspc/coverageWorkspace/test_even.py @@ -0,0 +1,11 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +from even import number_type +import unittest + + +class TestNumbers(unittest.TestCase): + def test_odd(self): + n = number_type(1) + assert n == "odd" diff --git a/tsconfig.browser.json b/tsconfig.browser.json index ca00a4e2b193..e34f3f6788ac 100644 --- a/tsconfig.browser.json +++ b/tsconfig.browser.json @@ -2,6 +2,7 @@ "extends": "./tsconfig.json", "include": [ "./src/client/browser", - "./types" + "./types", + "./typings/*.d.ts", ] } diff --git a/tsconfig.json b/tsconfig.json index 797bf6736f15..718d4ab4aad1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,8 @@ "paths": { "*": ["types/*"] }, - "module": "commonjs", + "module": "NodeNext", + "moduleResolution": "NodeNext", "target": "es2018", "outDir": "out", "lib": [ diff --git a/types/vscode.proposed.envCollectionWorkspace.d.ts b/types/vscode.proposed.envCollectionWorkspace.d.ts index 494929ba15eb..a03a639b5ee2 100644 --- a/types/vscode.proposed.envCollectionWorkspace.d.ts +++ b/types/vscode.proposed.envCollectionWorkspace.d.ts @@ -27,11 +27,4 @@ declare module 'vscode' { */ getScoped(scope: EnvironmentVariableScope): EnvironmentVariableCollection; } - - export type EnvironmentVariableScope = { - /** - * Any specific workspace folder to get collection for. If unspecified, collection applicable to all workspace folders is returned. - */ - workspaceFolder?: WorkspaceFolder; - }; } diff --git a/types/vscode.proposed.envShellEvent.d.ts b/types/vscode.proposed.envShellEvent.d.ts deleted file mode 100644 index 8fed971ef711..000000000000 --- a/types/vscode.proposed.envShellEvent.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -declare module 'vscode' { - - // See https://github.com/microsoft/vscode/issues/160694 - export namespace env { - - /** - * An {@link Event} which fires when the default shell changes. - */ - export const onDidChangeShell: Event; - } -} diff --git a/types/vscode.proposed.notebookReplDocument.d.ts b/types/vscode.proposed.notebookReplDocument.d.ts new file mode 100644 index 000000000000..d78450e944a8 --- /dev/null +++ b/types/vscode.proposed.notebookReplDocument.d.ts @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +declare module 'vscode' { + + export interface NotebookDocumentShowOptions { + /** + * The notebook should be opened in a REPL editor, + * where the last cell of the notebook is an input box and the other cells are the read-only history. + * When the value is a string, it will be used as the label for the editor tab. + */ + readonly asRepl?: boolean | string | { + /** + * The label to be used for the editor tab. + */ + readonly label: string; + }; + } + + export interface NotebookEditor { + /** + * Information about the REPL editor if the notebook was opened as a repl. + */ + replOptions?: { + /** + * The index where new cells should be appended. + */ + appendIndex: number; + }; + } +} diff --git a/types/vscode.proposed.notebookVariableProvider.d.ts b/types/vscode.proposed.notebookVariableProvider.d.ts new file mode 100644 index 000000000000..4fac96c45f0a --- /dev/null +++ b/types/vscode.proposed.notebookVariableProvider.d.ts @@ -0,0 +1,55 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +declare module 'vscode' { + + export interface NotebookController { + /** Set this to attach a variable provider to this controller. */ + variableProvider?: NotebookVariableProvider; + } + + export enum NotebookVariablesRequestKind { + Named = 1, + Indexed = 2 + } + + interface VariablesResult { + variable: Variable; + hasNamedChildren: boolean; + indexedChildrenCount: number; + } + + interface NotebookVariableProvider { + onDidChangeVariables: Event; + + /** When parent is undefined, this is requesting global Variables. When a variable is passed, it's requesting child props of that Variable. */ + provideVariables(notebook: NotebookDocument, parent: Variable | undefined, kind: NotebookVariablesRequestKind, start: number, token: CancellationToken): AsyncIterable; + } + + interface Variable { + /** The variable's name. */ + name: string; + + /** The variable's value. + This can be a multi-line text, e.g. for a function the body of a function. + For structured variables (which do not have a simple value), it is recommended to provide a one-line representation of the structured object. + This helps to identify the structured object in the collapsed state when its children are not yet visible. + An empty string can be used if no value should be shown in the UI. + */ + value: string; + + /** The code that represents how the variable would be accessed in the runtime environment */ + expression?: string; + + /** The type of the variable's value */ + type?: string; + + /** The interfaces or contracts that the type satisfies */ + interfaces?: string[]; + + /** The language of the variable's value */ + language?: string; + } + +} diff --git a/types/vscode.proposed.terminalShellIntegration.d.ts b/types/vscode.proposed.terminalShellIntegration.d.ts deleted file mode 100644 index 5ff18b60ca72..000000000000 --- a/types/vscode.proposed.terminalShellIntegration.d.ts +++ /dev/null @@ -1,312 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. - *--------------------------------------------------------------------------------------------*/ - -declare module 'vscode' { - // https://github.com/microsoft/vscode/issues/145234 - - /** - * A command that was executed in a terminal. - */ - export interface TerminalShellExecution { - /** - * The command line that was executed. The {@link TerminalShellExecutionCommandLineConfidence confidence} - * of this value depends on the specific shell's shell integration implementation. This - * value may become more accurate after {@link window.onDidEndTerminalShellExecution} is - * fired. - * - * @example - * // Log the details of the command line on start and end - * window.onDidStartTerminalShellExecution(event => { - * const commandLine = event.execution.commandLine; - * console.log(`Command started\n${summarizeCommandLine(commandLine)}`); - * }); - * window.onDidEndTerminalShellExecution(event => { - * const commandLine = event.execution.commandLine; - * console.log(`Command ended\n${summarizeCommandLine(commandLine)}`); - * }); - * function summarizeCommandLine(commandLine: TerminalShellExecutionCommandLine) { - * return [ - * ` Command line: ${command.ommandLine.value}`, - * ` Confidence: ${command.ommandLine.confidence}`, - * ` Trusted: ${command.ommandLine.isTrusted} - * ].join('\n'); - * } - */ - readonly commandLine: TerminalShellExecutionCommandLine; - - /** - * The working directory that was reported by the shell when this command executed. This - * {@link Uri} may represent a file on another machine (eg. ssh into another machine). This - * requires the shell integration to support working directory reporting. - */ - readonly cwd: Uri | undefined; - - /** - * Creates a stream of raw data (including escape sequences) that is written to the - * terminal. This will only include data that was written after `readData` was called for - * the first time, ie. you must call `readData` immediately after the command is executed - * via {@link TerminalShellIntegration.executeCommand} or - * {@link window.onDidStartTerminalShellExecution} to not miss any data. - * - * @example - * // Log all data written to the terminal for a command - * const command = term.shellIntegration.executeCommand({ commandLine: 'echo "Hello world"' }); - * const stream = command.read(); - * for await (const data of stream) { - * console.log(data); - * } - */ - read(): AsyncIterable; - } - - /** - * A command line that was executed in a terminal. - */ - export interface TerminalShellExecutionCommandLine { - /** - * The full command line that was executed, including both the command and its arguments. - */ - readonly value: string; - - /** - * Whether the command line value came from a trusted source and is therefore safe to - * execute without user additional confirmation, such as a notification that asks "Do you - * want to execute (command)?". This verification is likely only needed if you are going to - * execute the command again. - * - * This is `true` only when the command line was reported explicitly by the shell - * integration script (ie. {@link TerminalShellExecutionCommandLineConfidence.High high confidence}) - * and it used a nonce for verification. - */ - readonly isTrusted: boolean; - - /** - * The confidence of the command line value which is determined by how the value was - * obtained. This depends upon the implementation of the shell integration script. - */ - readonly confidence: TerminalShellExecutionCommandLineConfidence; - } - - /** - * The confidence of a {@link TerminalShellExecutionCommandLine} value. - */ - enum TerminalShellExecutionCommandLineConfidence { - /** - * The command line value confidence is low. This means that the value was read from the - * terminal buffer using markers reported by the shell integration script. Additionally one - * of the following conditions will be met: - * - * - The command started on the very left-most column which is unusual, or - * - The command is multi-line which is more difficult to accurately detect due to line - * continuation characters and right prompts. - * - Command line markers were not reported by the shell integration script. - */ - Low = 0, - - /** - * The command line value confidence is medium. This means that the value was read from the - * terminal buffer using markers reported by the shell integration script. The command is - * single-line and does not start on the very left-most column (which is unusual). - */ - Medium = 1, - - /** - * The command line value confidence is high. This means that the value was explicitly sent - * from the shell integration script or the command was executed via the - * {@link TerminalShellIntegration.executeCommand} API. - */ - High = 2, - } - - export interface Terminal { - /** - * An object that contains [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration)-powered - * features for the terminal. This will always be `undefined` immediately after the terminal - * is created. Listen to {@link window.onDidActivateTerminalShellIntegration} to be notified - * when shell integration is activated for a terminal. - * - * Note that this object may remain undefined if shell integation never activates. For - * example Command Prompt does not support shell integration and a user's shell setup could - * conflict with the automatic shell integration activation. - */ - readonly shellIntegration: TerminalShellIntegration | undefined; - } - - /** - * [Shell integration](https://code.visualstudio.com/docs/terminal/shell-integration)-powered capabilities owned by a terminal. - */ - export interface TerminalShellIntegration { - /** - * The current working directory of the terminal. This {@link Uri} may represent a file on - * another machine (eg. ssh into another machine). This requires the shell integration to - * support working directory reporting. - */ - readonly cwd: Uri | undefined; - - /** - * Execute a command, sending ^C as necessary to interrupt any running command if needed. - * - * @param commandLine The command line to execute, this is the exact text that will be sent - * to the terminal. - * - * @example - * // Execute a command in a terminal immediately after being created - * const myTerm = window.createTerminal(); - * window.onDidActivateTerminalShellIntegration(async ({ terminal, shellIntegration }) => { - * if (terminal === myTerm) { - * const command = shellIntegration.executeCommand('echo "Hello world"'); - * const code = await command.exitCode; - * console.log(`Command exited with code ${code}`); - * } - * })); - * // Fallback to sendText if there is no shell integration within 3 seconds of launching - * setTimeout(() => { - * if (!myTerm.shellIntegration) { - * myTerm.sendText('echo "Hello world"'); - * // Without shell integration, we can't know when the command has finished or what the - * // exit code was. - * } - * }, 3000); - * - * @example - * // Send command to terminal that has been alive for a while - * const commandLine = 'echo "Hello world"'; - * if (term.shellIntegration) { - * const command = term.shellIntegration.executeCommand({ commandLine }); - * const code = await command.exitCode; - * console.log(`Command exited with code ${code}`); - * } else { - * term.sendText(commandLine); - * // Without shell integration, we can't know when the command has finished or what the - * // exit code was. - * } - */ - executeCommand(commandLine: string): TerminalShellExecution; - - /** - * Execute a command, sending ^C as necessary to interrupt any running command if needed. - * - * *Note* This is not guaranteed to work as [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) - * must be activated. Check whether {@link TerminalShellExecution.exitCode} is rejected to - * verify whether it was successful. - * - * @param command A command to run. - * @param args Arguments to launch the executable with which will be automatically escaped - * based on the executable type. - * - * @example - * // Execute a command in a terminal immediately after being created - * const myTerm = window.createTerminal(); - * window.onDidActivateTerminalShellIntegration(async ({ terminal, shellIntegration }) => { - * if (terminal === myTerm) { - * const command = shellIntegration.executeCommand({ - * command: 'echo', - * args: ['Hello world'] - * }); - * const code = await command.exitCode; - * console.log(`Command exited with code ${code}`); - * } - * })); - * // Fallback to sendText if there is no shell integration within 3 seconds of launching - * setTimeout(() => { - * if (!myTerm.shellIntegration) { - * myTerm.sendText('echo "Hello world"'); - * // Without shell integration, we can't know when the command has finished or what the - * // exit code was. - * } - * }, 3000); - * - * @example - * // Send command to terminal that has been alive for a while - * const commandLine = 'echo "Hello world"'; - * if (term.shellIntegration) { - * const command = term.shellIntegration.executeCommand({ - * command: 'echo', - * args: ['Hello world'] - * }); - * const code = await command.exitCode; - * console.log(`Command exited with code ${code}`); - * } else { - * term.sendText(commandLine); - * // Without shell integration, we can't know when the command has finished or what the - * // exit code was. - * } - */ - executeCommand(executable: string, args: string[]): TerminalShellExecution; - } - - export interface TerminalShellIntegrationChangeEvent { - /** - * The terminal that shell integration has been activated in. - */ - readonly terminal: Terminal; - - /** - * The shell integration object. - */ - readonly shellIntegration: TerminalShellIntegration; - } - - export interface TerminalShellExecutionStartEvent { - /** - * The terminal that shell integration has been activated in. - */ - readonly terminal: Terminal; - - /** - * The shell integration object. - */ - readonly shellIntegration: TerminalShellIntegration; - - /** - * The terminal shell execution that has ended. - */ - readonly execution: TerminalShellExecution; - } - - export interface TerminalShellExecutionEndEvent { - /** - * The terminal that shell integration has been activated in. - */ - readonly terminal: Terminal; - - /** - * The shell integration object. - */ - readonly shellIntegration: TerminalShellIntegration; - - /** - * The terminal shell execution that has ended. - */ - readonly execution: TerminalShellExecution; - - /** - * The exit code reported by the shell. `undefined` means the shell did not report an exit - * code or the shell reported a command started before the command finished. - */ - readonly exitCode: number | undefined; - } - - export namespace window { - /** - * Fires when shell integration activates or one of its properties changes in a terminal. - */ - export const onDidChangeTerminalShellIntegration: Event; - - /** - * This will be fired when a terminal command is started. This event will fire only when - * [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) is - * activated for the terminal. - */ - export const onDidStartTerminalShellExecution: Event; - - /** - * This will be fired when a terminal command is ended. This event will fire only when - * [shell integration](https://code.visualstudio.com/docs/terminal/shell-integration) is - * activated for the terminal. - */ - export const onDidEndTerminalShellExecution: Event; - } -}