From f7680af9eb64ebe922b7a87b7cbfb6200ec7c9e0 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 7 Jun 2024 20:12:49 +0100 Subject: [PATCH 01/48] code: Update changelog --- code/changes/831.misc.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 code/changes/831.misc.md diff --git a/code/changes/831.misc.md b/code/changes/831.misc.md new file mode 100644 index 00000000..27c8ac9e --- /dev/null +++ b/code/changes/831.misc.md @@ -0,0 +1 @@ +Update bundled version of the language server to `v1.0.0b4` From fc31c01ce9954a652fabe6ff9fdd08e861492b41 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 23:22:41 +0100 Subject: [PATCH 02/48] [pre-commit.ci] pre-commit autoupdate (#836) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.7 → v0.4.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.7...v0.4.8) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Carney --- .pre-commit-config.yaml | 2 +- lib/esbonio/hatch.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d3c347e6..5fb4f3d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.7 + rev: v0.4.8 hooks: - id: ruff args: [--fix] diff --git a/lib/esbonio/hatch.toml b/lib/esbonio/hatch.toml index ea7b68c8..48c3285a 100644 --- a/lib/esbonio/hatch.toml +++ b/lib/esbonio/hatch.toml @@ -35,4 +35,4 @@ value = ["tests/sphinx-agent", "tests/e2e"] [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" -dependencies = ["ruff==0.4.7"] +dependencies = ["ruff==0.4.8"] From e1a416e862fbcf9e81ba2a100bee94b009958a8f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:15:42 +0000 Subject: [PATCH 03/48] build(deps): bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/lsp-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lsp-release.yml b/.github/workflows/lsp-release.yml index 8a5b3160..4190beec 100644 --- a/.github/workflows/lsp-release.yml +++ b/.github/workflows/lsp-release.yml @@ -14,7 +14,7 @@ jobs: lsp: ${{steps.check-lsp.outputs.build}} code: ${{steps.check-code.outputs.build}} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 From 222c23401690adb002ed90fc88f0b405bca246cf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 14:54:08 +0000 Subject: [PATCH 04/48] build(deps-dev): bump esbuild from 0.21.4 to 0.21.5 in /code Bumps [esbuild](https://github.com/evanw/esbuild) from 0.21.4 to 0.21.5. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.21.4...v0.21.5) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 386 ++++++++++++++++++++--------------------- code/package.json | 2 +- 2 files changed, 194 insertions(+), 194 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index a6d20317..b082e5b6 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -1,12 +1,12 @@ { "name": "esbonio", - "version": "0.94.0", + "version": "0.94.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "esbonio", - "version": "0.94.0", + "version": "0.94.2", "license": "MIT", "dependencies": { "@vscode/python-extension": "^1.0.5", @@ -18,7 +18,7 @@ "@types/node": "^18", "@types/vscode": "1.78.0", "@vscode/vsce": "^2.26.1", - "esbuild": "^0.21.4", + "esbuild": "^0.21.5", "ovsx": "^0.9.1", "typescript": "^5.4.5" }, @@ -235,9 +235,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.4.tgz", - "integrity": "sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "cpu": [ "ppc64" ], @@ -251,9 +251,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.4.tgz", - "integrity": "sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "cpu": [ "arm" ], @@ -267,9 +267,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.4.tgz", - "integrity": "sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "cpu": [ "arm64" ], @@ -283,9 +283,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.4.tgz", - "integrity": "sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "cpu": [ "x64" ], @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.4.tgz", - "integrity": "sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "cpu": [ "arm64" ], @@ -315,9 +315,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.4.tgz", - "integrity": "sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "cpu": [ "x64" ], @@ -331,9 +331,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.4.tgz", - "integrity": "sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "cpu": [ "arm64" ], @@ -347,9 +347,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.4.tgz", - "integrity": "sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "cpu": [ "x64" ], @@ -363,9 +363,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.4.tgz", - "integrity": "sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "cpu": [ "arm" ], @@ -379,9 +379,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.4.tgz", - "integrity": "sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "cpu": [ "arm64" ], @@ -395,9 +395,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.4.tgz", - "integrity": "sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "cpu": [ "ia32" ], @@ -411,9 +411,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.4.tgz", - "integrity": "sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "cpu": [ "loong64" ], @@ -427,9 +427,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.4.tgz", - "integrity": "sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "cpu": [ "mips64el" ], @@ -443,9 +443,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.4.tgz", - "integrity": "sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "cpu": [ "ppc64" ], @@ -459,9 +459,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.4.tgz", - "integrity": "sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "cpu": [ "riscv64" ], @@ -475,9 +475,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.4.tgz", - "integrity": "sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "cpu": [ "s390x" ], @@ -491,9 +491,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.4.tgz", - "integrity": "sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "cpu": [ "x64" ], @@ -507,9 +507,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.4.tgz", - "integrity": "sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "cpu": [ "x64" ], @@ -523,9 +523,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.4.tgz", - "integrity": "sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "cpu": [ "x64" ], @@ -539,9 +539,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.4.tgz", - "integrity": "sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "cpu": [ "x64" ], @@ -555,9 +555,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.4.tgz", - "integrity": "sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "cpu": [ "arm64" ], @@ -571,9 +571,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.4.tgz", - "integrity": "sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "cpu": [ "ia32" ], @@ -587,9 +587,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.4.tgz", - "integrity": "sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "cpu": [ "x64" ], @@ -1248,9 +1248,9 @@ } }, "node_modules/esbuild": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.4.tgz", - "integrity": "sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "hasInstallScript": true, "bin": { @@ -1260,29 +1260,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.4", - "@esbuild/android-arm": "0.21.4", - "@esbuild/android-arm64": "0.21.4", - "@esbuild/android-x64": "0.21.4", - "@esbuild/darwin-arm64": "0.21.4", - "@esbuild/darwin-x64": "0.21.4", - "@esbuild/freebsd-arm64": "0.21.4", - "@esbuild/freebsd-x64": "0.21.4", - "@esbuild/linux-arm": "0.21.4", - "@esbuild/linux-arm64": "0.21.4", - "@esbuild/linux-ia32": "0.21.4", - "@esbuild/linux-loong64": "0.21.4", - "@esbuild/linux-mips64el": "0.21.4", - "@esbuild/linux-ppc64": "0.21.4", - "@esbuild/linux-riscv64": "0.21.4", - "@esbuild/linux-s390x": "0.21.4", - "@esbuild/linux-x64": "0.21.4", - "@esbuild/netbsd-x64": "0.21.4", - "@esbuild/openbsd-x64": "0.21.4", - "@esbuild/sunos-x64": "0.21.4", - "@esbuild/win32-arm64": "0.21.4", - "@esbuild/win32-ia32": "0.21.4", - "@esbuild/win32-x64": "0.21.4" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "node_modules/escape-string-regexp": { @@ -2940,163 +2940,163 @@ } }, "@esbuild/aix-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.4.tgz", - "integrity": "sha512-Zrm+B33R4LWPLjDEVnEqt2+SLTATlru1q/xYKVn8oVTbiRBGmK2VIMoIYGJDGyftnGaC788IuzGFAlb7IQ0Y8A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", "dev": true, "optional": true }, "@esbuild/android-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.4.tgz", - "integrity": "sha512-E7H/yTd8kGQfY4z9t3nRPk/hrhaCajfA3YSQSBrst8B+3uTcgsi8N+ZWYCaeIDsiVs6m65JPCaQN/DxBRclF3A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.4.tgz", - "integrity": "sha512-fYFnz+ObClJ3dNiITySBUx+oNalYUT18/AryMxfovLkYWbutXsct3Wz2ZWAcGGppp+RVVX5FiXeLYGi97umisA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.4.tgz", - "integrity": "sha512-mDqmlge3hFbEPbCWxp4fM6hqq7aZfLEHZAKGP9viq9wMUBVQx202aDIfc3l+d2cKhUJM741VrCXEzRFhPDKH3Q==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.4.tgz", - "integrity": "sha512-72eaIrDZDSiWqpmCzVaBD58c8ea8cw/U0fq/PPOTqE3c53D0xVMRt2ooIABZ6/wj99Y+h4ksT/+I+srCDLU9TA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.4.tgz", - "integrity": "sha512-uBsuwRMehGmw1JC7Vecu/upOjTsMhgahmDkWhGLWxIgUn2x/Y4tIwUZngsmVb6XyPSTXJYS4YiASKPcm9Zitag==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.4.tgz", - "integrity": "sha512-8JfuSC6YMSAEIZIWNL3GtdUT5NhUA/CMUCpZdDRolUXNAXEE/Vbpe6qlGLpfThtY5NwXq8Hi4nJy4YfPh+TwAg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.4.tgz", - "integrity": "sha512-8d9y9eQhxv4ef7JmXny7591P/PYsDFc4+STaxC1GBv0tMyCdyWfXu2jBuqRsyhY8uL2HU8uPyscgE2KxCY9imQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.4.tgz", - "integrity": "sha512-2rqFFefpYmpMs+FWjkzSgXg5vViocqpq5a1PSRgT0AvSgxoXmGF17qfGAzKedg6wAwyM7UltrKVo9kxaJLMF/g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.4.tgz", - "integrity": "sha512-/GLD2orjNU50v9PcxNpYZi+y8dJ7e7/LhQukN3S4jNDXCKkyyiyAz9zDw3siZ7Eh1tRcnCHAo/WcqKMzmi4eMQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.4.tgz", - "integrity": "sha512-pNftBl7m/tFG3t2m/tSjuYeWIffzwAZT9m08+9DPLizxVOsUl8DdFzn9HvJrTQwe3wvJnwTdl92AonY36w/25g==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.4.tgz", - "integrity": "sha512-cSD2gzCK5LuVX+hszzXQzlWya6c7hilO71L9h4KHwqI4qeqZ57bAtkgcC2YioXjsbfAv4lPn3qe3b00Zt+jIfQ==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.4.tgz", - "integrity": "sha512-qtzAd3BJh7UdbiXCrg6npWLYU0YpufsV9XlufKhMhYMJGJCdfX/G6+PNd0+v877X1JG5VmjBLUiFB0o8EUSicA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.4.tgz", - "integrity": "sha512-yB8AYzOTaL0D5+2a4xEy7OVvbcypvDR05MsB/VVPVA7nL4hc5w5Dyd/ddnayStDgJE59fAgNEOdLhBxjfx5+dg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.4.tgz", - "integrity": "sha512-Y5AgOuVzPjQdgU59ramLoqSSiXddu7F3F+LI5hYy/d1UHN7K5oLzYBDZe23QmQJ9PIVUXwOdKJ/jZahPdxzm9w==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.4.tgz", - "integrity": "sha512-Iqc/l/FFwtt8FoTK9riYv9zQNms7B8u+vAI/rxKuN10HgQIXaPzKZc479lZ0x6+vKVQbu55GdpYpeNWzjOhgbA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.4.tgz", - "integrity": "sha512-Td9jv782UMAFsuLZINfUpoF5mZIbAj+jv1YVtE58rFtfvoKRiKSkRGQfHTgKamLVT/fO7203bHa3wU122V/Bdg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.4.tgz", - "integrity": "sha512-Awn38oSXxsPMQxaV0Ipb7W/gxZtk5Tx3+W+rAPdZkyEhQ6968r9NvtkjhnhbEgWXYbgV+JEONJ6PcdBS+nlcpA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.4.tgz", - "integrity": "sha512-IsUmQeCY0aU374R82fxIPu6vkOybWIMc3hVGZ3ChRwL9hA1TwY+tS0lgFWV5+F1+1ssuvvXt3HFqe8roCip8Hg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.4.tgz", - "integrity": "sha512-hsKhgZ4teLUaDA6FG/QIu2q0rI6I36tZVfM4DBZv3BG0mkMIdEnMbhc4xwLvLJSS22uWmaVkFkqWgIS0gPIm+A==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.4.tgz", - "integrity": "sha512-UUfMgMoXPoA/bvGUNfUBFLCh0gt9dxZYIx9W4rfJr7+hKe5jxxHmfOK8YSH4qsHLLN4Ck8JZ+v7Q5fIm1huErg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.4.tgz", - "integrity": "sha512-yIxbspZb5kGCAHWm8dexALQ9en1IYDfErzjSEq1KzXFniHv019VT3mNtTK7t8qdy4TwT6QYHI9sEZabONHg+aw==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.4.tgz", - "integrity": "sha512-sywLRD3UK/qRJt0oBwdpYLBibk7KiRfbswmWRDabuncQYSlf8aLEEUor/oP6KRz8KEG+HoiVLBhPRD5JWjS8Sg==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", "dev": true, "optional": true }, @@ -3595,34 +3595,34 @@ "dev": true }, "esbuild": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.4.tgz", - "integrity": "sha512-sFMcNNrj+Q0ZDolrp5pDhH0nRPN9hLIM3fRPwgbLYJeSHHgnXSnbV3xYgSVuOeLWH9c73VwmEverVzupIv5xuA==", + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", "dev": true, "requires": { - "@esbuild/aix-ppc64": "0.21.4", - "@esbuild/android-arm": "0.21.4", - "@esbuild/android-arm64": "0.21.4", - "@esbuild/android-x64": "0.21.4", - "@esbuild/darwin-arm64": "0.21.4", - "@esbuild/darwin-x64": "0.21.4", - "@esbuild/freebsd-arm64": "0.21.4", - "@esbuild/freebsd-x64": "0.21.4", - "@esbuild/linux-arm": "0.21.4", - "@esbuild/linux-arm64": "0.21.4", - "@esbuild/linux-ia32": "0.21.4", - "@esbuild/linux-loong64": "0.21.4", - "@esbuild/linux-mips64el": "0.21.4", - "@esbuild/linux-ppc64": "0.21.4", - "@esbuild/linux-riscv64": "0.21.4", - "@esbuild/linux-s390x": "0.21.4", - "@esbuild/linux-x64": "0.21.4", - "@esbuild/netbsd-x64": "0.21.4", - "@esbuild/openbsd-x64": "0.21.4", - "@esbuild/sunos-x64": "0.21.4", - "@esbuild/win32-arm64": "0.21.4", - "@esbuild/win32-ia32": "0.21.4", - "@esbuild/win32-x64": "0.21.4" + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" } }, "escape-string-regexp": { diff --git a/code/package.json b/code/package.json index 9aa67a07..8a8c28d2 100644 --- a/code/package.json +++ b/code/package.json @@ -39,7 +39,7 @@ "@types/node": "^18", "@types/vscode": "1.78.0", "@vscode/vsce": "^2.26.1", - "esbuild": "^0.21.4", + "esbuild": "^0.21.5", "ovsx": "^0.9.1", "typescript": "^5.4.5" }, From aad1429439557dc703f00ab0da582b65b5da3edc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:33:38 +0000 Subject: [PATCH 05/48] build(deps-dev): bump @vscode/vsce from 2.26.1 to 2.27.0 in /code Bumps [@vscode/vsce](https://github.com/Microsoft/vsce) from 2.26.1 to 2.27.0. - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v2.26.1...v2.27.0) --- updated-dependencies: - dependency-name: "@vscode/vsce" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 231 +++++++++++++++++++++++++++++++++++++++-- code/package.json | 2 +- 2 files changed, 225 insertions(+), 8 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index b082e5b6..6ae6be4f 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -17,7 +17,7 @@ "@types/glob": "^8.1.0", "@types/node": "^18", "@types/vscode": "1.78.0", - "@vscode/vsce": "^2.26.1", + "@vscode/vsce": "^2.27.0", "esbuild": "^0.21.5", "ovsx": "^0.9.1", "typescript": "^5.4.5" @@ -640,12 +640,13 @@ } }, "node_modules/@vscode/vsce": { - "version": "2.26.1", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.26.1.tgz", - "integrity": "sha512-QOG6Ht7V93nhwcBxPWcG33UK0qDGEoJdg0xtVeaTN27W6PGdMJUJGTPhB/sNHUIFKwvwzv/zMAHvDgMNXbcwlA==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.27.0.tgz", + "integrity": "sha512-FFUMBVSyyjjJpWszwqk7d4U3YllY8FdWslbUDMRki1x4ZjA3Z0hmRMfypWrjP9sptbSR9nyPFU4uqjhy2qRB/w==", "dev": true, "dependencies": { "@azure/identity": "^4.1.0", + "@vscode/vsce-sign": "^2.0.0", "azure-devops-node-api": "^12.5.0", "chalk": "^2.4.2", "cheerio": "^1.0.0-rc.9", @@ -679,6 +680,141 @@ "keytar": "^7.7.0" } }, + "node_modules/@vscode/vsce-sign": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign/-/vsce-sign-2.0.4.tgz", + "integrity": "sha512-0uL32egStKYfy60IqnynAChMTbL0oqpqk0Ew0YHiIb+fayuGZWADuIPHWUcY1GCnAA+VgchOPDMxnc2R3XGWEA==", + "dev": true, + "hasInstallScript": true, + "optionalDependencies": { + "@vscode/vsce-sign-alpine-arm64": "2.0.2", + "@vscode/vsce-sign-alpine-x64": "2.0.2", + "@vscode/vsce-sign-darwin-arm64": "2.0.2", + "@vscode/vsce-sign-darwin-x64": "2.0.2", + "@vscode/vsce-sign-linux-arm": "2.0.2", + "@vscode/vsce-sign-linux-arm64": "2.0.2", + "@vscode/vsce-sign-linux-x64": "2.0.2", + "@vscode/vsce-sign-win32-arm64": "2.0.2", + "@vscode/vsce-sign-win32-x64": "2.0.2" + } + }, + "node_modules/@vscode/vsce-sign-alpine-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.2.tgz", + "integrity": "sha512-E80YvqhtZCLUv3YAf9+tIbbqoinWLCO/B3j03yQPbjT3ZIHCliKZlsy1peNc4XNZ5uIb87Jn0HWx/ZbPXviuAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "alpine" + ] + }, + "node_modules/@vscode/vsce-sign-alpine-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.2.tgz", + "integrity": "sha512-n1WC15MSMvTaeJ5KjWCzo0nzjydwxLyoHiMJHu1Ov0VWTZiddasmOQHekA47tFRycnt4FsQrlkSCTdgHppn6bw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "alpine" + ] + }, + "node_modules/@vscode/vsce-sign-darwin-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.2.tgz", + "integrity": "sha512-rz8F4pMcxPj8fjKAJIfkUT8ycG9CjIp888VY/6pq6cuI2qEzQ0+b5p3xb74CJnBbSC0p2eRVoe+WgNCAxCLtzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@vscode/vsce-sign-darwin-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.2.tgz", + "integrity": "sha512-MCjPrQ5MY/QVoZ6n0D92jcRb7eYvxAujG/AH2yM6lI0BspvJQxp0o9s5oiAM9r32r9tkLpiy5s2icsbwefAQIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@vscode/vsce-sign-linux-arm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.2.tgz", + "integrity": "sha512-Fkb5jpbfhZKVw3xwR6t7WYfwKZktVGNXdg1m08uEx1anO0oUPUkoQRsNm4QniL3hmfw0ijg00YA6TrxCRkPVOQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@vscode/vsce-sign-linux-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.2.tgz", + "integrity": "sha512-Ybeu7cA6+/koxszsORXX0OJk9N0GgfHq70Wqi4vv2iJCZvBrOWwcIrxKjvFtwyDgdeQzgPheH5nhLVl5eQy7WA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@vscode/vsce-sign-linux-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.2.tgz", + "integrity": "sha512-NsPPFVtLaTlVJKOiTnO8Cl78LZNWy0Q8iAg+LlBiCDEgC12Gt4WXOSs2pmcIjDYzj2kY4NwdeN1mBTaujYZaPg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@vscode/vsce-sign-win32-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.2.tgz", + "integrity": "sha512-wPs848ymZ3Ny+Y1Qlyi7mcT6VSigG89FWQnp2qRYCyMhdJxOpA4lDwxzlpL8fG6xC8GjQjGDkwbkWUcCobvksQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@vscode/vsce-sign-win32-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.2.tgz", + "integrity": "sha512-pAiRN6qSAhDM5SVOIxgx+2xnoVUePHbRNC7OD2aOR3WltTKxxF25OfpK8h8UQ7A0BuRkSgREbB59DBlFk4iAeg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", @@ -3134,12 +3270,13 @@ "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==" }, "@vscode/vsce": { - "version": "2.26.1", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.26.1.tgz", - "integrity": "sha512-QOG6Ht7V93nhwcBxPWcG33UK0qDGEoJdg0xtVeaTN27W6PGdMJUJGTPhB/sNHUIFKwvwzv/zMAHvDgMNXbcwlA==", + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.27.0.tgz", + "integrity": "sha512-FFUMBVSyyjjJpWszwqk7d4U3YllY8FdWslbUDMRki1x4ZjA3Z0hmRMfypWrjP9sptbSR9nyPFU4uqjhy2qRB/w==", "dev": true, "requires": { "@azure/identity": "^4.1.0", + "@vscode/vsce-sign": "^2.0.0", "azure-devops-node-api": "^12.5.0", "chalk": "^2.4.2", "cheerio": "^1.0.0-rc.9", @@ -3165,6 +3302,86 @@ "yazl": "^2.2.2" } }, + "@vscode/vsce-sign": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign/-/vsce-sign-2.0.4.tgz", + "integrity": "sha512-0uL32egStKYfy60IqnynAChMTbL0oqpqk0Ew0YHiIb+fayuGZWADuIPHWUcY1GCnAA+VgchOPDMxnc2R3XGWEA==", + "dev": true, + "requires": { + "@vscode/vsce-sign-alpine-arm64": "2.0.2", + "@vscode/vsce-sign-alpine-x64": "2.0.2", + "@vscode/vsce-sign-darwin-arm64": "2.0.2", + "@vscode/vsce-sign-darwin-x64": "2.0.2", + "@vscode/vsce-sign-linux-arm": "2.0.2", + "@vscode/vsce-sign-linux-arm64": "2.0.2", + "@vscode/vsce-sign-linux-x64": "2.0.2", + "@vscode/vsce-sign-win32-arm64": "2.0.2", + "@vscode/vsce-sign-win32-x64": "2.0.2" + } + }, + "@vscode/vsce-sign-alpine-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-arm64/-/vsce-sign-alpine-arm64-2.0.2.tgz", + "integrity": "sha512-E80YvqhtZCLUv3YAf9+tIbbqoinWLCO/B3j03yQPbjT3ZIHCliKZlsy1peNc4XNZ5uIb87Jn0HWx/ZbPXviuAQ==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-alpine-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-alpine-x64/-/vsce-sign-alpine-x64-2.0.2.tgz", + "integrity": "sha512-n1WC15MSMvTaeJ5KjWCzo0nzjydwxLyoHiMJHu1Ov0VWTZiddasmOQHekA47tFRycnt4FsQrlkSCTdgHppn6bw==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-darwin-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-arm64/-/vsce-sign-darwin-arm64-2.0.2.tgz", + "integrity": "sha512-rz8F4pMcxPj8fjKAJIfkUT8ycG9CjIp888VY/6pq6cuI2qEzQ0+b5p3xb74CJnBbSC0p2eRVoe+WgNCAxCLtzQ==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-darwin-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-darwin-x64/-/vsce-sign-darwin-x64-2.0.2.tgz", + "integrity": "sha512-MCjPrQ5MY/QVoZ6n0D92jcRb7eYvxAujG/AH2yM6lI0BspvJQxp0o9s5oiAM9r32r9tkLpiy5s2icsbwefAQIw==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-linux-arm": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm/-/vsce-sign-linux-arm-2.0.2.tgz", + "integrity": "sha512-Fkb5jpbfhZKVw3xwR6t7WYfwKZktVGNXdg1m08uEx1anO0oUPUkoQRsNm4QniL3hmfw0ijg00YA6TrxCRkPVOQ==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-linux-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-arm64/-/vsce-sign-linux-arm64-2.0.2.tgz", + "integrity": "sha512-Ybeu7cA6+/koxszsORXX0OJk9N0GgfHq70Wqi4vv2iJCZvBrOWwcIrxKjvFtwyDgdeQzgPheH5nhLVl5eQy7WA==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-linux-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-linux-x64/-/vsce-sign-linux-x64-2.0.2.tgz", + "integrity": "sha512-NsPPFVtLaTlVJKOiTnO8Cl78LZNWy0Q8iAg+LlBiCDEgC12Gt4WXOSs2pmcIjDYzj2kY4NwdeN1mBTaujYZaPg==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-win32-arm64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-arm64/-/vsce-sign-win32-arm64-2.0.2.tgz", + "integrity": "sha512-wPs848ymZ3Ny+Y1Qlyi7mcT6VSigG89FWQnp2qRYCyMhdJxOpA4lDwxzlpL8fG6xC8GjQjGDkwbkWUcCobvksQ==", + "dev": true, + "optional": true + }, + "@vscode/vsce-sign-win32-x64": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@vscode/vsce-sign-win32-x64/-/vsce-sign-win32-x64-2.0.2.tgz", + "integrity": "sha512-pAiRN6qSAhDM5SVOIxgx+2xnoVUePHbRNC7OD2aOR3WltTKxxF25OfpK8h8UQ7A0BuRkSgREbB59DBlFk4iAeg==", + "dev": true, + "optional": true + }, "agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", diff --git a/code/package.json b/code/package.json index 8a8c28d2..46d9bd66 100644 --- a/code/package.json +++ b/code/package.json @@ -38,7 +38,7 @@ "@types/glob": "^8.1.0", "@types/node": "^18", "@types/vscode": "1.78.0", - "@vscode/vsce": "^2.26.1", + "@vscode/vsce": "^2.27.0", "esbuild": "^0.21.5", "ovsx": "^0.9.1", "typescript": "^5.4.5" From 28626166c6e64e0f251a9bf6ac5c4cc46f573cce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:23:58 +0000 Subject: [PATCH 06/48] build(deps): bump docker/build-push-action from 5 to 6 Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/v5...v6) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/devenv.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/devenv.yml b/.github/workflows/devenv.yml index 3133a5c7..b14b2b7b 100644 --- a/.github/workflows/devenv.yml +++ b/.github/workflows/devenv.yml @@ -49,7 +49,7 @@ jobs: - name: Build and push Docker image id: push - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: .devcontainer/ push: ${{ github.event_name != 'pull_request' }} From 873a98039d66c1d77b2a4e7767292cabfd603a7e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:00:45 +0000 Subject: [PATCH 07/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.8 → v0.4.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.8...v0.4.9) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5fb4f3d9..dd7a08c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.8 + rev: v0.4.9 hooks: - id: ruff args: [--fix] From 1f7e365f37cad80bf64ae74f553ba3ecb25d51d5 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 21 Jun 2024 19:00:40 +0100 Subject: [PATCH 08/48] Bump ruff version --- lib/esbonio/hatch.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/esbonio/hatch.toml b/lib/esbonio/hatch.toml index 48c3285a..504cd9bb 100644 --- a/lib/esbonio/hatch.toml +++ b/lib/esbonio/hatch.toml @@ -35,4 +35,4 @@ value = ["tests/sphinx-agent", "tests/e2e"] [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" -dependencies = ["ruff==0.4.8"] +dependencies = ["ruff==0.4.9"] From dfc2382d8bc974cb5992d086e6816ade33eeb728 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:40:26 +0000 Subject: [PATCH 09/48] build(deps-dev): bump @vscode/vsce from 2.27.0 to 2.29.0 in /code Bumps [@vscode/vsce](https://github.com/Microsoft/vsce) from 2.27.0 to 2.29.0. - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v2.27.0...v2.29.0) --- updated-dependencies: - dependency-name: "@vscode/vsce" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 14 +++++++------- code/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index 6ae6be4f..8e6e4f9d 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -17,7 +17,7 @@ "@types/glob": "^8.1.0", "@types/node": "^18", "@types/vscode": "1.78.0", - "@vscode/vsce": "^2.27.0", + "@vscode/vsce": "^2.29.0", "esbuild": "^0.21.5", "ovsx": "^0.9.1", "typescript": "^5.4.5" @@ -640,9 +640,9 @@ } }, "node_modules/@vscode/vsce": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.27.0.tgz", - "integrity": "sha512-FFUMBVSyyjjJpWszwqk7d4U3YllY8FdWslbUDMRki1x4ZjA3Z0hmRMfypWrjP9sptbSR9nyPFU4uqjhy2qRB/w==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.29.0.tgz", + "integrity": "sha512-63+aEO8SpjE6qKiIh2Cqy/P9zC7+USElGwpEdkyPp89xIBDBr5IqeNS3zkD3mp3wZqbvHIpJsCCNu74WQirYCg==", "dev": true, "dependencies": { "@azure/identity": "^4.1.0", @@ -3270,9 +3270,9 @@ "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==" }, "@vscode/vsce": { - "version": "2.27.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.27.0.tgz", - "integrity": "sha512-FFUMBVSyyjjJpWszwqk7d4U3YllY8FdWslbUDMRki1x4ZjA3Z0hmRMfypWrjP9sptbSR9nyPFU4uqjhy2qRB/w==", + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.29.0.tgz", + "integrity": "sha512-63+aEO8SpjE6qKiIh2Cqy/P9zC7+USElGwpEdkyPp89xIBDBr5IqeNS3zkD3mp3wZqbvHIpJsCCNu74WQirYCg==", "dev": true, "requires": { "@azure/identity": "^4.1.0", diff --git a/code/package.json b/code/package.json index 46d9bd66..764cb0a3 100644 --- a/code/package.json +++ b/code/package.json @@ -38,7 +38,7 @@ "@types/glob": "^8.1.0", "@types/node": "^18", "@types/vscode": "1.78.0", - "@vscode/vsce": "^2.27.0", + "@vscode/vsce": "^2.29.0", "esbuild": "^0.21.5", "ovsx": "^0.9.1", "typescript": "^5.4.5" From 0b17e3d736de6fac0ad54462df92d145fdd047f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 21:13:09 +0000 Subject: [PATCH 10/48] build(deps-dev): bump typescript from 5.4.5 to 5.5.2 in /code Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.5 to 5.5.2. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.5...v5.5.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 14 +++++++------- code/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index 8e6e4f9d..f2a08b87 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -20,7 +20,7 @@ "@vscode/vsce": "^2.29.0", "esbuild": "^0.21.5", "ovsx": "^0.9.1", - "typescript": "^5.4.5" + "typescript": "^5.5.2" }, "engines": { "vscode": "^1.82.0" @@ -2739,9 +2739,9 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4868,9 +4868,9 @@ } }, "typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", + "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", "dev": true }, "uc.micro": { diff --git a/code/package.json b/code/package.json index 764cb0a3..2d943dde 100644 --- a/code/package.json +++ b/code/package.json @@ -41,7 +41,7 @@ "@vscode/vsce": "^2.29.0", "esbuild": "^0.21.5", "ovsx": "^0.9.1", - "typescript": "^5.4.5" + "typescript": "^5.5.2" }, "engines": { "vscode": "^1.82.0" From 878ca185e6326928732878d97f7a2a9c057ff455 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Jun 2024 22:45:08 +0100 Subject: [PATCH 11/48] [pre-commit.ci] pre-commit autoupdate (#842) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.9 → v0.4.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.9...v0.4.10) * Bump ruff version --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alex Carney --- .pre-commit-config.yaml | 2 +- lib/esbonio/hatch.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dd7a08c7..cfb31498 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.9 + rev: v0.4.10 hooks: - id: ruff args: [--fix] diff --git a/lib/esbonio/hatch.toml b/lib/esbonio/hatch.toml index 504cd9bb..804cc8fe 100644 --- a/lib/esbonio/hatch.toml +++ b/lib/esbonio/hatch.toml @@ -35,4 +35,4 @@ value = ["tests/sphinx-agent", "tests/e2e"] [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" -dependencies = ["ruff==0.4.9"] +dependencies = ["ruff==0.4.10"] From 26ffe0104bf7b4235a305a9bdb56f8c17ccd8156 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 30 Jun 2024 13:09:12 +0100 Subject: [PATCH 12/48] vscode: Set timezone env var This seems to fix an issue that prevents Sphinx from running inside a devcontainer https://github.com/nektos/act/issues/1853 --- .vscode/launch.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.vscode/launch.json b/.vscode/launch.json index 3bd2b184..3bd8c818 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,6 +33,9 @@ "--folder-uri=${workspaceRoot}/docs", "--folder-uri=${workspaceRoot}/lib/esbonio/tests/workspaces/demo" ], + "env": { + "TZ": "UTC" + }, "outFiles": [ "${workspaceRoot}/code/dist/node/**/*.js" ], From f4eb3793214e02f2763375054d41fea758dfc6fc Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 30 Jun 2024 13:14:01 +0100 Subject: [PATCH 13/48] devenv: Add make target to "install" vscode extension Taking advantage of workspace local extensions, this adds a make target that will symlink the `code/` directory to `.vscode/extensions/esbonio` allowing it to be installed. It would be nice if there was a cli `code` command that would do the final step though.... --- .gitignore | 1 + code/Makefile | 6 +++++- code/package.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index be0dfda6..019c2287 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ .env .ipynb_checkpoints .tox +.vscode/extensions/esbonio .vscode-test *.pyc diff --git a/code/Makefile b/code/Makefile index 227255ab..923c4b37 100644 --- a/code/Makefile +++ b/code/Makefile @@ -2,7 +2,7 @@ include ../.devcontainer/tools.mk ESBONIO ?= --pre esbonio -.PHONY: dist dev-deps release-deps release +.PHONY: dist dev-deps release-deps release install watch: dev-deps $(NPM) -test -d dist && rm -r dist @@ -12,6 +12,10 @@ compile: dev-deps $(NPM) -test -d dist && rm -r dist $(NPM) run compile +install: compile + -test -d ../.vscode/extensions || mkdir -p ../.vscode/extensions + test -L ../.vscode/extensions/esbonio || ln -s $(PWD) ../.vscode/extensions/esbonio + dist: release-deps $(NPM) -test -d dist && rm -r dist $(NPM) run package diff --git a/code/package.json b/code/package.json index 2d943dde..326da1c1 100644 --- a/code/package.json +++ b/code/package.json @@ -24,7 +24,7 @@ "package": "vsce package --pre-release --baseImagesUrl https://github.com/swyddfa/esbonio/raw/release/code/", "vscode:prepublish": "npm run compile" }, - "main": "dist/node/extension", + "main": "dist/node/extension.js", "extensionDependencies": [ "ms-python.python", "chrisjsewell.myst-tml-syntax" From 06e5d2b256d8556209f5e437736dc3b479147a83 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 30 Jun 2024 13:22:29 +0100 Subject: [PATCH 14/48] Update to ruff v0.5 --- .pre-commit-config.yaml | 4 ++-- lib/esbonio/hatch.toml | 2 +- lib/esbonio/ruff_defaults.toml | 26 +++++++------------------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfb31498..7ef9ba02 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.10 + rev: v0.5.0 hooks: - id: ruff args: [--fix] @@ -17,7 +17,7 @@ repos: - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: 'v1.10.0' + rev: 'v1.10.1' hooks: - id: mypy name: mypy (scripts) diff --git a/lib/esbonio/hatch.toml b/lib/esbonio/hatch.toml index 804cc8fe..a4751007 100644 --- a/lib/esbonio/hatch.toml +++ b/lib/esbonio/hatch.toml @@ -35,4 +35,4 @@ value = ["tests/sphinx-agent", "tests/e2e"] [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" -dependencies = ["ruff==0.4.10"] +dependencies = ["ruff==0.5.0"] diff --git a/lib/esbonio/ruff_defaults.toml b/lib/esbonio/ruff_defaults.toml index 18aaec50..a433be67 100644 --- a/lib/esbonio/ruff_defaults.toml +++ b/lib/esbonio/ruff_defaults.toml @@ -14,9 +14,11 @@ select = [ "ARG003", "ARG004", "ARG005", - "ASYNC100", - "ASYNC101", - "ASYNC102", + "ASYNC210", + "ASYNC220", + "ASYNC221", + "ASYNC230", + "ASYNC251", "B002", "B003", "B004", @@ -463,11 +465,6 @@ select = [ "TID251", "TID252", "TID253", - "TRIO100", - "TRIO105", - "TRIO109", - "TRIO110", - "TRIO115", "TRY002", "TRY003", "TRY004", @@ -534,17 +531,8 @@ select = [ ] [lint.per-file-ignores] -"**/scripts/*" = [ - "INP001", - "T201", -] -"**/tests/**/*" = [ - "PLC1901", - "PLR2004", - "PLR6301", - "S", - "TID252", -] +"**/scripts/*" = ["INP001", "T201"] +"**/tests/**/*" = ["PLC1901", "PLR2004", "PLR6301", "S", "TID252"] [lint.flake8-tidy-imports] ban-relative-imports = "all" From 5d130cf66ae1c0fb405b60cc89da4c4a47c3b60a Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 7 Jul 2024 10:15:14 +0100 Subject: [PATCH 15/48] lsp: Introduce configuration variables Configuration objects can now accept variables of the form `${variable}` and have them expanded by the configuration system at runtime. This commit adds support for the following variables - `${scope}`: The full uri of the scope at which the configuration object was requested - `${scopePath}`: The path component of the scope uri - `${scopeFsPath}`: The path component of the scope uri as a filesystem path Currently these configuration variables will only be expanded if they appear in a field that is a simple string. Additionaly, this commit sets the default value for `SphinxConfig.cwd` to be `${scopeFsPath}`. This should mean that any `esbonio.sphinx.buildCommand` values in a `pyproject.toml` file will be evaluated relative to the file's location. Closes #711 --- lib/esbonio/changes/711.fix.md | 1 + lib/esbonio/esbonio/server/__init__.py | 2 + lib/esbonio/esbonio/server/_configuration.py | 136 ++++++++----- .../server/features/sphinx_manager/config.py | 5 +- .../server/features/test_sphinx_config.py | 3 +- .../tests/server/test_configuration.py | 188 ++++++++++++++++++ 6 files changed, 286 insertions(+), 49 deletions(-) create mode 100644 lib/esbonio/changes/711.fix.md diff --git a/lib/esbonio/changes/711.fix.md b/lib/esbonio/changes/711.fix.md new file mode 100644 index 00000000..59b19545 --- /dev/null +++ b/lib/esbonio/changes/711.fix.md @@ -0,0 +1 @@ +`esbonio.sphinx.buildCommand` settings provided in a `pyproject.toml` file are now resolved relative to the file's location diff --git a/lib/esbonio/esbonio/server/__init__.py b/lib/esbonio/esbonio/server/__init__.py index 4b7f4b23..d57f3871 100644 --- a/lib/esbonio/esbonio/server/__init__.py +++ b/lib/esbonio/esbonio/server/__init__.py @@ -1,6 +1,7 @@ from esbonio.sphinx_agent.types import Uri from ._configuration import ConfigChangeEvent +from ._configuration import ConfigurationContext from .events import EventSource from .feature import CompletionConfig from .feature import CompletionContext @@ -14,6 +15,7 @@ __all__ = ( "__version__", "ConfigChangeEvent", + "ConfigurationContext", "CompletionConfig", "CompletionContext", "CompletionTrigger", diff --git a/lib/esbonio/esbonio/server/_configuration.py b/lib/esbonio/esbonio/server/_configuration.py index fb6ed333..fad620a1 100644 --- a/lib/esbonio/esbonio/server/_configuration.py +++ b/lib/esbonio/esbonio/server/_configuration.py @@ -1,12 +1,10 @@ from __future__ import annotations -import asyncio import inspect import json import pathlib -import traceback +import re import typing -from functools import partial from typing import Generic from typing import TypeVar @@ -55,11 +53,8 @@ class Subscription(Generic[T]): callback: ConfigurationCallback """The subscription's callback.""" - workspace_scope: str - """The corresponding workspace scope for the subscription.""" - - file_scope: str - """The corresponding file scope for the subscription.""" + context: ConfigurationContext + """The context for this subscription.""" @attrs.define @@ -76,6 +71,67 @@ class ConfigChangeEvent(Generic[T]): """The previous configuration value, (if any).""" +VARIABLE = re.compile(r"\$\{(\w+)\}") + + +@attrs.define(frozen=True) +class ConfigurationContext: + """The context in which configuration variables are evaluated.""" + + file_scope: str + """The uri of the file scope of this context.""" + + workspace_scope: str + """The uri of the workspace scope of this context.""" + + @property + def scope(self) -> str: + """The effective scope of the config context.""" + return max([self.file_scope, self.workspace_scope], key=len) + + @property + def scope_path(self) -> Optional[str]: + """The scope uri as a path.""" + uri = Uri.parse(self.scope) + return uri.path + + @property + def scope_fs_path(self) -> Optional[str]: + """The scope uri as an fs path.""" + uri = Uri.parse(self.scope) + return uri.fs_path + + def expand(self, config: attrs.AttrsInstance) -> attrs.AttrsInstance: + """Expand any configuration variables in the given config value.""" + for name in attrs.fields_dict(type(config)): + value = getattr(config, name) + + # For now, we only support variables that are a string. + if not isinstance(value, str): + continue + + if (match := VARIABLE.match(value)) is None: + continue + + setattr(config, name, self.expand_value(match.group(1))) + + return config + + def expand_value(self, variable: str) -> Any: + """Return the value for the given variable name.""" + + if variable == "scope": + return self.scope + + if variable == "scopePath": + return self.scope_path + + if variable == "scopeFsPath": + return self.scope_fs_path + + raise ValueError(f"Undefined variable: {variable!r}") + + class Configuration: """Manages the configuration values for the server. @@ -114,9 +170,6 @@ def __init__(self, server: EsbonioLanguageServer): self._subscriptions: Dict[Subscription, Any] = {} """Subscriptions and their last known value""" - self._tasks: Set[asyncio.Task] = set() - """Holds tasks that are currently executing an async config handler.""" - @property def initialization_options(self): return self._initialization_options @@ -172,9 +225,11 @@ def subscribe( """ file_scope = self._uri_to_file_scope(scope) workspace_scope = self._uri_to_workspace_scope(scope) - subscription = Subscription( - section, spec, callback, workspace_scope, file_scope + + context = ConfigurationContext( + file_scope=file_scope, workspace_scope=workspace_scope ) + subscription = Subscription(section, spec, callback, context) if subscription in self._subscriptions: self.logger.debug("Ignoring duplicate subscription: %s", subscription) @@ -192,8 +247,7 @@ def _notify_subscriptions(self, *args): value = self._get_config( subscription.section, subscription.spec, - subscription.workspace_scope, - subscription.file_scope, + subscription.context, ) # No need to notify if nothing has changed @@ -204,9 +258,7 @@ def _notify_subscriptions(self, *args): self._subscriptions[subscription] = value change_event = ConfigChangeEvent( - scope=max( - [subscription.file_scope, subscription.workspace_scope], key=len - ), + scope=subscription.context.scope, value=value, previous=previous_value, ) @@ -215,8 +267,7 @@ def _notify_subscriptions(self, *args): try: ret = subscription.callback(change_event) if inspect.iscoroutine(ret): - task = asyncio.create_task(ret) - task.add_done_callback(partial(self._finish_task, subscription)) + self.server.run_task(ret) except Exception: self.logger.error( @@ -225,17 +276,6 @@ def _notify_subscriptions(self, *args): exc_info=True, ) - def _finish_task(self, subscription: Subscription, task: asyncio.Task[None]): - """Cleanup a finished task.""" - self._tasks.discard(task) - - if (exc := task.exception()) is not None: - self.logger.error( - "Error in async configuration handler '%s'\n%s", - subscription.callback, - "".join(traceback.format_exception(type(exc), exc, exc.__traceback__)), - ) - def get(self, section: str, spec: Type[T], scope: Optional[Uri] = None) -> T: """Get the requested configuration section. @@ -255,10 +295,12 @@ def get(self, section: str, spec: Type[T], scope: Optional[Uri] = None) -> T: T The requested configuration section parsed as an instance of ``T``. """ - file_scope = self._uri_to_file_scope(scope) - workspace_scope = self._uri_to_workspace_scope(scope) + context = ConfigurationContext( + file_scope=self._uri_to_file_scope(scope), + workspace_scope=self._uri_to_workspace_scope(scope), + ) - return self._get_config(section, spec, workspace_scope, file_scope) + return self._get_config(section, spec, context) def scope_for(self, uri: Uri) -> str: """Return the configuration scope that corresponds to the given uri. @@ -273,24 +315,27 @@ def scope_for(self, uri: Uri) -> str: str The scope corresponding with the given uri """ + context = ConfigurationContext( + file_scope=self._uri_to_file_scope(uri), + workspace_scope=self._uri_to_workspace_scope(uri), + ) - file_scope = self._uri_to_file_scope(uri) - workspace_scope = self._uri_to_workspace_scope(uri) - - return max([file_scope, workspace_scope], key=len) + return context.scope def _get_config( - self, section: str, spec: Type[T], workspace_scope: str, file_scope: str + self, + section: str, + spec: Type[T], + context: ConfigurationContext, ) -> T: """Get the requested configuration section.""" - self.logger.debug("File scope: '%s'", file_scope) - self.logger.debug("Workspace scope: '%s'", workspace_scope) + self.logger.debug("%s", context) # To keep things simple, this method assumes that all available config is already # cached locally. Populating the cache is handled elsewhere. - file_config = self._file_config.get(file_scope, {}) - workspace_config = self._workspace_config.get(workspace_scope, {}) + file_config = self._file_config.get(context.file_scope, {}) + workspace_config = self._workspace_config.get(context.workspace_scope, {}) # Combine and resolve all the config sources - order matters! config = _merge_configs( @@ -303,10 +348,11 @@ def _get_config( for name in section.split("."): config_section = config_section.get(name, {}) - self.logger.debug("Resolved config: %s", json.dumps(config_section, indent=2)) + self.logger.debug("%s: %s", section, json.dumps(config_section, indent=2)) try: value = self.converter.structure(config_section, spec) + value = context.expand(value) self.logger.debug("%s", value) return value @@ -342,7 +388,7 @@ def _discover_config_files(self) -> List[pathlib.Path]: if (folder_path := Uri.parse(uri).fs_path) is None: continue - self.logger.debug("Scanning workspace folder: '%s'", folder_path) + self.logger.debug("Looking for pyproject.toml files in: '%s'", folder_path) for p in pathlib.Path(folder_path).glob("**/pyproject.toml"): self.logger.debug("Found '%s'", p) paths.append(p) diff --git a/lib/esbonio/esbonio/server/features/sphinx_manager/config.py b/lib/esbonio/esbonio/server/features/sphinx_manager/config.py index 855f53d3..53e0c48f 100644 --- a/lib/esbonio/esbonio/server/features/sphinx_manager/config.py +++ b/lib/esbonio/esbonio/server/features/sphinx_manager/config.py @@ -54,7 +54,7 @@ class SphinxConfig: env_passthrough: List[str] = attrs.field(factory=list) """List of environment variables to pass through to the Sphinx subprocess""" - cwd: str = attrs.field(default="") + cwd: str = attrs.field(default="${scopeFsPath}") """The working directory to use.""" python_path: List[pathlib.Path] = attrs.field(factory=list) @@ -133,8 +133,7 @@ def _resolve_cwd( The working directory to launch the sphinx agent in. If ``None``, the working directory could not be determined. """ - - if self.cwd: + if self.cwd and self.cwd != "${scopeFsPath}": return self.cwd candidates = [Uri.parse(f) for f in workspace.folders.keys()] diff --git a/lib/esbonio/tests/server/features/test_sphinx_config.py b/lib/esbonio/tests/server/features/test_sphinx_config.py index 918ac9a6..96e3bdd5 100644 --- a/lib/esbonio/tests/server/features/test_sphinx_config.py +++ b/lib/esbonio/tests/server/features/test_sphinx_config.py @@ -175,4 +175,5 @@ def test_resolve( expected The expected outcome """ - assert config.resolve(Uri.parse(uri), workspace, logger) == expected + actual = config.resolve(Uri.parse(uri), workspace, logger) + assert actual == expected diff --git a/lib/esbonio/tests/server/test_configuration.py b/lib/esbonio/tests/server/test_configuration.py index 2480a11c..237b86cf 100644 --- a/lib/esbonio/tests/server/test_configuration.py +++ b/lib/esbonio/tests/server/test_configuration.py @@ -26,6 +26,12 @@ class ExampleConfig: log_names: List[str] = attrs.field(factory=list) +@attrs.define +class ColorConfig: + color: str + scope: str = attrs.field(default="${scope}") + + @pytest.fixture def server(event_loop): """Return a server instance for testing.""" @@ -234,6 +240,188 @@ def server(event_loop): id="workspace-file-override[win]", marks=pytest.mark.skipif(not IS_WIN, reason="windows only"), ), + pytest.param( # Check that we can expand config variables correctly + {}, + { + "file:///path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + {}, + "esbonio.colors", + ColorConfig, + "file:///path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="file:///path/to/workspace"), + id="scope-variable[workspace][unix]", + marks=pytest.mark.skipif(IS_WIN, reason="windows"), + ), + pytest.param( # Check that we can expand config variables correctly + {}, + { + "file:///c%3A/path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + {}, + "esbonio.colors", + ColorConfig, + "file:///c:/path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="file:///c%3A/path/to/workspace"), + id="scope-variable[workspace][win]", + marks=pytest.mark.skipif(not IS_WIN, reason="windows only"), + ), + pytest.param( # Check that we can expand config variables correctly + {}, + { + "file:///path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="file:///path/to/workspace/docs"), + id="scope-variable[workspace+file][unix]", + marks=pytest.mark.skipif(IS_WIN, reason="windows"), + ), + pytest.param( # Check that we can expand config variables correctly + {}, + { + "file:///c%3A/path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///c%3A/path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///c:/path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="file:///c%3A/path/to/workspace/docs"), + id="scope-variable[workspace+file][win]", + marks=pytest.mark.skipif(not IS_WIN, reason="windows only"), + ), + pytest.param( # The user should still be able to override them + {}, + { + "file:///path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue", scope="file:///my/scope")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="file:///my/scope"), + id="scope-variable-override[unix]", + marks=pytest.mark.skipif(IS_WIN, reason="windows"), + ), + pytest.param( # The user should still be able to override them + {}, + { + "file:///c%3A/path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///c%3A/path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue", scope="file:///my/scope")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///c:/path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="file:///my/scope"), + id="scope-variable-override[win]", + marks=pytest.mark.skipif(not IS_WIN, reason="windows only"), + ), + pytest.param( + {}, + { + "file:///path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue", scope="${scopePath}")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="/path/to/workspace/docs"), + id="scope-path-variable[unix]", + marks=pytest.mark.skipif(IS_WIN, reason="windows"), + ), + pytest.param( + {}, + { + "file:///c%3A/path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///c%3A/path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue", scope="${scopePath}")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///c:/path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="/c:/path/to/workspace/docs"), + id="scope-path-variable[win]", + marks=pytest.mark.skipif(not IS_WIN, reason="windows only"), + ), + pytest.param( + {}, + { + "file:///path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue", scope="${scopeFsPath}")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="/path/to/workspace/docs"), + id="scope-fspath-variable[unix]", + marks=pytest.mark.skipif(IS_WIN, reason="windows"), + ), + pytest.param( + {}, + { + "file:///c%3A/path/to/workspace": dict( + esbonio=dict(colors=dict(color="red")) + ), + }, + { + "file:///c%3A/path/to/workspace/docs": dict( + esbonio=dict(colors=dict(color="blue", scope="${scopeFsPath}")) + ), + }, + "esbonio.colors", + ColorConfig, + "file:///c:/path/to/workspace/docs/file.txt", + ColorConfig(color="red", scope="c:\\path\\to\\workspace\\docs"), + id="scope-fspath-variable[win]", + marks=pytest.mark.skipif(not IS_WIN, reason="windows only"), + ), ], ) def test_get_configuration( From 578d9e5344ec3a17f3aeba98d2592449ad17e7bd Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 7 Jul 2024 10:23:39 +0100 Subject: [PATCH 16/48] vscode: Update formatter for python --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 13097473..1030b6a7 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter", + "editor.defaultFormatter": "charliermarsh.ruff", "editor.codeActionsOnSave": { "source.organizeImports": "explicit" }, From 9fadfb945a273d6559aa53c2bd16f3f81064d794 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 14:51:26 +0000 Subject: [PATCH 17/48] build(deps-dev): bump esbuild from 0.21.5 to 0.22.0 in /code Bumps [esbuild](https://github.com/evanw/esbuild) from 0.21.5 to 0.22.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.21.5...v0.22.0) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 455 ++++++++++++++++++++++------------------- code/package.json | 2 +- 2 files changed, 241 insertions(+), 216 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index f2a08b87..d4b2def0 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -18,7 +18,7 @@ "@types/node": "^18", "@types/vscode": "1.78.0", "@vscode/vsce": "^2.29.0", - "esbuild": "^0.21.5", + "esbuild": "^0.22.0", "ovsx": "^0.9.1", "typescript": "^5.5.2" }, @@ -235,9 +235,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.22.0.tgz", + "integrity": "sha512-uvQR2crZ/zgzSHDvdygHyNI+ze9zwS8mqz0YtGXotSqvEE0UkYE9s+FZKQNTt1VtT719mfP3vHrUdCpxBNQZhQ==", "cpu": [ "ppc64" ], @@ -247,13 +247,13 @@ "aix" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.22.0.tgz", + "integrity": "sha512-PBnyP+r8vJE4ifxsWys9l+Mc2UY/yYZOpX82eoyGISXXb3dRr0M21v+s4fgRKWMFPMSf/iyowqPW/u7ScSUkjQ==", "cpu": [ "arm" ], @@ -263,13 +263,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.22.0.tgz", + "integrity": "sha512-UKhPb3o2gAB/bfXcl58ZXTn1q2oVu1rEu/bKrCtmm+Nj5MKUbrOwR5WAixE2v+lk0amWuwPvhnPpBRLIGiq7ig==", "cpu": [ "arm64" ], @@ -279,13 +279,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.22.0.tgz", + "integrity": "sha512-IjTYtvIrjhR41Ijy2dDPgYjQHWG/x/A4KXYbs1fiU3efpRdoxMChK3oEZV6GPzVEzJqxFgcuBaiX1kwEvWUxSw==", "cpu": [ "x64" ], @@ -295,13 +295,13 @@ "android" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.22.0.tgz", + "integrity": "sha512-mqt+Go4y9wRvEz81bhKd9RpHsQR1LwU8Xm6jZRUV/xpM7cIQFbFH6wBCLPTNsdELBvfoHeumud7X78jQQJv2TA==", "cpu": [ "arm64" ], @@ -311,13 +311,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.22.0.tgz", + "integrity": "sha512-vTaTQ9OgYc3VTaWtOE5pSuDT6H3d/qSRFRfSBbnxFfzAvYoB3pqKXA0LEbi/oT8GUOEAutspfRMqPj2ezdFaMw==", "cpu": [ "x64" ], @@ -327,13 +327,13 @@ "darwin" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.22.0.tgz", + "integrity": "sha512-0e1ZgoobJzaGnR4reD7I9rYZ7ttqdh1KPvJWnquUoDJhL0rYwdneeLailBzd2/4g/U5p4e5TIHEWa68NF2hFpQ==", "cpu": [ "arm64" ], @@ -343,13 +343,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.22.0.tgz", + "integrity": "sha512-BFgyYwlCwRWyPQJtkzqq2p6pJbiiWgp0P9PNf7a5FQ1itKY4czPuOMAlFVItirSmEpRPCeImuwePNScZS0pL5Q==", "cpu": [ "x64" ], @@ -359,13 +359,13 @@ "freebsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.22.0.tgz", + "integrity": "sha512-KEMWiA9aGuPUD4BH5yjlhElLgaRXe+Eri6gKBoDazoPBTo1BXc/e6IW5FcJO9DoL19FBeCxgONyh95hLDNepIg==", "cpu": [ "arm" ], @@ -375,13 +375,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.22.0.tgz", + "integrity": "sha512-V/K2rctCUgC0PCXpN7AqT4hoazXKgIYugFGu/myk2+pfe6jTW2guz/TBwq4cZ7ESqusR/IzkcQaBkcjquuBWsw==", "cpu": [ "arm64" ], @@ -391,13 +391,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.22.0.tgz", + "integrity": "sha512-r2ZZqkOMOrpUhzNwxI7uLAHIDwkfeqmTnrv1cjpL/rjllPWszgqmprd/om9oviKXUBpMqHbXmppvjAYgISb26Q==", "cpu": [ "ia32" ], @@ -407,13 +407,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.22.0.tgz", + "integrity": "sha512-qaowLrV/YOMAL2RfKQ4C/VaDzAuLDuylM2sd/LH+4OFirMl6CuDpRlCq4u49ZBaVV8pkI/Y+hTdiibvQRhojCA==", "cpu": [ "loong64" ], @@ -423,13 +423,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.22.0.tgz", + "integrity": "sha512-hgrezzjQTRxjkQ5k08J6rtZN5PNnkWx/Rz6Kmj9gnsdCAX1I4Dn4ZPqvFRkXo55Q3pnVQJBwbdtrTO7tMGtyVA==", "cpu": [ "mips64el" ], @@ -439,13 +439,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.22.0.tgz", + "integrity": "sha512-ewxg6FLLUio883XgSjfULEmDl3VPv/TYNnRprVAS3QeGFLdCYdx1tIudBcd7n9jIdk82v1Ajov4jx87qW7h9+g==", "cpu": [ "ppc64" ], @@ -455,13 +455,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.22.0.tgz", + "integrity": "sha512-Az5XbgSJC2lE8XK8pdcutsf9RgdafWdTpUK/+6uaDdfkviw/B4JCwAfh1qVeRWwOohwdsl4ywZrWBNWxwrPLFg==", "cpu": [ "riscv64" ], @@ -471,13 +471,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.22.0.tgz", + "integrity": "sha512-8j4a2ChT9+V34NNNY9c/gMldutaJFmfMacTPq4KfNKwv2fitBCLYjee7c+Vxaha2nUhPK7cXcZpJtJ3+Y7ZdVQ==", "cpu": [ "s390x" ], @@ -487,13 +487,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.22.0.tgz", + "integrity": "sha512-JUQyOnpbAkkRFOk/AhsEemz5TfWN4FJZxVObUlnlNCbe7QBl61ZNfM4cwBXayQA6laMJMUcqLHaYQHAB6YQ95Q==", "cpu": [ "x64" ], @@ -503,13 +503,13 @@ "linux" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.22.0.tgz", + "integrity": "sha512-11PoCoHXo4HFNbLsXuMB6bpMPWGDiw7xETji6COdJss4SQZLvcgNoeSqWtATRm10Jj1uEHiaIk4N0PiN6x4Fcg==", "cpu": [ "x64" ], @@ -519,13 +519,29 @@ "netbsd" ], "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.22.0.tgz", + "integrity": "sha512-Ezlhu/YyITmXwKSB+Zu/QqD7cxrjrpiw85cc0Rbd3AWr2wsgp+dWbWOE8MqHaLW9NKMZvuL0DhbJbvzR7F6Zvg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.22.0.tgz", + "integrity": "sha512-ufjdW5tFJGUjlH9j/5cCE9lrwRffyZh+T4vYvoDKoYsC6IXbwaFeV/ENxeNXcxotF0P8CDzoICXVSbJaGBhkrw==", "cpu": [ "x64" ], @@ -535,13 +551,13 @@ "openbsd" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.22.0.tgz", + "integrity": "sha512-zY6ly/AoSmKnmNTowDJsK5ehra153/5ZhqxNLfq9NRsTTltetr+yHHcQ4RW7QDqw4JC8A1uC1YmeSfK9NRcK1w==", "cpu": [ "x64" ], @@ -551,13 +567,13 @@ "sunos" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.22.0.tgz", + "integrity": "sha512-Kml5F7tv/1Maam0pbbCrvkk9vj046dPej30kFzlhXnhuCtYYBP6FGy/cLbc5yUT1lkZznGLf2OvuvmLjscO5rw==", "cpu": [ "arm64" ], @@ -567,13 +583,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.22.0.tgz", + "integrity": "sha512-IOgwn+mYTM3RrcydP4Og5IpXh+ftN8oF+HELTXSmbWBlujuci4Qa3DTeO+LEErceisI7KUSfEIiX+WOUlpELkw==", "cpu": [ "ia32" ], @@ -583,13 +599,13 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.22.0.tgz", + "integrity": "sha512-4bDHJrk2WHBXJPhy1y80X7/5b5iZTZP3LGcKIlAP1J+KqZ4zQAPMLEzftGyjjfcKbA4JDlPt/+2R/F1ZTeRgrw==", "cpu": [ "x64" ], @@ -599,7 +615,7 @@ "win32" ], "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/@types/glob": { @@ -1384,41 +1400,42 @@ } }, "node_modules/esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.22.0.tgz", + "integrity": "sha512-zNYA6bFZsVnsU481FnGAQjLDW0Pl/8BGG7EvAp15RzUvGC+ME7hf1q7LvIfStEQBz/iEHuBJCYcOwPmNCf1Tlw==", "dev": true, "hasInstallScript": true, "bin": { "esbuild": "bin/esbuild" }, "engines": { - "node": ">=12" + "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.22.0", + "@esbuild/android-arm": "0.22.0", + "@esbuild/android-arm64": "0.22.0", + "@esbuild/android-x64": "0.22.0", + "@esbuild/darwin-arm64": "0.22.0", + "@esbuild/darwin-x64": "0.22.0", + "@esbuild/freebsd-arm64": "0.22.0", + "@esbuild/freebsd-x64": "0.22.0", + "@esbuild/linux-arm": "0.22.0", + "@esbuild/linux-arm64": "0.22.0", + "@esbuild/linux-ia32": "0.22.0", + "@esbuild/linux-loong64": "0.22.0", + "@esbuild/linux-mips64el": "0.22.0", + "@esbuild/linux-ppc64": "0.22.0", + "@esbuild/linux-riscv64": "0.22.0", + "@esbuild/linux-s390x": "0.22.0", + "@esbuild/linux-x64": "0.22.0", + "@esbuild/netbsd-x64": "0.22.0", + "@esbuild/openbsd-arm64": "0.22.0", + "@esbuild/openbsd-x64": "0.22.0", + "@esbuild/sunos-x64": "0.22.0", + "@esbuild/win32-arm64": "0.22.0", + "@esbuild/win32-ia32": "0.22.0", + "@esbuild/win32-x64": "0.22.0" } }, "node_modules/escape-string-regexp": { @@ -3076,163 +3093,170 @@ } }, "@esbuild/aix-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", - "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.22.0.tgz", + "integrity": "sha512-uvQR2crZ/zgzSHDvdygHyNI+ze9zwS8mqz0YtGXotSqvEE0UkYE9s+FZKQNTt1VtT719mfP3vHrUdCpxBNQZhQ==", "dev": true, "optional": true }, "@esbuild/android-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", - "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.22.0.tgz", + "integrity": "sha512-PBnyP+r8vJE4ifxsWys9l+Mc2UY/yYZOpX82eoyGISXXb3dRr0M21v+s4fgRKWMFPMSf/iyowqPW/u7ScSUkjQ==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", - "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.22.0.tgz", + "integrity": "sha512-UKhPb3o2gAB/bfXcl58ZXTn1q2oVu1rEu/bKrCtmm+Nj5MKUbrOwR5WAixE2v+lk0amWuwPvhnPpBRLIGiq7ig==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", - "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.22.0.tgz", + "integrity": "sha512-IjTYtvIrjhR41Ijy2dDPgYjQHWG/x/A4KXYbs1fiU3efpRdoxMChK3oEZV6GPzVEzJqxFgcuBaiX1kwEvWUxSw==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", - "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.22.0.tgz", + "integrity": "sha512-mqt+Go4y9wRvEz81bhKd9RpHsQR1LwU8Xm6jZRUV/xpM7cIQFbFH6wBCLPTNsdELBvfoHeumud7X78jQQJv2TA==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", - "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.22.0.tgz", + "integrity": "sha512-vTaTQ9OgYc3VTaWtOE5pSuDT6H3d/qSRFRfSBbnxFfzAvYoB3pqKXA0LEbi/oT8GUOEAutspfRMqPj2ezdFaMw==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", - "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.22.0.tgz", + "integrity": "sha512-0e1ZgoobJzaGnR4reD7I9rYZ7ttqdh1KPvJWnquUoDJhL0rYwdneeLailBzd2/4g/U5p4e5TIHEWa68NF2hFpQ==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", - "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.22.0.tgz", + "integrity": "sha512-BFgyYwlCwRWyPQJtkzqq2p6pJbiiWgp0P9PNf7a5FQ1itKY4czPuOMAlFVItirSmEpRPCeImuwePNScZS0pL5Q==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", - "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.22.0.tgz", + "integrity": "sha512-KEMWiA9aGuPUD4BH5yjlhElLgaRXe+Eri6gKBoDazoPBTo1BXc/e6IW5FcJO9DoL19FBeCxgONyh95hLDNepIg==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", - "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.22.0.tgz", + "integrity": "sha512-V/K2rctCUgC0PCXpN7AqT4hoazXKgIYugFGu/myk2+pfe6jTW2guz/TBwq4cZ7ESqusR/IzkcQaBkcjquuBWsw==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", - "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.22.0.tgz", + "integrity": "sha512-r2ZZqkOMOrpUhzNwxI7uLAHIDwkfeqmTnrv1cjpL/rjllPWszgqmprd/om9oviKXUBpMqHbXmppvjAYgISb26Q==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", - "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.22.0.tgz", + "integrity": "sha512-qaowLrV/YOMAL2RfKQ4C/VaDzAuLDuylM2sd/LH+4OFirMl6CuDpRlCq4u49ZBaVV8pkI/Y+hTdiibvQRhojCA==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", - "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.22.0.tgz", + "integrity": "sha512-hgrezzjQTRxjkQ5k08J6rtZN5PNnkWx/Rz6Kmj9gnsdCAX1I4Dn4ZPqvFRkXo55Q3pnVQJBwbdtrTO7tMGtyVA==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", - "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.22.0.tgz", + "integrity": "sha512-ewxg6FLLUio883XgSjfULEmDl3VPv/TYNnRprVAS3QeGFLdCYdx1tIudBcd7n9jIdk82v1Ajov4jx87qW7h9+g==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", - "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.22.0.tgz", + "integrity": "sha512-Az5XbgSJC2lE8XK8pdcutsf9RgdafWdTpUK/+6uaDdfkviw/B4JCwAfh1qVeRWwOohwdsl4ywZrWBNWxwrPLFg==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", - "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.22.0.tgz", + "integrity": "sha512-8j4a2ChT9+V34NNNY9c/gMldutaJFmfMacTPq4KfNKwv2fitBCLYjee7c+Vxaha2nUhPK7cXcZpJtJ3+Y7ZdVQ==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", - "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.22.0.tgz", + "integrity": "sha512-JUQyOnpbAkkRFOk/AhsEemz5TfWN4FJZxVObUlnlNCbe7QBl61ZNfM4cwBXayQA6laMJMUcqLHaYQHAB6YQ95Q==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", - "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.22.0.tgz", + "integrity": "sha512-11PoCoHXo4HFNbLsXuMB6bpMPWGDiw7xETji6COdJss4SQZLvcgNoeSqWtATRm10Jj1uEHiaIk4N0PiN6x4Fcg==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-arm64": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.22.0.tgz", + "integrity": "sha512-Ezlhu/YyITmXwKSB+Zu/QqD7cxrjrpiw85cc0Rbd3AWr2wsgp+dWbWOE8MqHaLW9NKMZvuL0DhbJbvzR7F6Zvg==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", - "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.22.0.tgz", + "integrity": "sha512-ufjdW5tFJGUjlH9j/5cCE9lrwRffyZh+T4vYvoDKoYsC6IXbwaFeV/ENxeNXcxotF0P8CDzoICXVSbJaGBhkrw==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", - "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.22.0.tgz", + "integrity": "sha512-zY6ly/AoSmKnmNTowDJsK5ehra153/5ZhqxNLfq9NRsTTltetr+yHHcQ4RW7QDqw4JC8A1uC1YmeSfK9NRcK1w==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", - "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.22.0.tgz", + "integrity": "sha512-Kml5F7tv/1Maam0pbbCrvkk9vj046dPej30kFzlhXnhuCtYYBP6FGy/cLbc5yUT1lkZznGLf2OvuvmLjscO5rw==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", - "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.22.0.tgz", + "integrity": "sha512-IOgwn+mYTM3RrcydP4Og5IpXh+ftN8oF+HELTXSmbWBlujuci4Qa3DTeO+LEErceisI7KUSfEIiX+WOUlpELkw==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", - "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.22.0.tgz", + "integrity": "sha512-4bDHJrk2WHBXJPhy1y80X7/5b5iZTZP3LGcKIlAP1J+KqZ4zQAPMLEzftGyjjfcKbA4JDlPt/+2R/F1ZTeRgrw==", "dev": true, "optional": true }, @@ -3812,34 +3836,35 @@ "dev": true }, "esbuild": { - "version": "0.21.5", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", - "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.22.0.tgz", + "integrity": "sha512-zNYA6bFZsVnsU481FnGAQjLDW0Pl/8BGG7EvAp15RzUvGC+ME7hf1q7LvIfStEQBz/iEHuBJCYcOwPmNCf1Tlw==", "dev": true, "requires": { - "@esbuild/aix-ppc64": "0.21.5", - "@esbuild/android-arm": "0.21.5", - "@esbuild/android-arm64": "0.21.5", - "@esbuild/android-x64": "0.21.5", - "@esbuild/darwin-arm64": "0.21.5", - "@esbuild/darwin-x64": "0.21.5", - "@esbuild/freebsd-arm64": "0.21.5", - "@esbuild/freebsd-x64": "0.21.5", - "@esbuild/linux-arm": "0.21.5", - "@esbuild/linux-arm64": "0.21.5", - "@esbuild/linux-ia32": "0.21.5", - "@esbuild/linux-loong64": "0.21.5", - "@esbuild/linux-mips64el": "0.21.5", - "@esbuild/linux-ppc64": "0.21.5", - "@esbuild/linux-riscv64": "0.21.5", - "@esbuild/linux-s390x": "0.21.5", - "@esbuild/linux-x64": "0.21.5", - "@esbuild/netbsd-x64": "0.21.5", - "@esbuild/openbsd-x64": "0.21.5", - "@esbuild/sunos-x64": "0.21.5", - "@esbuild/win32-arm64": "0.21.5", - "@esbuild/win32-ia32": "0.21.5", - "@esbuild/win32-x64": "0.21.5" + "@esbuild/aix-ppc64": "0.22.0", + "@esbuild/android-arm": "0.22.0", + "@esbuild/android-arm64": "0.22.0", + "@esbuild/android-x64": "0.22.0", + "@esbuild/darwin-arm64": "0.22.0", + "@esbuild/darwin-x64": "0.22.0", + "@esbuild/freebsd-arm64": "0.22.0", + "@esbuild/freebsd-x64": "0.22.0", + "@esbuild/linux-arm": "0.22.0", + "@esbuild/linux-arm64": "0.22.0", + "@esbuild/linux-ia32": "0.22.0", + "@esbuild/linux-loong64": "0.22.0", + "@esbuild/linux-mips64el": "0.22.0", + "@esbuild/linux-ppc64": "0.22.0", + "@esbuild/linux-riscv64": "0.22.0", + "@esbuild/linux-s390x": "0.22.0", + "@esbuild/linux-x64": "0.22.0", + "@esbuild/netbsd-x64": "0.22.0", + "@esbuild/openbsd-arm64": "0.22.0", + "@esbuild/openbsd-x64": "0.22.0", + "@esbuild/sunos-x64": "0.22.0", + "@esbuild/win32-arm64": "0.22.0", + "@esbuild/win32-ia32": "0.22.0", + "@esbuild/win32-x64": "0.22.0" } }, "escape-string-regexp": { diff --git a/code/package.json b/code/package.json index 326da1c1..fe562e0b 100644 --- a/code/package.json +++ b/code/package.json @@ -39,7 +39,7 @@ "@types/node": "^18", "@types/vscode": "1.78.0", "@vscode/vsce": "^2.29.0", - "esbuild": "^0.21.5", + "esbuild": "^0.22.0", "ovsx": "^0.9.1", "typescript": "^5.5.2" }, From 280f66683f67ceedffe1e9744919d8ab226e80b3 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Mon, 8 Jul 2024 20:32:21 +0100 Subject: [PATCH 18/48] sphinx-agent: Inject uri and line number information into build files In order to support included files, the webview code needs access to the source uri in addition to the line number. Rather than even attempt to force uris to work with CSS classes, the `SourceLocationTransform` includes a hidden div with a list of `` elements, one for each location marker. These `` elements have `data-uri` and `data-line` attributes containing the necessary information to make sync scrolling work. Each element has a `data-id` attribute which corresponds to a CSS class `esbonio-marker-` which links the location which its corresponding location in the DOM --- .../esbonio/sphinx_agent/handlers/__init__.py | 25 +-- .../esbonio/sphinx_agent/handlers/webview.py | 91 +++++++++++ lib/esbonio/esbonio/sphinx_agent/log.py | 154 ++++++++++-------- .../esbonio/sphinx_agent/transforms.py | 17 -- .../tests/sphinx-agent/test_sa_unit.py | 26 ++- 5 files changed, 190 insertions(+), 123 deletions(-) create mode 100644 lib/esbonio/esbonio/sphinx_agent/handlers/webview.py delete mode 100644 lib/esbonio/esbonio/sphinx_agent/transforms.py diff --git a/lib/esbonio/esbonio/sphinx_agent/handlers/__init__.py b/lib/esbonio/esbonio/sphinx_agent/handlers/__init__.py index b669b4a6..613cad2f 100644 --- a/lib/esbonio/esbonio/sphinx_agent/handlers/__init__.py +++ b/lib/esbonio/esbonio/sphinx_agent/handlers/__init__.py @@ -1,6 +1,5 @@ import inspect import logging -import pathlib import sys import traceback import typing @@ -18,16 +17,15 @@ from .. import types from ..app import Sphinx from ..config import SphinxConfig -from ..transforms import LineNumberTransform from ..types import Uri from ..util import send_error from ..util import send_message -STATIC_DIR = (pathlib.Path(__file__).parent.parent / "static").resolve() sphinx_logger = logging.getLogger(SPHINX_LOG_NAMESPACE) # Inject our own 'core' extensions into Sphinx sphinx.application.builtin_extensions += ( + f"{__name__}.webview", f"{__name__}.files", f"{__name__}.diagnostics", f"{__name__}.symbols", @@ -118,13 +116,10 @@ def create_sphinx_app(self, request: types.CreateApplicationRequest): self.app = Sphinx(**sphinx_args) # Connect event handlers. - self.app.connect("env-before-read-docs", self._cb_env_before_read_docs) - self.app.connect("source-read", self._cb_source_read, priority=0) - # TODO: Sphinx 7.x has introduced a `include-read` event # See: https://github.com/sphinx-doc/sphinx/pull/11657 - - _enable_sync_scrolling(self.app) + self.app.connect("env-before-read-docs", self._cb_env_before_read_docs) + self.app.connect("source-read", self._cb_source_read, priority=0) response = types.CreateApplicationResponse( id=request.id, @@ -191,17 +186,3 @@ def build_sphinx_app(self, request: types.BuildRequest): def notify_exit(self, request: types.ExitNotification): """Sent from the client to signal that the agent should exit.""" sys.exit(0) - - -def _enable_sync_scrolling(app: Sphinx): - """Given a Sphinx application, configure it so that we can support syncronised - scrolling.""" - - # Inline the JS code we need to enable sync scrolling. - # - # Yes this "bloats" every page in the generated docs, but is generally more robust - # see: https://github.com/swyddfa/esbonio/issues/810 - webview_js = STATIC_DIR / "webview.js" - app.add_js_file(None, body=webview_js.read_text()) - - app.add_transform(LineNumberTransform) diff --git a/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py b/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py new file mode 100644 index 00000000..35c09169 --- /dev/null +++ b/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py @@ -0,0 +1,91 @@ +from __future__ import annotations + +import pathlib +import typing + +from docutils import nodes +from docutils.transforms import Transform + +from ..log import source_to_uri_and_linum + +if typing.TYPE_CHECKING: + from typing import Dict + from typing import Tuple + + from sphinx.application import Sphinx + + +STATIC_DIR = (pathlib.Path(__file__).parent.parent / "static").resolve() + + +def has_source(node): + if isinstance(node, nodes.Text): + return False + + return (node.line or 0) > 0 and node.source is not None + + +class source_locations(nodes.General, nodes.Element): + """Index of all known source locations.""" + + +def visit_source_locations(self, node): + source_index: Dict[int, Tuple[str, int]] = node["index"] + + self.body.append('") + + +def depart_source_locations(self, node): ... + + +class SourceLocationTransform(Transform): + """Add source location information to the doctree. + + Used to support features like synchronised scrolling. + """ + + default_priority = 500 + + def apply(self, **kwargs): + current_line = 0 + current_source = None + + source_index = {} + source_nodes = self.document.traverse(condition=has_source) + + for idx, node in enumerate(source_nodes): + if node.line > current_line or node.source != current_source: + uri, linum = source_to_uri_and_linum(f"{node.source}:{node.line}") + + if linum is None: + continue + + source_index[idx] = (str(uri), linum) + node["classes"].extend(["esbonio-marker", f"esbonio-marker-{idx}"]) + + # Use the source and line reported by docutils. + # Just in case source_to_uri_and_linum doesn't handle things correctly + current_line = node.line + current_source = node.source + + self.document.children.append(source_locations("", index=source_index)) + + +def setup(app: Sphinx): + # Inline the JS code we need to enable sync scrolling. + # + # Yes this "bloats" every page in the generated docs, but is generally more robust + # see: https://github.com/swyddfa/esbonio/issues/810 + webview_js = STATIC_DIR / "webview.js" + app.add_js_file(None, body=webview_js.read_text()) + + app.add_node( + source_locations, html=(visit_source_locations, depart_source_locations) + ) + app.add_transform(SourceLocationTransform) diff --git a/lib/esbonio/esbonio/sphinx_agent/log.py b/lib/esbonio/esbonio/sphinx_agent/log.py index 4ec7b632..5543e082 100644 --- a/lib/esbonio/esbonio/sphinx_agent/log.py +++ b/lib/esbonio/esbonio/sphinx_agent/log.py @@ -38,73 +38,6 @@ def __init__(self, app, *args, **kwargs): self.app = app self.diagnostics: Dict[Uri, Set[types.Diagnostic]] = {} - def get_location(self, location: str) -> Tuple[str, Optional[int]]: - if not location: - conf = pathlib.Path(self.app.confdir, "conf.py") - return (str(conf), None) - - lineno = None - path, parts = self.get_location_path(location) - - if len(parts) == 1: - try: - lineno = int(parts[0]) - except ValueError: - pass - - if len(parts) == 2 and parts[0].startswith("docstring of "): - target = parts[0].replace("docstring of ", "") - lineno = self.get_docstring_location(target, parts[1]) - - return (path, lineno) - - def get_location_path(self, location: str) -> Tuple[str, List[str]]: - """Determine the filepath from the given location.""" - - if location.startswith("internal padding before "): - location = location.replace("internal padding before ", "") - - if location.startswith("internal padding after "): - location = location.replace("internal padding after ", "") - - path, *parts = location.split(":") - - # On windows the rest of the path will be the first element of parts - if pathlib.Path(location).drive: - path += f":{parts.pop(0)}" - - # Diagnostics in .. included:: files are reported relative to the process' - # working directory, so ensure the path is absolute. - path = os.path.abspath(path) - - return path, parts - - def get_docstring_location(self, target: str, offset: str) -> Optional[int]: - # The containing module will be the longest substring we can find in target - candidates = [m for m in sys.modules.keys() if target.startswith(m)] + [""] - module = sys.modules.get(sorted(candidates, key=len, reverse=True)[0], None) - - if module is None: - return None - - obj: Union[ModuleType, Any, None] = module - dotted_name = target.replace(module.__name__ + ".", "") - - for name in dotted_name.split("."): - obj = getattr(obj, name, None) - if obj is None: - return None - - try: - _, line = inspect.getsourcelines(obj) # type: ignore - - # Correct off by one error for docstrings that don't start with a newline. - nl = (obj.__doc__ or "").startswith("\n") - return line + int(offset) - (not nl) - except Exception: - logger.debug("Unable to determine diagnostic location\n%s", exc_info=True) - return None - def filter(self, record: logging.LogRecord) -> bool: conditions = [ "sphinx" not in record.name, @@ -115,7 +48,12 @@ def filter(self, record: logging.LogRecord) -> bool: return True loc = getattr(record, "location", "") - doc, lineno = self.get_location(loc) + uri, lineno = source_to_uri_and_linum(loc) + + if uri is None: + conf = pathlib.Path(self.app.confdir, "conf.py") + uri, lineno = (Uri.for_file(conf), None) + line = lineno or 1 try: @@ -144,5 +82,83 @@ def filter(self, record: logging.LogRecord) -> bool: ), ) - self.diagnostics.setdefault(Uri.for_file(doc), set()).add(diagnostic) + self.diagnostics.setdefault(uri, set()).add(diagnostic) return True + + +def source_to_uri_and_linum(location: str) -> Tuple[Optional[Uri], Optional[int]]: + """Convert the given source location to a uri and corresponding line number + + Parameters + ---------- + location + The location to convert + + Returns + ------- + Tuple[Optional[Uri], Optional[int]] + The corresponding uri and line number, if known + """ + lineno = None + path, parts = _get_location_path(location) + + if len(parts) == 1: + try: + lineno = int(parts[0]) + except ValueError: + pass + + if len(parts) == 2 and parts[0].startswith("docstring of "): + target = parts[0].replace("docstring of ", "") + lineno = _get_docstring_linum(target, parts[1]) + + return Uri.for_file(path), lineno + + +def _get_location_path(location: str) -> Tuple[str, List[str]]: + """Determine the filepath from the given location.""" + + if location.startswith("internal padding before "): + location = location.replace("internal padding before ", "") + + if location.startswith("internal padding after "): + location = location.replace("internal padding after ", "") + + path, *parts = location.split(":") + + # On windows the rest of the path will be the first element of parts + if pathlib.Path(location).drive: + path += f":{parts.pop(0)}" + + # Diagnostics in .. included:: files are reported relative to the process' + # working directory, so ensure the path is absolute. + path = os.path.abspath(path) + + return path, parts + + +def _get_docstring_linum(target: str, offset: str) -> Optional[int]: + # The containing module will be the longest substring we can find in target + candidates = [m for m in sys.modules.keys() if target.startswith(m)] + [""] + module = sys.modules.get(sorted(candidates, key=len, reverse=True)[0], None) + + if module is None: + return None + + obj: Union[ModuleType, Any, None] = module + dotted_name = target.replace(module.__name__ + ".", "") + + for name in dotted_name.split("."): + obj = getattr(obj, name, None) + if obj is None: + return None + + try: + _, line = inspect.getsourcelines(obj) # type: ignore + + # Correct off by one error for docstrings that don't start with a newline. + nl = (obj.__doc__ or "").startswith("\n") + return line + int(offset) - (not nl) + except Exception: + logger.debug("Unable to determine diagnostic location\n%s", exc_info=True) + return None diff --git a/lib/esbonio/esbonio/sphinx_agent/transforms.py b/lib/esbonio/esbonio/sphinx_agent/transforms.py deleted file mode 100644 index a3dfd462..00000000 --- a/lib/esbonio/esbonio/sphinx_agent/transforms.py +++ /dev/null @@ -1,17 +0,0 @@ -from docutils import nodes -from docutils.transforms import Transform - - -class LineNumberTransform(Transform): - """Adds line number markers to html nodes. - - Used to implement sync scrolling - """ - - default_priority = 500 - - def apply(self, **kwargs): - for node in self.document.traverse(nodes.paragraph): - if node.line: - node["classes"].append("linemarker") - node["classes"].append(f"linemarker-{node.line}") diff --git a/lib/esbonio/tests/sphinx-agent/test_sa_unit.py b/lib/esbonio/tests/sphinx-agent/test_sa_unit.py index 65462879..6f83c7f8 100644 --- a/lib/esbonio/tests/sphinx-agent/test_sa_unit.py +++ b/lib/esbonio/tests/sphinx-agent/test_sa_unit.py @@ -11,6 +11,8 @@ from esbonio.sphinx_agent.config import SphinxConfig from esbonio.sphinx_agent.log import DiagnosticFilter +from esbonio.sphinx_agent.log import source_to_uri_and_linum +from esbonio.sphinx_agent.types import Uri if typing.TYPE_CHECKING: from typing import Any @@ -457,30 +459,24 @@ def test_cli_arg_handling(args: List[str], expected: Dict[str, Any]): @pytest.mark.parametrize( "location, expected", [ - ("", (str(CONF_PATH), None)), - (f"{RST_PATH}", (str(RST_PATH), None)), - (f"{RST_PATH}:", (str(RST_PATH), None)), - (f"{RST_PATH}:3", (str(RST_PATH), 3)), - (f"{REL_INC_PATH}:12", (str(INC_PATH), 12)), + (f"{RST_PATH}", (Uri.for_file(RST_PATH), None)), + (f"{RST_PATH}:", (Uri.for_file(RST_PATH), None)), + (f"{RST_PATH}:3", (Uri.for_file(RST_PATH), 3)), + (f"{REL_INC_PATH}:12", (Uri.for_file(INC_PATH), 12)), ( f"{PY_PATH}:docstring of esbonio.sphinx_agent.log.DiagnosticFilter:3", - (str(PY_PATH), 22), + (Uri.for_file(PY_PATH), 22), ), - (f"internal padding after {RST_PATH}:34", (str(RST_PATH), 34)), - (f"internal padding before {RST_PATH}:34", (str(RST_PATH), 34)), + (f"internal padding after {RST_PATH}:34", (Uri.for_file(RST_PATH), 34)), + (f"internal padding before {RST_PATH}:34", (Uri.for_file(RST_PATH), 34)), ], ) -def test_get_diagnostic_location(location: str, expected: Tuple[str, Optional[int]]): +def test_source_to_uri_linum(location: str, expected: Tuple[str, Optional[int]]): """Ensure we can correctly determine a dianostic's location based on the string we get from sphinx.""" - app = mock.Mock() - app.confdir = str(ROOT / "sphinx-extensions") - - handler = DiagnosticFilter(app) - mockpath = f"{DiagnosticFilter.__module__}.inspect.getsourcelines" with mock.patch(mockpath, return_value=([""], 20)): - actual = handler.get_location(location) + actual = source_to_uri_and_linum(location) assert actual == expected From 06d707dc1c8a139fd35ce8d7096a0221625aa3ce Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Thu, 11 Jul 2024 23:02:07 +0100 Subject: [PATCH 19/48] sphinx-agent: Update webview.js This aligns the `webview.js` file injected into HTML to the updated source location information to add support for mutliple source files. --- .../esbonio/sphinx_agent/static/webview.js | 170 ++++++++++++------ 1 file changed, 118 insertions(+), 52 deletions(-) diff --git a/lib/esbonio/esbonio/sphinx_agent/static/webview.js b/lib/esbonio/esbonio/sphinx_agent/static/webview.js index e9e3f6d9..c2642ea5 100644 --- a/lib/esbonio/esbonio/sphinx_agent/static/webview.js +++ b/lib/esbonio/esbonio/sphinx_agent/static/webview.js @@ -1,45 +1,116 @@ // This file gets injected into html pages built with Sphinx // which allows the webpage to talk with the preview server and coordinate details such as refreshes // and page scrolling. -function indexScrollTargets() { - let targets = new Map() - for (let target of Array.from(document.querySelectorAll(".linemarker"))) { - - let linum - for (let cls of target.classList) { - let result = cls.match(/linemarker-(\d+)/) - if (result) { - linum = parseInt(result[1]) - targets.set(linum, target) - break - } + +/** + * Find the uri and line number the editor should scroll to + * + * @returns {[string, number]} - The uri and line number + */ +function findEditorScrollTarget() { + const markers = document.querySelectorAll(".esbonio-marker") + + for (let marker of markers) { + const bbox = marker.getBoundingClientRect() + // TODO: This probably needs to be made smarter as it does not account + // for elements that are technically on screen but hidden. - e.g. by furo's header bar. + if (bbox.top < 60) { + continue + } + + const match = marker.className.match(/.* esbonio-marker-(\d+).*/) + if (!match || !match[1]) { + console.debug(`Unable to find marker id in '${marker.className}'`) + return } + + const markerId = match[1] + const location = document.querySelector(`#esbonio-marker-index span[data-id="${markerId}"]`) + if (!location) { + console.debug(`Unable to locate source for marker id: '${markerId}'`) + return + } + + const uri = location.dataset.uri + const line = parseInt(location.dataset.line) + return [uri, line] } - return targets + return } -// Return the line number we should ask the editor to scroll to. -function findScrollTarget() { +/** + * Scroll the webview to show the given location + * + * @param {string} uri - The uri of the document to reveal + * @param {number} linum - The line number within that document to reveal + */ +function scrollViewTo(uri, linum) { + + // Select all the markers with the given uri. + const markers = Array.from( + document.querySelectorAll(`#esbonio-marker-index span[data-uri="${uri}"]`) + ) - // Are we at the top of the page? - if (window.scrollY <= 100) { - return -1 + if (!markers) { + return } - for (let [linum, target] of scrollTargets.entries()) { - const bbox = target.getBoundingClientRect() - // TODO: This probably needs to be made smarter as it does not account - // for elements that are technically on screen but hidden. - e.g. by furo's header bar. - if (bbox.top > 0) { - return linum + /** @type {HTMLElement} */ + let current + + /** @type {number} */ + let currentLine = 0 + + /** @type {HTMLElement} */ + let previous + + /** @type {number} */ + let previousLine + + for (let marker of markers) { + let markerId = marker.dataset.id + let markerLine = parseInt(marker.dataset.line) + let element = document.querySelector(`.esbonio-marker-${markerId}`) + + // Only consider markers that correspond with an element currently in the DOM + if (!element) { + continue + } + + current = element + currentLine = markerLine + + // Have we passed the target line number? + if (markerLine > linum) { + break } + + previous = current + previousLine = currentLine } - return -} + if (!current) { + return + } + + if (!previous) { + previous = current + previousLine = currentLine + } + + // Scroll the view to a position that is an interpolation between the previous and + // current marker based on the requested line number. + const previousPos = window.scrollY + previous.getBoundingClientRect().top + const currentPos = window.scrollY + current.getBoundingClientRect().top -let scrollTargets = new Map() + const t = (linum - previousLine) / Math.max(currentLine - previousLine, 1) + const y = (1 - t) * previousPos + t * currentPos + + console.table({line: linum, previous: previousLine, current: currentLine, t: t, y: y}) + + window.scrollTo(0, y - 60) +} const host = window.location.hostname; const queryString = window.location.search; @@ -67,20 +138,7 @@ const handlers = { console.debug("Reloading page...") window.location.reload() }, - "view/scroll": function (params) { - if (params.line <= 1) { - window.scrollTo(0, 0) - return - } - - // TODO: Look for targets within X of target line instead? - let target = scrollTargets.get(params.line) - if (!target) { - return - } - - target.scrollIntoView(true) - } + "view/scroll": (params) => {scrollViewTo(params.uri, params.line)} } function handle(message) { @@ -91,14 +149,15 @@ function handle(message) { console.error(`Error: ${JSON.stringify(message.error, undefined, 2)}`) } else if (message.method) { let method = message.method - console.debug(`Got request: ${method}, ${JSON.stringify(params, undefined, 2)}`) + console.debug(`Request: ${method}, ${JSON.stringify(params, undefined, 2)}`) } else { let result = message.result - console.debug(`Got response: ${JSON.stringify(result, undefined, 2)}`) + console.debug(`Response: ${JSON.stringify(result, undefined, 2)}`) } } else { let handler = handlers[message.method] if (handler) { + // console.debug(`Notification: ${message.method}, ${JSON.stringify(message.params)} `) handler(message.params) } else { console.error(`Got unknown notification: '${message.method}'`) @@ -107,13 +166,23 @@ function handle(message) { } window.addEventListener("scroll", (event) => { - let linum = findScrollTarget() - if (linum) { - // TODO: Rate limits. - sendMessage( - { jsonrpc: "2.0", method: "editor/scroll", params: { line: linum } } - ) + const target = findEditorScrollTarget() + if (!target) { + return + } + + const uri = target[0] + const line = target[1] + + if (!uri || !line) { + return } + + // TODO: Rate limits. + sendMessage( + { jsonrpc: "2.0", method: "editor/scroll", params: { uri: uri, line: line } } + ) + }) // Connection opened @@ -128,9 +197,6 @@ socket.addEventListener("message", (event) => { }); function main() { - scrollTargets = indexScrollTargets() - console.debug(scrollTargets) - if (showMarkers) { let markerStyle = document.createElement('style') let lines = [".linemarker { background: rgb(255, 0, 0, 0.25); position: relative; }"] From 1544137a5fd0c9b126741e33a9b42a6977f271e1 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Thu, 11 Jul 2024 23:07:59 +0100 Subject: [PATCH 20/48] lsp: Pass uri and line number between client and webview This aligns the language server with recent changes to enable synchronised scrolling across multiple source files. Additionaly, rather than send a custom `editor/scroll` notification to the client, the server will now send a `window/showDocument` request taking advantage of the `selection` parameter. This *in theory* should reduce the amount of integration work required to enable sync scrolling in new clients. --- lib/esbonio/changes/784.enhancement.md | 1 + lib/esbonio/changes/786.enhancement.md | 1 + .../features/preview_manager/__init__.py | 6 +++--- .../features/preview_manager/webview.py | 21 ++++++++++++++++--- 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 lib/esbonio/changes/784.enhancement.md create mode 100644 lib/esbonio/changes/786.enhancement.md diff --git a/lib/esbonio/changes/784.enhancement.md b/lib/esbonio/changes/784.enhancement.md new file mode 100644 index 00000000..4f154789 --- /dev/null +++ b/lib/esbonio/changes/784.enhancement.md @@ -0,0 +1 @@ +Synchronised scrolling now works with files that have been `.. included::`, as well as autodoc docstrings diff --git a/lib/esbonio/changes/786.enhancement.md b/lib/esbonio/changes/786.enhancement.md new file mode 100644 index 00000000..15d0af65 --- /dev/null +++ b/lib/esbonio/changes/786.enhancement.md @@ -0,0 +1 @@ +The resolution of sync scrolling has been improved with the webview also better handling the case where the requested line does not exactly match a known source location diff --git a/lib/esbonio/esbonio/server/features/preview_manager/__init__.py b/lib/esbonio/esbonio/server/features/preview_manager/__init__.py index 5436926f..723e9bbb 100644 --- a/lib/esbonio/esbonio/server/features/preview_manager/__init__.py +++ b/lib/esbonio/esbonio/server/features/preview_manager/__init__.py @@ -137,13 +137,13 @@ async def on_build(self, client: SphinxClient, result): self.logger.debug("Refreshing preview") self.webview.reload() - async def scroll_view(self, line: int): + async def scroll_view(self, uri: str, line: int): """Scroll the webview to the given line number.""" if self.webview is None: return - self.webview.scroll(line) + self.webview.scroll(uri, line) async def preview_file(self, params, retry=True): if self.preview is None: @@ -224,7 +224,7 @@ def esbonio_setup( @esbonio.feature("view/scroll") async def on_scroll(ls: server.EsbonioLanguageServer, params): - await manager.scroll_view(params.line) + await manager.scroll_view(params.uri, params.line) @esbonio.command("esbonio.server.previewFile") async def preview_file(ls: server.EsbonioLanguageServer, *args): diff --git a/lib/esbonio/esbonio/server/features/preview_manager/webview.py b/lib/esbonio/esbonio/server/features/preview_manager/webview.py index e4e339c6..78de9332 100644 --- a/lib/esbonio/esbonio/server/features/preview_manager/webview.py +++ b/lib/esbonio/esbonio/server/features/preview_manager/webview.py @@ -6,6 +6,7 @@ import socket import typing +from lsprotocol import types from pygls.protocol import JsonRPCProtocol from pygls.protocol import default_converter from pygls.server import Server @@ -52,6 +53,9 @@ def __init__(self, logger: logging.Logger, config: PreviewConfig, *args, **kwarg self._view_in_control: Optional[asyncio.Task] = None """If set, the view is in control and the editor should not emit scroll events""" + self._current_uri: Optional[str] = None + """If set, indicates the current uri the editor and view are scrolling.""" + def __await__(self): """Makes the server await-able""" if self._startup_task is None: @@ -80,7 +84,7 @@ def reload(self): if self.connected: self.lsp.notify("view/reload", {}) - def scroll(self, line: int): + def scroll(self, uri: str, line: int): """Called by the editor to scroll the current webview.""" if not self.connected or self._view_in_control: return @@ -89,8 +93,9 @@ def scroll(self, line: int): if self._editor_in_control: self._editor_in_control.cancel() + self._current_uri = uri self._editor_in_control = asyncio.create_task(self.cooldown("editor")) - self.lsp.notify("view/scroll", {"line": line}) + self.lsp.notify("view/scroll", {"uri": uri, "line": line}) async def cooldown(self, name: str): """Create a cooldown.""" @@ -164,6 +169,16 @@ def on_scroll(ls: WebviewServer, params): server._view_in_control.cancel() server._view_in_control = asyncio.create_task(server.cooldown("view")) - esbonio.lsp.notify("editor/scroll", dict(line=params.line)) + + esbonio.lsp.show_document( + types.ShowDocumentParams( + uri=params.uri, + external=False, + selection=types.Range( + start=types.Position(line=params.line - 1, character=0), + end=types.Position(line=params.line, character=0), + ), + ) + ) return server From 6d7b57caebfe80a0cc07669bc8081ddb01ed9c17 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Thu, 11 Jul 2024 23:19:09 +0100 Subject: [PATCH 21/48] code: Align to sync scrolling changes --- code/src/node/client.ts | 8 +++-- code/src/node/preview.ts | 78 ++++++++++++++++++++++++++-------------- 2 files changed, 57 insertions(+), 29 deletions(-) diff --git a/code/src/node/client.ts b/code/src/node/client.ts index 80463d9f..6ef3a40a 100644 --- a/code/src/node/client.ts +++ b/code/src/node/client.ts @@ -306,8 +306,10 @@ export class EsbonioClient { } - public scrollView(line: number) { - this.client?.sendNotification(Notifications.VIEW_SCROLL, { line: line }) + public scrollView(uri: vscode.Uri, line: number) { + this.client?.sendNotification(Notifications.VIEW_SCROLL, { + uri: uri.toString(), line: line + }) } @@ -368,7 +370,7 @@ export class EsbonioClient { }, window: { showDocument: async (params: ShowDocumentParams, next) => { - this.logger.debug(`window/showDocument: ${JSON.stringify(params, undefined, 2)}`) + // this.logger.debug(`window/showDocument: ${JSON.stringify(params, undefined, 2)}`) this.callHandlers("window/showDocument", { params: params, default: next }) return { success: true } } diff --git a/code/src/node/preview.ts b/code/src/node/preview.ts index ff91f966..2eb2e829 100644 --- a/code/src/node/preview.ts +++ b/code/src/node/preview.ts @@ -2,7 +2,7 @@ import * as vscode from 'vscode' import { OutputChannelLogger } from '../common/log' import { EsbonioClient } from './client' import { Commands, Events, Notifications } from '../common/constants' -import { ShowDocumentParams } from 'vscode-languageclient' +import { ShowDocumentParams, Range } from 'vscode-languageclient' interface PreviewFileParams { uri: string @@ -17,9 +17,12 @@ export class PreviewManager { private panel?: vscode.WebviewPanel - // The uri of the document currently shown in the preview pane + /** The uri of the document currently shown in the preview pane */ private currentUri?: vscode.Uri + /** If `true`, indicates that we are currently changing the document being previewed */ + private changingDocument = false + constructor( private logger: OutputChannelLogger, private context: vscode.ExtensionContext, @@ -43,12 +46,6 @@ export class PreviewManager { (params: { params: ShowDocumentParams, default: any }) => this.showDocument(params) ) - // View -> editor sync scrolling implementation - client.addHandler( - Notifications.SCROLL_EDITOR, - (params: { line: number }) => { this.scrollEditor(params) } - ) - client.addHandler( Events.SERVER_START, async (_: any) => { @@ -80,21 +77,6 @@ export class PreviewManager { return await this.previewEditor(editor, vscode.ViewColumn.Beside) } - private scrollEditor(params: { line: number }) { - let editor = findEditorFor(this.currentUri) - if (!editor) { - return - } - // this.logger.debug(`Scrolling: ${JSON.stringify(params)}`) - - let target = new vscode.Range( - new vscode.Position(Math.max(0, params.line - 2), 0), - new vscode.Position(params.line + 2, 0) - ) - - editor.revealRange(target, vscode.TextEditorRevealType.AtTop) - } - private scrollView(editor: vscode.TextEditor) { if (editor.document.uri !== this.currentUri) { return @@ -103,7 +85,7 @@ export class PreviewManager { // More than one range here implies that some regions of code have been folded. // Though I doubt it matters too much for this use case?.. let range = editor.visibleRanges[0] - this.client.scrollView(range.start.line + 1) + this.client.scrollView(editor.document.uri, range.start.line + 1) } private async onDidChangeEditor(editor?: vscode.TextEditor) { @@ -120,6 +102,11 @@ export class PreviewManager { } private async previewEditor(editor: vscode.TextEditor, placement?: vscode.ViewColumn) { + + if (this.changingDocument) { + return + } + if (this.currentUri === editor.document.uri && this.panel) { // There is nothing to do. return @@ -141,12 +128,40 @@ export class PreviewManager { this.currentUri = editor.document.uri } - private showDocument(params: { params: ShowDocumentParams, default: any }) { + private showDocument(req: { params: ShowDocumentParams, default: any }) { + let params = req.params + if (!params.external) { + return this.showInternalDocument(params) + } + if (!this.panel) { return } - this.panel.webview.postMessage({ 'show': params.params.uri }) + this.panel.webview.postMessage({ 'show': params.uri }) + } + + private showInternalDocument(params: ShowDocumentParams) { + this.changingDocument = true + this.currentUri = vscode.Uri.parse(params.uri) + + vscode.window.showTextDocument( + this.currentUri, + { + preserveFocus: true, + // Force document to open in column one, otherwise VSCode may open editor over the + // preview pane. + viewColumn: vscode.ViewColumn.One + } + ).then(editor => { + const range = selectionToRange(params.selection) + if (range) { + editor.revealRange(range, vscode.TextEditorRevealType.AtTop) + } + this.changingDocument = false + }) + + return } private getPanel(placement: vscode.ViewColumn): vscode.WebviewPanel { @@ -342,6 +357,17 @@ export class PreviewManager { } +function selectionToRange(selection?: Range): vscode.Range | undefined { + if (!selection) { + return + } + + return new vscode.Range( + new vscode.Position(selection.start.line, selection.start.character), + new vscode.Position(selection.end.line, selection.end.character), + ) +} + /** * Return the text editor showing the given uri. * @param uri The uri of the document in the editor From e755dfab4d74da454e3cdf2df7e712ad8be24d05 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 12 Jul 2024 21:13:29 +0100 Subject: [PATCH 22/48] sphinx-agent: Add `--enable-devtools` option to test suite Running pytest with the `--enable-devtools` flag will enable the use of `lsp-devtools` with the sphinx agent instance under test --- lib/esbonio/tests/conftest.py | 12 ++++++++++++ lib/esbonio/tests/sphinx-agent/conftest.py | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/esbonio/tests/conftest.py b/lib/esbonio/tests/conftest.py index 4359fde1..3ff5e901 100644 --- a/lib/esbonio/tests/conftest.py +++ b/lib/esbonio/tests/conftest.py @@ -7,6 +7,18 @@ TEST_DIR = pathlib.Path(__file__).parent +def pytest_addoption(parser): + """Add additional cli arguments to pytest.""" + + group = parser.getgroup("esbonio") + group.addoption( + "--enable-devtools", + dest="enable_devtools", + action="store_true", + help="enable lsp-devtools integrations", + ) + + @pytest.fixture(scope="session") def uri_for(): """Helper function for returning the uri for a given file in the ``tests/`` diff --git a/lib/esbonio/tests/sphinx-agent/conftest.py b/lib/esbonio/tests/sphinx-agent/conftest.py index 071072f7..4f568389 100644 --- a/lib/esbonio/tests/sphinx-agent/conftest.py +++ b/lib/esbonio/tests/sphinx-agent/conftest.py @@ -28,7 +28,7 @@ def build_dir(tmp_path_factory): @pytest_asyncio.fixture -async def client(uri_for, build_dir): +async def client(request, uri_for, build_dir): demo_workspace = uri_for("workspaces", "demo") test_uri = demo_workspace / "index.rst" @@ -39,6 +39,7 @@ async def client(uri_for, build_dir): ], ) config = SphinxConfig( + enable_dev_tools=request.config.getoption("enable_devtools"), python_command=[sys.executable], build_command=[ "sphinx-build", From 860d7a92c02e500734b993727cfcd508023d885a Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 12 Jul 2024 21:15:20 +0100 Subject: [PATCH 23/48] sphinx-agent: Fix crash on older versions of Sphinx --- lib/esbonio/esbonio/sphinx_agent/handlers/webview.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py b/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py index 35c09169..d757ac2a 100644 --- a/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py +++ b/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py @@ -5,6 +5,8 @@ from docutils import nodes from docutils.transforms import Transform +from sphinx import addnodes +from sphinx import version_info from ..log import source_to_uri_and_linum @@ -22,6 +24,16 @@ def has_source(node): if isinstance(node, nodes.Text): return False + # For some reason, including `toctreenode` causes Sphinx 5.x and 6.x to crash with a + # cryptic error. + # + # AssertionError: Losing "classes" attribute + # + # Caused by this line: + # https://github.com/sphinx-doc/sphinx/blob/ec993dda3690f260345133c47a4a0f6ef0b18493/sphinx/environment/__init__.py#L630 + if isinstance(node, addnodes.toctree) and version_info[0] < 7: + return False + return (node.line or 0) > 0 and node.source is not None From 87f8fe87941a4fae1256695d104f4bb8bd762b92 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 12 Jul 2024 21:16:20 +0100 Subject: [PATCH 24/48] sphinx-agent: Handle the case where `location` may be `None` --- lib/esbonio/esbonio/sphinx_agent/handlers/webview.py | 2 +- lib/esbonio/esbonio/sphinx_agent/log.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py b/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py index d757ac2a..28092141 100644 --- a/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py +++ b/lib/esbonio/esbonio/sphinx_agent/handlers/webview.py @@ -75,7 +75,7 @@ def apply(self, **kwargs): if node.line > current_line or node.source != current_source: uri, linum = source_to_uri_and_linum(f"{node.source}:{node.line}") - if linum is None: + if uri is None or linum is None: continue source_index[idx] = (str(uri), linum) diff --git a/lib/esbonio/esbonio/sphinx_agent/log.py b/lib/esbonio/esbonio/sphinx_agent/log.py index 5543e082..01aeca69 100644 --- a/lib/esbonio/esbonio/sphinx_agent/log.py +++ b/lib/esbonio/esbonio/sphinx_agent/log.py @@ -86,7 +86,9 @@ def filter(self, record: logging.LogRecord) -> bool: return True -def source_to_uri_and_linum(location: str) -> Tuple[Optional[Uri], Optional[int]]: +def source_to_uri_and_linum( + location: Optional[str], +) -> Tuple[Optional[Uri], Optional[int]]: """Convert the given source location to a uri and corresponding line number Parameters @@ -99,6 +101,9 @@ def source_to_uri_and_linum(location: str) -> Tuple[Optional[Uri], Optional[int] Tuple[Optional[Uri], Optional[int]] The corresponding uri and line number, if known """ + if location is None: + return None, None + lineno = None path, parts = _get_location_path(location) From e008d3900d41e998eaa255428f7e2ea5e9db4bd6 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 12 Jul 2024 21:19:09 +0100 Subject: [PATCH 25/48] sphinx-agent: Temporarily put the `esbonio/` folder on the path Now that we have added a custom node, objects from the `sphinx_agent` module can end up in Sphinx's `environment.pickle` file. This means in order to be unpickled correctly Python needs to be able to do something like `from sphinx_agent.X import Y` However, the pytest process does not have the same Python path as the sphinx agent process that created the `environment.pickle` file. So when trying to load the environment in the `app` fixture, it fails and the tests that depend on it are not running with the right data available. To mitigate this, the `app` fixture temporarily puts the `esbonio/` folder onto `sys.path`, making the `sphinx_agent` module available to the pytest process and the environment is unpickled correctly. This doesn't necessarily feel like a great solution, but it appears to work. Finally, the fixture switches from using `sphinx.application.Sphinx` to `sphinx_agent.app.Sphinx` as the `sphinx_agent` based extensions depend on the extra `esbonio` attribute. --- lib/esbonio/tests/sphinx-agent/conftest.py | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/lib/esbonio/tests/sphinx-agent/conftest.py b/lib/esbonio/tests/sphinx-agent/conftest.py index 4f568389..2e43d085 100644 --- a/lib/esbonio/tests/sphinx-agent/conftest.py +++ b/lib/esbonio/tests/sphinx-agent/conftest.py @@ -7,7 +7,6 @@ from lsprotocol.types import WorkspaceFolder from pygls.protocol import default_converter from pygls.workspace import Workspace -from sphinx.application import Sphinx from esbonio.server.features.project_manager import Project from esbonio.server.features.sphinx_manager.client import ClientState @@ -18,13 +17,18 @@ make_test_sphinx_client, ) from esbonio.server.features.sphinx_manager.config import SphinxConfig +from esbonio.server.features.sphinx_manager.config import get_module_path +from esbonio.sphinx_agent.app import Sphinx logger = logging.getLogger(__name__) @pytest.fixture def build_dir(tmp_path_factory): - return tmp_path_factory.mktemp("build") + _dir = tmp_path_factory.mktemp("build") + print(f"Using build dir: {_dir}") + + return _dir @pytest_asyncio.fixture @@ -64,7 +68,15 @@ async def client(request, uri_for, build_dir): @pytest.fixture def app(client, build_dir): """Sphinx application instance, used for validating results.""" - return Sphinx( + + # In order to load the pickled envrionment correctly, we need to temporarily put + # the parent directory of the `sphinx_agent` module on the path. + path = get_module_path("esbonio.sphinx_agent") + assert path is not None + + sys.path.insert(0, str(path)) + + _app = Sphinx( srcdir=client.sphinx_info.src_dir, confdir=client.sphinx_info.conf_dir, outdir=str(pathlib.Path(build_dir, "html")), @@ -72,6 +84,10 @@ def app(client, build_dir): buildername="html", ) + sys.path.pop(0) + + return _app + @pytest_asyncio.fixture async def project(client: SubprocessSphinxClient): From 4f3734ff80ce88307ce1d6f1a93b95d79995c331 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 14:04:01 +0000 Subject: [PATCH 26/48] build(deps-dev): bump typescript from 5.5.2 to 5.5.3 in /code Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.2 to 5.5.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.2...v5.5.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 14 +++++++------- code/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index d4b2def0..dd94cbd2 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -20,7 +20,7 @@ "@vscode/vsce": "^2.29.0", "esbuild": "^0.22.0", "ovsx": "^0.9.1", - "typescript": "^5.5.2" + "typescript": "^5.5.3" }, "engines": { "vscode": "^1.82.0" @@ -2756,9 +2756,9 @@ } }, "node_modules/typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -4893,9 +4893,9 @@ } }, "typescript": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz", - "integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==", + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.3.tgz", + "integrity": "sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==", "dev": true }, "uc.micro": { diff --git a/code/package.json b/code/package.json index fe562e0b..724bc181 100644 --- a/code/package.json +++ b/code/package.json @@ -41,7 +41,7 @@ "@vscode/vsce": "^2.29.0", "esbuild": "^0.22.0", "ovsx": "^0.9.1", - "typescript": "^5.5.2" + "typescript": "^5.5.3" }, "engines": { "vscode": "^1.82.0" From 94ca0b4fe67b99e92b9957fecd751dc999d42984 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 20:38:11 +0000 Subject: [PATCH 27/48] build(deps-dev): bump esbuild from 0.22.0 to 0.23.0 in /code Bumps [esbuild](https://github.com/evanw/esbuild) from 0.22.0 to 0.23.0. - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](https://github.com/evanw/esbuild/compare/v0.22.0...v0.23.0) --- updated-dependencies: - dependency-name: esbuild dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 398 ++++++++++++++++++++--------------------- code/package.json | 2 +- 2 files changed, 200 insertions(+), 200 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index dd94cbd2..1cc82f02 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -18,7 +18,7 @@ "@types/node": "^18", "@types/vscode": "1.78.0", "@vscode/vsce": "^2.29.0", - "esbuild": "^0.22.0", + "esbuild": "^0.23.0", "ovsx": "^0.9.1", "typescript": "^5.5.3" }, @@ -235,9 +235,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.22.0.tgz", - "integrity": "sha512-uvQR2crZ/zgzSHDvdygHyNI+ze9zwS8mqz0YtGXotSqvEE0UkYE9s+FZKQNTt1VtT719mfP3vHrUdCpxBNQZhQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", + "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", "cpu": [ "ppc64" ], @@ -251,9 +251,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.22.0.tgz", - "integrity": "sha512-PBnyP+r8vJE4ifxsWys9l+Mc2UY/yYZOpX82eoyGISXXb3dRr0M21v+s4fgRKWMFPMSf/iyowqPW/u7ScSUkjQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz", + "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", "cpu": [ "arm" ], @@ -267,9 +267,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.22.0.tgz", - "integrity": "sha512-UKhPb3o2gAB/bfXcl58ZXTn1q2oVu1rEu/bKrCtmm+Nj5MKUbrOwR5WAixE2v+lk0amWuwPvhnPpBRLIGiq7ig==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz", + "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", "cpu": [ "arm64" ], @@ -283,9 +283,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.22.0.tgz", - "integrity": "sha512-IjTYtvIrjhR41Ijy2dDPgYjQHWG/x/A4KXYbs1fiU3efpRdoxMChK3oEZV6GPzVEzJqxFgcuBaiX1kwEvWUxSw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz", + "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", "cpu": [ "x64" ], @@ -299,9 +299,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.22.0.tgz", - "integrity": "sha512-mqt+Go4y9wRvEz81bhKd9RpHsQR1LwU8Xm6jZRUV/xpM7cIQFbFH6wBCLPTNsdELBvfoHeumud7X78jQQJv2TA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz", + "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", "cpu": [ "arm64" ], @@ -315,9 +315,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.22.0.tgz", - "integrity": "sha512-vTaTQ9OgYc3VTaWtOE5pSuDT6H3d/qSRFRfSBbnxFfzAvYoB3pqKXA0LEbi/oT8GUOEAutspfRMqPj2ezdFaMw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz", + "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", "cpu": [ "x64" ], @@ -331,9 +331,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.22.0.tgz", - "integrity": "sha512-0e1ZgoobJzaGnR4reD7I9rYZ7ttqdh1KPvJWnquUoDJhL0rYwdneeLailBzd2/4g/U5p4e5TIHEWa68NF2hFpQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz", + "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", "cpu": [ "arm64" ], @@ -347,9 +347,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.22.0.tgz", - "integrity": "sha512-BFgyYwlCwRWyPQJtkzqq2p6pJbiiWgp0P9PNf7a5FQ1itKY4czPuOMAlFVItirSmEpRPCeImuwePNScZS0pL5Q==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz", + "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", "cpu": [ "x64" ], @@ -363,9 +363,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.22.0.tgz", - "integrity": "sha512-KEMWiA9aGuPUD4BH5yjlhElLgaRXe+Eri6gKBoDazoPBTo1BXc/e6IW5FcJO9DoL19FBeCxgONyh95hLDNepIg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz", + "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", "cpu": [ "arm" ], @@ -379,9 +379,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.22.0.tgz", - "integrity": "sha512-V/K2rctCUgC0PCXpN7AqT4hoazXKgIYugFGu/myk2+pfe6jTW2guz/TBwq4cZ7ESqusR/IzkcQaBkcjquuBWsw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz", + "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", "cpu": [ "arm64" ], @@ -395,9 +395,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.22.0.tgz", - "integrity": "sha512-r2ZZqkOMOrpUhzNwxI7uLAHIDwkfeqmTnrv1cjpL/rjllPWszgqmprd/om9oviKXUBpMqHbXmppvjAYgISb26Q==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz", + "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", "cpu": [ "ia32" ], @@ -411,9 +411,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.22.0.tgz", - "integrity": "sha512-qaowLrV/YOMAL2RfKQ4C/VaDzAuLDuylM2sd/LH+4OFirMl6CuDpRlCq4u49ZBaVV8pkI/Y+hTdiibvQRhojCA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz", + "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", "cpu": [ "loong64" ], @@ -427,9 +427,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.22.0.tgz", - "integrity": "sha512-hgrezzjQTRxjkQ5k08J6rtZN5PNnkWx/Rz6Kmj9gnsdCAX1I4Dn4ZPqvFRkXo55Q3pnVQJBwbdtrTO7tMGtyVA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz", + "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", "cpu": [ "mips64el" ], @@ -443,9 +443,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.22.0.tgz", - "integrity": "sha512-ewxg6FLLUio883XgSjfULEmDl3VPv/TYNnRprVAS3QeGFLdCYdx1tIudBcd7n9jIdk82v1Ajov4jx87qW7h9+g==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz", + "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", "cpu": [ "ppc64" ], @@ -459,9 +459,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.22.0.tgz", - "integrity": "sha512-Az5XbgSJC2lE8XK8pdcutsf9RgdafWdTpUK/+6uaDdfkviw/B4JCwAfh1qVeRWwOohwdsl4ywZrWBNWxwrPLFg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz", + "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", "cpu": [ "riscv64" ], @@ -475,9 +475,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.22.0.tgz", - "integrity": "sha512-8j4a2ChT9+V34NNNY9c/gMldutaJFmfMacTPq4KfNKwv2fitBCLYjee7c+Vxaha2nUhPK7cXcZpJtJ3+Y7ZdVQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz", + "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", "cpu": [ "s390x" ], @@ -491,9 +491,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.22.0.tgz", - "integrity": "sha512-JUQyOnpbAkkRFOk/AhsEemz5TfWN4FJZxVObUlnlNCbe7QBl61ZNfM4cwBXayQA6laMJMUcqLHaYQHAB6YQ95Q==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz", + "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", "cpu": [ "x64" ], @@ -507,9 +507,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.22.0.tgz", - "integrity": "sha512-11PoCoHXo4HFNbLsXuMB6bpMPWGDiw7xETji6COdJss4SQZLvcgNoeSqWtATRm10Jj1uEHiaIk4N0PiN6x4Fcg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz", + "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", "cpu": [ "x64" ], @@ -523,9 +523,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.22.0.tgz", - "integrity": "sha512-Ezlhu/YyITmXwKSB+Zu/QqD7cxrjrpiw85cc0Rbd3AWr2wsgp+dWbWOE8MqHaLW9NKMZvuL0DhbJbvzR7F6Zvg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz", + "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", "cpu": [ "arm64" ], @@ -539,9 +539,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.22.0.tgz", - "integrity": "sha512-ufjdW5tFJGUjlH9j/5cCE9lrwRffyZh+T4vYvoDKoYsC6IXbwaFeV/ENxeNXcxotF0P8CDzoICXVSbJaGBhkrw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz", + "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", "cpu": [ "x64" ], @@ -555,9 +555,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.22.0.tgz", - "integrity": "sha512-zY6ly/AoSmKnmNTowDJsK5ehra153/5ZhqxNLfq9NRsTTltetr+yHHcQ4RW7QDqw4JC8A1uC1YmeSfK9NRcK1w==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz", + "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", "cpu": [ "x64" ], @@ -571,9 +571,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.22.0.tgz", - "integrity": "sha512-Kml5F7tv/1Maam0pbbCrvkk9vj046dPej30kFzlhXnhuCtYYBP6FGy/cLbc5yUT1lkZznGLf2OvuvmLjscO5rw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz", + "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", "cpu": [ "arm64" ], @@ -587,9 +587,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.22.0.tgz", - "integrity": "sha512-IOgwn+mYTM3RrcydP4Og5IpXh+ftN8oF+HELTXSmbWBlujuci4Qa3DTeO+LEErceisI7KUSfEIiX+WOUlpELkw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz", + "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", "cpu": [ "ia32" ], @@ -603,9 +603,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.22.0.tgz", - "integrity": "sha512-4bDHJrk2WHBXJPhy1y80X7/5b5iZTZP3LGcKIlAP1J+KqZ4zQAPMLEzftGyjjfcKbA4JDlPt/+2R/F1ZTeRgrw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz", + "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", "cpu": [ "x64" ], @@ -1400,9 +1400,9 @@ } }, "node_modules/esbuild": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.22.0.tgz", - "integrity": "sha512-zNYA6bFZsVnsU481FnGAQjLDW0Pl/8BGG7EvAp15RzUvGC+ME7hf1q7LvIfStEQBz/iEHuBJCYcOwPmNCf1Tlw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz", + "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", "dev": true, "hasInstallScript": true, "bin": { @@ -1412,30 +1412,30 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.22.0", - "@esbuild/android-arm": "0.22.0", - "@esbuild/android-arm64": "0.22.0", - "@esbuild/android-x64": "0.22.0", - "@esbuild/darwin-arm64": "0.22.0", - "@esbuild/darwin-x64": "0.22.0", - "@esbuild/freebsd-arm64": "0.22.0", - "@esbuild/freebsd-x64": "0.22.0", - "@esbuild/linux-arm": "0.22.0", - "@esbuild/linux-arm64": "0.22.0", - "@esbuild/linux-ia32": "0.22.0", - "@esbuild/linux-loong64": "0.22.0", - "@esbuild/linux-mips64el": "0.22.0", - "@esbuild/linux-ppc64": "0.22.0", - "@esbuild/linux-riscv64": "0.22.0", - "@esbuild/linux-s390x": "0.22.0", - "@esbuild/linux-x64": "0.22.0", - "@esbuild/netbsd-x64": "0.22.0", - "@esbuild/openbsd-arm64": "0.22.0", - "@esbuild/openbsd-x64": "0.22.0", - "@esbuild/sunos-x64": "0.22.0", - "@esbuild/win32-arm64": "0.22.0", - "@esbuild/win32-ia32": "0.22.0", - "@esbuild/win32-x64": "0.22.0" + "@esbuild/aix-ppc64": "0.23.0", + "@esbuild/android-arm": "0.23.0", + "@esbuild/android-arm64": "0.23.0", + "@esbuild/android-x64": "0.23.0", + "@esbuild/darwin-arm64": "0.23.0", + "@esbuild/darwin-x64": "0.23.0", + "@esbuild/freebsd-arm64": "0.23.0", + "@esbuild/freebsd-x64": "0.23.0", + "@esbuild/linux-arm": "0.23.0", + "@esbuild/linux-arm64": "0.23.0", + "@esbuild/linux-ia32": "0.23.0", + "@esbuild/linux-loong64": "0.23.0", + "@esbuild/linux-mips64el": "0.23.0", + "@esbuild/linux-ppc64": "0.23.0", + "@esbuild/linux-riscv64": "0.23.0", + "@esbuild/linux-s390x": "0.23.0", + "@esbuild/linux-x64": "0.23.0", + "@esbuild/netbsd-x64": "0.23.0", + "@esbuild/openbsd-arm64": "0.23.0", + "@esbuild/openbsd-x64": "0.23.0", + "@esbuild/sunos-x64": "0.23.0", + "@esbuild/win32-arm64": "0.23.0", + "@esbuild/win32-ia32": "0.23.0", + "@esbuild/win32-x64": "0.23.0" } }, "node_modules/escape-string-regexp": { @@ -3093,170 +3093,170 @@ } }, "@esbuild/aix-ppc64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.22.0.tgz", - "integrity": "sha512-uvQR2crZ/zgzSHDvdygHyNI+ze9zwS8mqz0YtGXotSqvEE0UkYE9s+FZKQNTt1VtT719mfP3vHrUdCpxBNQZhQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.23.0.tgz", + "integrity": "sha512-3sG8Zwa5fMcA9bgqB8AfWPQ+HFke6uD3h1s3RIwUNK8EG7a4buxvuFTs3j1IMs2NXAk9F30C/FF4vxRgQCcmoQ==", "dev": true, "optional": true }, "@esbuild/android-arm": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.22.0.tgz", - "integrity": "sha512-PBnyP+r8vJE4ifxsWys9l+Mc2UY/yYZOpX82eoyGISXXb3dRr0M21v+s4fgRKWMFPMSf/iyowqPW/u7ScSUkjQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.23.0.tgz", + "integrity": "sha512-+KuOHTKKyIKgEEqKbGTK8W7mPp+hKinbMBeEnNzjJGyFcWsfrXjSTNluJHCY1RqhxFurdD8uNXQDei7qDlR6+g==", "dev": true, "optional": true }, "@esbuild/android-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.22.0.tgz", - "integrity": "sha512-UKhPb3o2gAB/bfXcl58ZXTn1q2oVu1rEu/bKrCtmm+Nj5MKUbrOwR5WAixE2v+lk0amWuwPvhnPpBRLIGiq7ig==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.23.0.tgz", + "integrity": "sha512-EuHFUYkAVfU4qBdyivULuu03FhJO4IJN9PGuABGrFy4vUuzk91P2d+npxHcFdpUnfYKy0PuV+n6bKIpHOB3prQ==", "dev": true, "optional": true }, "@esbuild/android-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.22.0.tgz", - "integrity": "sha512-IjTYtvIrjhR41Ijy2dDPgYjQHWG/x/A4KXYbs1fiU3efpRdoxMChK3oEZV6GPzVEzJqxFgcuBaiX1kwEvWUxSw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.23.0.tgz", + "integrity": "sha512-WRrmKidLoKDl56LsbBMhzTTBxrsVwTKdNbKDalbEZr0tcsBgCLbEtoNthOW6PX942YiYq8HzEnb4yWQMLQuipQ==", "dev": true, "optional": true }, "@esbuild/darwin-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.22.0.tgz", - "integrity": "sha512-mqt+Go4y9wRvEz81bhKd9RpHsQR1LwU8Xm6jZRUV/xpM7cIQFbFH6wBCLPTNsdELBvfoHeumud7X78jQQJv2TA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.23.0.tgz", + "integrity": "sha512-YLntie/IdS31H54Ogdn+v50NuoWF5BDkEUFpiOChVa9UnKpftgwzZRrI4J132ETIi+D8n6xh9IviFV3eXdxfow==", "dev": true, "optional": true }, "@esbuild/darwin-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.22.0.tgz", - "integrity": "sha512-vTaTQ9OgYc3VTaWtOE5pSuDT6H3d/qSRFRfSBbnxFfzAvYoB3pqKXA0LEbi/oT8GUOEAutspfRMqPj2ezdFaMw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.23.0.tgz", + "integrity": "sha512-IMQ6eme4AfznElesHUPDZ+teuGwoRmVuuixu7sv92ZkdQcPbsNHzutd+rAfaBKo8YK3IrBEi9SLLKWJdEvJniQ==", "dev": true, "optional": true }, "@esbuild/freebsd-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.22.0.tgz", - "integrity": "sha512-0e1ZgoobJzaGnR4reD7I9rYZ7ttqdh1KPvJWnquUoDJhL0rYwdneeLailBzd2/4g/U5p4e5TIHEWa68NF2hFpQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.23.0.tgz", + "integrity": "sha512-0muYWCng5vqaxobq6LB3YNtevDFSAZGlgtLoAc81PjUfiFz36n4KMpwhtAd4he8ToSI3TGyuhyx5xmiWNYZFyw==", "dev": true, "optional": true }, "@esbuild/freebsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.22.0.tgz", - "integrity": "sha512-BFgyYwlCwRWyPQJtkzqq2p6pJbiiWgp0P9PNf7a5FQ1itKY4czPuOMAlFVItirSmEpRPCeImuwePNScZS0pL5Q==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.23.0.tgz", + "integrity": "sha512-XKDVu8IsD0/q3foBzsXGt/KjD/yTKBCIwOHE1XwiXmrRwrX6Hbnd5Eqn/WvDekddK21tfszBSrE/WMaZh+1buQ==", "dev": true, "optional": true }, "@esbuild/linux-arm": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.22.0.tgz", - "integrity": "sha512-KEMWiA9aGuPUD4BH5yjlhElLgaRXe+Eri6gKBoDazoPBTo1BXc/e6IW5FcJO9DoL19FBeCxgONyh95hLDNepIg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.23.0.tgz", + "integrity": "sha512-SEELSTEtOFu5LPykzA395Mc+54RMg1EUgXP+iw2SJ72+ooMwVsgfuwXo5Fn0wXNgWZsTVHwY2cg4Vi/bOD88qw==", "dev": true, "optional": true }, "@esbuild/linux-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.22.0.tgz", - "integrity": "sha512-V/K2rctCUgC0PCXpN7AqT4hoazXKgIYugFGu/myk2+pfe6jTW2guz/TBwq4cZ7ESqusR/IzkcQaBkcjquuBWsw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.23.0.tgz", + "integrity": "sha512-j1t5iG8jE7BhonbsEg5d9qOYcVZv/Rv6tghaXM/Ug9xahM0nX/H2gfu6X6z11QRTMT6+aywOMA8TDkhPo8aCGw==", "dev": true, "optional": true }, "@esbuild/linux-ia32": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.22.0.tgz", - "integrity": "sha512-r2ZZqkOMOrpUhzNwxI7uLAHIDwkfeqmTnrv1cjpL/rjllPWszgqmprd/om9oviKXUBpMqHbXmppvjAYgISb26Q==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.23.0.tgz", + "integrity": "sha512-P7O5Tkh2NbgIm2R6x1zGJJsnacDzTFcRWZyTTMgFdVit6E98LTxO+v8LCCLWRvPrjdzXHx9FEOA8oAZPyApWUA==", "dev": true, "optional": true }, "@esbuild/linux-loong64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.22.0.tgz", - "integrity": "sha512-qaowLrV/YOMAL2RfKQ4C/VaDzAuLDuylM2sd/LH+4OFirMl6CuDpRlCq4u49ZBaVV8pkI/Y+hTdiibvQRhojCA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.23.0.tgz", + "integrity": "sha512-InQwepswq6urikQiIC/kkx412fqUZudBO4SYKu0N+tGhXRWUqAx+Q+341tFV6QdBifpjYgUndV1hhMq3WeJi7A==", "dev": true, "optional": true }, "@esbuild/linux-mips64el": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.22.0.tgz", - "integrity": "sha512-hgrezzjQTRxjkQ5k08J6rtZN5PNnkWx/Rz6Kmj9gnsdCAX1I4Dn4ZPqvFRkXo55Q3pnVQJBwbdtrTO7tMGtyVA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.23.0.tgz", + "integrity": "sha512-J9rflLtqdYrxHv2FqXE2i1ELgNjT+JFURt/uDMoPQLcjWQA5wDKgQA4t/dTqGa88ZVECKaD0TctwsUfHbVoi4w==", "dev": true, "optional": true }, "@esbuild/linux-ppc64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.22.0.tgz", - "integrity": "sha512-ewxg6FLLUio883XgSjfULEmDl3VPv/TYNnRprVAS3QeGFLdCYdx1tIudBcd7n9jIdk82v1Ajov4jx87qW7h9+g==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.23.0.tgz", + "integrity": "sha512-cShCXtEOVc5GxU0fM+dsFD10qZ5UpcQ8AM22bYj0u/yaAykWnqXJDpd77ublcX6vdDsWLuweeuSNZk4yUxZwtw==", "dev": true, "optional": true }, "@esbuild/linux-riscv64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.22.0.tgz", - "integrity": "sha512-Az5XbgSJC2lE8XK8pdcutsf9RgdafWdTpUK/+6uaDdfkviw/B4JCwAfh1qVeRWwOohwdsl4ywZrWBNWxwrPLFg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.23.0.tgz", + "integrity": "sha512-HEtaN7Y5UB4tZPeQmgz/UhzoEyYftbMXrBCUjINGjh3uil+rB/QzzpMshz3cNUxqXN7Vr93zzVtpIDL99t9aRw==", "dev": true, "optional": true }, "@esbuild/linux-s390x": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.22.0.tgz", - "integrity": "sha512-8j4a2ChT9+V34NNNY9c/gMldutaJFmfMacTPq4KfNKwv2fitBCLYjee7c+Vxaha2nUhPK7cXcZpJtJ3+Y7ZdVQ==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.23.0.tgz", + "integrity": "sha512-WDi3+NVAuyjg/Wxi+o5KPqRbZY0QhI9TjrEEm+8dmpY9Xir8+HE/HNx2JoLckhKbFopW0RdO2D72w8trZOV+Wg==", "dev": true, "optional": true }, "@esbuild/linux-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.22.0.tgz", - "integrity": "sha512-JUQyOnpbAkkRFOk/AhsEemz5TfWN4FJZxVObUlnlNCbe7QBl61ZNfM4cwBXayQA6laMJMUcqLHaYQHAB6YQ95Q==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.23.0.tgz", + "integrity": "sha512-a3pMQhUEJkITgAw6e0bWA+F+vFtCciMjW/LPtoj99MhVt+Mfb6bbL9hu2wmTZgNd994qTAEw+U/r6k3qHWWaOQ==", "dev": true, "optional": true }, "@esbuild/netbsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.22.0.tgz", - "integrity": "sha512-11PoCoHXo4HFNbLsXuMB6bpMPWGDiw7xETji6COdJss4SQZLvcgNoeSqWtATRm10Jj1uEHiaIk4N0PiN6x4Fcg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.23.0.tgz", + "integrity": "sha512-cRK+YDem7lFTs2Q5nEv/HHc4LnrfBCbH5+JHu6wm2eP+d8OZNoSMYgPZJq78vqQ9g+9+nMuIsAO7skzphRXHyw==", "dev": true, "optional": true }, "@esbuild/openbsd-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.22.0.tgz", - "integrity": "sha512-Ezlhu/YyITmXwKSB+Zu/QqD7cxrjrpiw85cc0Rbd3AWr2wsgp+dWbWOE8MqHaLW9NKMZvuL0DhbJbvzR7F6Zvg==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.23.0.tgz", + "integrity": "sha512-suXjq53gERueVWu0OKxzWqk7NxiUWSUlrxoZK7usiF50C6ipColGR5qie2496iKGYNLhDZkPxBI3erbnYkU0rQ==", "dev": true, "optional": true }, "@esbuild/openbsd-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.22.0.tgz", - "integrity": "sha512-ufjdW5tFJGUjlH9j/5cCE9lrwRffyZh+T4vYvoDKoYsC6IXbwaFeV/ENxeNXcxotF0P8CDzoICXVSbJaGBhkrw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.23.0.tgz", + "integrity": "sha512-6p3nHpby0DM/v15IFKMjAaayFhqnXV52aEmv1whZHX56pdkK+MEaLoQWj+H42ssFarP1PcomVhbsR4pkz09qBg==", "dev": true, "optional": true }, "@esbuild/sunos-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.22.0.tgz", - "integrity": "sha512-zY6ly/AoSmKnmNTowDJsK5ehra153/5ZhqxNLfq9NRsTTltetr+yHHcQ4RW7QDqw4JC8A1uC1YmeSfK9NRcK1w==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.23.0.tgz", + "integrity": "sha512-BFelBGfrBwk6LVrmFzCq1u1dZbG4zy/Kp93w2+y83Q5UGYF1d8sCzeLI9NXjKyujjBBniQa8R8PzLFAUrSM9OA==", "dev": true, "optional": true }, "@esbuild/win32-arm64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.22.0.tgz", - "integrity": "sha512-Kml5F7tv/1Maam0pbbCrvkk9vj046dPej30kFzlhXnhuCtYYBP6FGy/cLbc5yUT1lkZznGLf2OvuvmLjscO5rw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.23.0.tgz", + "integrity": "sha512-lY6AC8p4Cnb7xYHuIxQ6iYPe6MfO2CC43XXKo9nBXDb35krYt7KGhQnOkRGar5psxYkircpCqfbNDB4uJbS2jQ==", "dev": true, "optional": true }, "@esbuild/win32-ia32": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.22.0.tgz", - "integrity": "sha512-IOgwn+mYTM3RrcydP4Og5IpXh+ftN8oF+HELTXSmbWBlujuci4Qa3DTeO+LEErceisI7KUSfEIiX+WOUlpELkw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.23.0.tgz", + "integrity": "sha512-7L1bHlOTcO4ByvI7OXVI5pNN6HSu6pUQq9yodga8izeuB1KcT2UkHaH6118QJwopExPn0rMHIseCTx1CRo/uNA==", "dev": true, "optional": true }, "@esbuild/win32-x64": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.22.0.tgz", - "integrity": "sha512-4bDHJrk2WHBXJPhy1y80X7/5b5iZTZP3LGcKIlAP1J+KqZ4zQAPMLEzftGyjjfcKbA4JDlPt/+2R/F1ZTeRgrw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.23.0.tgz", + "integrity": "sha512-Arm+WgUFLUATuoxCJcahGuk6Yj9Pzxd6l11Zb/2aAuv5kWWvvfhLFo2fni4uSK5vzlUdCGZ/BdV5tH8klj8p8g==", "dev": true, "optional": true }, @@ -3836,35 +3836,35 @@ "dev": true }, "esbuild": { - "version": "0.22.0", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.22.0.tgz", - "integrity": "sha512-zNYA6bFZsVnsU481FnGAQjLDW0Pl/8BGG7EvAp15RzUvGC+ME7hf1q7LvIfStEQBz/iEHuBJCYcOwPmNCf1Tlw==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.23.0.tgz", + "integrity": "sha512-1lvV17H2bMYda/WaFb2jLPeHU3zml2k4/yagNMG8Q/YtfMjCwEUZa2eXXMgZTVSL5q1n4H7sQ0X6CdJDqqeCFA==", "dev": true, "requires": { - "@esbuild/aix-ppc64": "0.22.0", - "@esbuild/android-arm": "0.22.0", - "@esbuild/android-arm64": "0.22.0", - "@esbuild/android-x64": "0.22.0", - "@esbuild/darwin-arm64": "0.22.0", - "@esbuild/darwin-x64": "0.22.0", - "@esbuild/freebsd-arm64": "0.22.0", - "@esbuild/freebsd-x64": "0.22.0", - "@esbuild/linux-arm": "0.22.0", - "@esbuild/linux-arm64": "0.22.0", - "@esbuild/linux-ia32": "0.22.0", - "@esbuild/linux-loong64": "0.22.0", - "@esbuild/linux-mips64el": "0.22.0", - "@esbuild/linux-ppc64": "0.22.0", - "@esbuild/linux-riscv64": "0.22.0", - "@esbuild/linux-s390x": "0.22.0", - "@esbuild/linux-x64": "0.22.0", - "@esbuild/netbsd-x64": "0.22.0", - "@esbuild/openbsd-arm64": "0.22.0", - "@esbuild/openbsd-x64": "0.22.0", - "@esbuild/sunos-x64": "0.22.0", - "@esbuild/win32-arm64": "0.22.0", - "@esbuild/win32-ia32": "0.22.0", - "@esbuild/win32-x64": "0.22.0" + "@esbuild/aix-ppc64": "0.23.0", + "@esbuild/android-arm": "0.23.0", + "@esbuild/android-arm64": "0.23.0", + "@esbuild/android-x64": "0.23.0", + "@esbuild/darwin-arm64": "0.23.0", + "@esbuild/darwin-x64": "0.23.0", + "@esbuild/freebsd-arm64": "0.23.0", + "@esbuild/freebsd-x64": "0.23.0", + "@esbuild/linux-arm": "0.23.0", + "@esbuild/linux-arm64": "0.23.0", + "@esbuild/linux-ia32": "0.23.0", + "@esbuild/linux-loong64": "0.23.0", + "@esbuild/linux-mips64el": "0.23.0", + "@esbuild/linux-ppc64": "0.23.0", + "@esbuild/linux-riscv64": "0.23.0", + "@esbuild/linux-s390x": "0.23.0", + "@esbuild/linux-x64": "0.23.0", + "@esbuild/netbsd-x64": "0.23.0", + "@esbuild/openbsd-arm64": "0.23.0", + "@esbuild/openbsd-x64": "0.23.0", + "@esbuild/sunos-x64": "0.23.0", + "@esbuild/win32-arm64": "0.23.0", + "@esbuild/win32-ia32": "0.23.0", + "@esbuild/win32-x64": "0.23.0" } }, "escape-string-regexp": { diff --git a/code/package.json b/code/package.json index 724bc181..bc9d3b03 100644 --- a/code/package.json +++ b/code/package.json @@ -39,7 +39,7 @@ "@types/node": "^18", "@types/vscode": "1.78.0", "@vscode/vsce": "^2.29.0", - "esbuild": "^0.22.0", + "esbuild": "^0.23.0", "ovsx": "^0.9.1", "typescript": "^5.5.3" }, From f8534fba5729705e62a493db76339c7aec9d0ff4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 17:53:19 +0000 Subject: [PATCH 28/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.0...v0.5.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ef9ba02..27b9e47f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.0 + rev: v0.5.1 hooks: - id: ruff args: [--fix] From 79984cd9b48cca777f2d4a06131adddfb270272d Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 12 Jul 2024 21:41:19 +0100 Subject: [PATCH 29/48] Bump ruff version --- lib/esbonio/hatch.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/esbonio/hatch.toml b/lib/esbonio/hatch.toml index a4751007..2209d3f4 100644 --- a/lib/esbonio/hatch.toml +++ b/lib/esbonio/hatch.toml @@ -35,4 +35,4 @@ value = ["tests/sphinx-agent", "tests/e2e"] [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" -dependencies = ["ruff==0.5.0"] +dependencies = ["ruff==0.5.1"] From 65f345b43d5b51357d94cd40e447d6a89535ae0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:14:29 +0000 Subject: [PATCH 30/48] build(deps-dev): bump @vscode/vsce from 2.29.0 to 2.30.0 in /code Bumps [@vscode/vsce](https://github.com/Microsoft/vsce) from 2.29.0 to 2.30.0. - [Release notes](https://github.com/Microsoft/vsce/releases) - [Commits](https://github.com/Microsoft/vsce/compare/v2.29.0...v2.30.0) --- updated-dependencies: - dependency-name: "@vscode/vsce" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- code/package-lock.json | 14 +++++++------- code/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/package-lock.json b/code/package-lock.json index 1cc82f02..20225905 100644 --- a/code/package-lock.json +++ b/code/package-lock.json @@ -17,7 +17,7 @@ "@types/glob": "^8.1.0", "@types/node": "^18", "@types/vscode": "1.78.0", - "@vscode/vsce": "^2.29.0", + "@vscode/vsce": "^2.30.0", "esbuild": "^0.23.0", "ovsx": "^0.9.1", "typescript": "^5.5.3" @@ -656,9 +656,9 @@ } }, "node_modules/@vscode/vsce": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.29.0.tgz", - "integrity": "sha512-63+aEO8SpjE6qKiIh2Cqy/P9zC7+USElGwpEdkyPp89xIBDBr5IqeNS3zkD3mp3wZqbvHIpJsCCNu74WQirYCg==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.30.0.tgz", + "integrity": "sha512-MBYpXdCY1SCdc2u/y11kmJuSODKFyZRpeRTQq5p4rSg05QSjSy5pz6h/BGLNdSahgXfKRBATEkjAcJFdJuDz8Q==", "dev": true, "dependencies": { "@azure/identity": "^4.1.0", @@ -3294,9 +3294,9 @@ "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==" }, "@vscode/vsce": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.29.0.tgz", - "integrity": "sha512-63+aEO8SpjE6qKiIh2Cqy/P9zC7+USElGwpEdkyPp89xIBDBr5IqeNS3zkD3mp3wZqbvHIpJsCCNu74WQirYCg==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/@vscode/vsce/-/vsce-2.30.0.tgz", + "integrity": "sha512-MBYpXdCY1SCdc2u/y11kmJuSODKFyZRpeRTQq5p4rSg05QSjSy5pz6h/BGLNdSahgXfKRBATEkjAcJFdJuDz8Q==", "dev": true, "requires": { "@azure/identity": "^4.1.0", diff --git a/code/package.json b/code/package.json index bc9d3b03..4edc8044 100644 --- a/code/package.json +++ b/code/package.json @@ -38,7 +38,7 @@ "@types/glob": "^8.1.0", "@types/node": "^18", "@types/vscode": "1.78.0", - "@vscode/vsce": "^2.29.0", + "@vscode/vsce": "^2.30.0", "esbuild": "^0.23.0", "ovsx": "^0.9.1", "typescript": "^5.5.3" From aa308267bef10c75ed324175008f0277413cfeec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 18:06:02 +0000 Subject: [PATCH 31/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.1 → v0.5.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.1...v0.5.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 27b9e47f..ab3a205b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.1 + rev: v0.5.2 hooks: - id: ruff args: [--fix] From 73821d916fb80f484d12395ec0a59248a0b24629 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Mon, 15 Jul 2024 20:20:32 +0100 Subject: [PATCH 32/48] Bump ruff version --- lib/esbonio/hatch.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/esbonio/hatch.toml b/lib/esbonio/hatch.toml index 2209d3f4..31c4bec5 100644 --- a/lib/esbonio/hatch.toml +++ b/lib/esbonio/hatch.toml @@ -35,4 +35,4 @@ value = ["tests/sphinx-agent", "tests/e2e"] [envs.hatch-static-analysis] config-path = "ruff_defaults.toml" -dependencies = ["ruff==0.5.1"] +dependencies = ["ruff==0.5.2"] From 6a855bd230c0986fd5af58b439c31a8ff13b4abe Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sat, 13 Jul 2024 16:39:31 +0000 Subject: [PATCH 33/48] code: Replace language status items with a tree view Now that the language server (and the extension by proxy) is managing mutliple sphinx processes, there is too much information to try and cram into a set of language status items. Instead the extension now contributes a "Sphinx Processes" tree view which can visualise each process currently managed by the server. Not only should this be more discoverable, but offers a space to expose additonal management commands - such as restarting processes or triggering builds. --- code/package.json | 8 ++ code/src/node/extension.ts | 6 +- code/src/node/status.ts | 189 ------------------------------- code/src/node/view.ts | 224 +++++++++++++++++++++++++++++++++++++ 4 files changed, 236 insertions(+), 191 deletions(-) delete mode 100644 code/src/node/status.ts create mode 100644 code/src/node/view.ts diff --git a/code/package.json b/code/package.json index 4edc8044..17187907 100644 --- a/code/package.json +++ b/code/package.json @@ -417,6 +417,14 @@ } ] }, + "views": { + "explorer": [ + { + "id": "sphinxProcesses", + "name": "Sphinx Processes" + } + ] + }, "walkthroughs": [ { "id": "getting-started", diff --git a/code/src/node/extension.ts b/code/src/node/extension.ts index 99437a18..44405e64 100644 --- a/code/src/node/extension.ts +++ b/code/src/node/extension.ts @@ -5,7 +5,7 @@ import { OutputChannelLogger } from '../common/log' import { PythonManager } from './python' import { PreviewManager } from "./preview"; import { EsbonioClient } from './client' -import { StatusManager } from './status'; +import { SphinxProcessProvider } from "./view"; let esbonio: EsbonioClient let logger: OutputChannelLogger @@ -21,7 +21,9 @@ export async function activate(context: vscode.ExtensionContext) { esbonio = new EsbonioClient(logger, pythonManager, context, channel) let previewManager = new PreviewManager(logger, context, esbonio) - let statusManager = new StatusManager(logger, context, esbonio) + context.subscriptions.push(vscode.window.registerTreeDataProvider( + 'sphinxProcesses', new SphinxProcessProvider(esbonio) + )); let config = vscode.workspace.getConfiguration("esbonio.server") if (config.get("enabled")) { diff --git a/code/src/node/status.ts b/code/src/node/status.ts deleted file mode 100644 index 2bad5672..00000000 --- a/code/src/node/status.ts +++ /dev/null @@ -1,189 +0,0 @@ -import * as path from 'path'; -import * as vscode from 'vscode'; - -import { TextDocumentFilter } from 'vscode-languageclient'; -import { Events, Notifications, Server } from '../common/constants'; -import { OutputChannelLogger } from "../common/log"; -import { - AppCreatedNotification, - ClientCreatedNotification, - ClientDestroyedNotification, - ClientErroredNotification, - EsbonioClient -} from './client'; - -interface StatusItemFields { - busy?: boolean - detail?: string, - command?: vscode.Command, - selector?: vscode.DocumentSelector, - severity?: vscode.LanguageStatusSeverity -} - -export class StatusManager { - - private statusItems: Map - - constructor( - private logger: OutputChannelLogger, - private context: vscode.ExtensionContext, - private client: EsbonioClient, - ) { - this.statusItems = new Map() - - client.addHandler( - Events.SERVER_STOP, - (params: any) => { this.serverStop(params) } - ) - - client.addHandler( - Notifications.SPHINX_APP_CREATED, - (params: AppCreatedNotification) => { this.appCreated(params) } - ) - - client.addHandler( - Notifications.SPHINX_CLIENT_CREATED, - (params: ClientCreatedNotification) => { this.clientCreated(params) } - ) - - client.addHandler( - Notifications.SPHINX_CLIENT_ERRORED, - (params: ClientErroredNotification) => { this.clientErrored(params) } - ) - - client.addHandler( - Notifications.SPHINX_CLIENT_DESTROYED, - (params: ClientDestroyedNotification) => { this.clientDestroyed(params) } - ) - } - - private clientCreated(params: ClientCreatedNotification) { - this.logger.debug(`${Notifications.SPHINX_CLIENT_CREATED}: ${JSON.stringify(params, undefined, 2)}`) - let sphinxConfig = params.config - - let config = vscode.workspace.getConfiguration("esbonio.server") - let documentSelector = config.get("documentSelector") - if (!documentSelector || documentSelector.length === 0) { - documentSelector = Server.DEFAULT_SELECTOR - } - - let selector: vscode.DocumentFilter[] = [] - let defaultPattern = path.join(sphinxConfig.cwd, "**", "*") - for (let docSelector of documentSelector) { - selector.push({ - scheme: docSelector.scheme, - language: docSelector.language, - pattern: docSelector.pattern || defaultPattern - }) - } - - this.setStatusItem( - params.id, - "sphinx", - "Sphinx[starting]", - { - selector: selector, - busy: true, - detail: sphinxConfig.buildCommand.join(" "), - severity: vscode.LanguageStatusSeverity.Information - } - ) - this.setStatusItem( - params.id, - "python", - "Python", - { - selector: selector, - detail: sphinxConfig.pythonCommand.join(" "), - command: { title: "Change Interpreter", command: "python.setInterpreter" }, - severity: vscode.LanguageStatusSeverity.Information - } - ) - } - - private clientErrored(params: ClientErroredNotification) { - this.logger.debug(`${Notifications.SPHINX_CLIENT_ERRORED}: ${JSON.stringify(params, undefined, 2)}`) - - this.setStatusItem( - params.id, - "sphinx", - "Sphinx[failed]", - { - busy: false, - detail: params.error, - severity: vscode.LanguageStatusSeverity.Error - } - ) - } - - private clientDestroyed(params: ClientDestroyedNotification) { - this.logger.debug(`${Notifications.SPHINX_CLIENT_DESTROYED}: ${JSON.stringify(params, undefined, 2)}`) - - for (let [key, item] of this.statusItems.entries()) { - if (key.startsWith(params.id)) { - item.dispose() - this.statusItems.delete(key) - } - } - } - - private appCreated(params: AppCreatedNotification) { - this.logger.debug(`${Notifications.SPHINX_APP_CREATED}: ${JSON.stringify(params, undefined, 2)}`) - let sphinx = params.application - - this.setStatusItem( - params.id, - "sphinx", - `Sphinx[${sphinx.builder_name}] v${sphinx.version}`, - { - busy: false, - } - ) - } - - private serverStop(_params: any) { - for (let [key, item] of this.statusItems.entries()) { - item.dispose() - this.statusItems.delete(key) - } - } - - private setStatusItem( - id: string, - name: string, - value: string, - params?: StatusItemFields, - ) { - let key = `${id}-${name.toLocaleLowerCase().replace(' ', '-')}` - let statusItem = this.statusItems.get(key) - - if (!statusItem) { - statusItem = vscode.languages.createLanguageStatusItem(key, { language: "restructuredtext" }) - statusItem.name = name - - this.statusItems.set(key, statusItem) - } - - statusItem.text = value - - if (params && params.busy !== undefined) { - statusItem.busy = params.busy - } - - if (params && params.detail) { - statusItem.detail = params.detail - } - - if (params && params.severity && params.severity >= 0) { - statusItem.severity = params.severity - } - - if (params && params.command) { - statusItem.command = params.command - } - - if (params && params.selector) { - statusItem.selector = params.selector - } - } -} diff --git a/code/src/node/view.ts b/code/src/node/view.ts new file mode 100644 index 00000000..2c63e92e --- /dev/null +++ b/code/src/node/view.ts @@ -0,0 +1,224 @@ +import * as vscode from 'vscode' +import { Notifications } from "../common/constants"; +import { AppCreatedNotification, ClientCreatedNotification, ClientErroredNotification, EsbonioClient, SphinxClientConfig, SphinxInfo } from './client'; + +/** + * Tree View provider that visualises the Sphinx processes currently + * managed by the language server. + */ +export class SphinxProcessProvider implements vscode.TreeDataProvider { + + private sphinxClients: Map = new Map() + + private _onDidChangeTreeData: vscode.EventEmitter = new vscode.EventEmitter(); + readonly onDidChangeTreeData: vscode.Event = this._onDidChangeTreeData.event; + + constructor(client: EsbonioClient) { + client.addHandler( + Notifications.SPHINX_CLIENT_CREATED, + (params: ClientCreatedNotification) => this.clientCreated(params) + ) + + client.addHandler( + Notifications.SPHINX_APP_CREATED, + (params: AppCreatedNotification) => this.appCreated(params) + ) + + client.addHandler( + Notifications.SPHINX_CLIENT_ERRORED, + (params: ClientErroredNotification) => this.clientErrored(params) + ) + } + + /** + * Return the UI representation of the given element + * + * @param element The tree view element to visualise + * @returns The UI representation of the given element + */ + getTreeItem(element: ProcessTreeNode): vscode.TreeItem { + + switch (element.kind) { + case 'container': + return { label: element.name, collapsibleState: vscode.TreeItemCollapsibleState.Collapsed } + + case 'process': + let label = 'Starting...' + let icon: vscode.ThemeIcon | undefined = new vscode.ThemeIcon("sync~spin") + let client = this.sphinxClients.get(element.id)! + let tooltip + + if (client.state === 'running') { + label = `Sphinx ${client.app?.version}` + icon = undefined + + } else if (client.state === 'errored') { + label = client.errorMessage || 'Errored' + icon = new vscode.ThemeIcon("error", new vscode.ThemeColor("list.errorForeground")) + tooltip = new vscode.MarkdownString("```" + (client.errorDetails || '') + "```") + } + + return { + label: label, + iconPath: icon, + tooltip: tooltip, + collapsibleState: vscode.TreeItemCollapsibleState.Collapsed + } + + case 'property': + return { label: 'Prop', collapsibleState: vscode.TreeItemCollapsibleState.None } + } + + } + + /** + * Return the children of the given element. + * + * When element is `undefined`, return the top level items in the tree. + * + * @param element The element to return children for + * @returns The given element's children + */ + getChildren(element?: ProcessTreeNode): Thenable { + const result: ProcessTreeNode[] = [] + + if (!element) { + for (let process of this.sphinxClients.values()) { + + let cwd = process.config.cwd + let node: ProcssContainerNode = { kind: 'container', name: cwd, path: cwd } + result.push(node) + } + + return Promise.resolve(result) + } + + switch (element.kind) { + case 'container': + for (let [id, process] of this.sphinxClients.entries()) { + if (element.name === process.config.cwd) { + let node: SphinxProcessNode = { kind: 'process', id: id } + result.push(node) + } + } + break + case 'process': + case 'property': + } + + return Promise.resolve(result) + } + + /** + * Called when a new SphinxClient has been created. + * + * @param params Information about the newly created client. + */ + private clientCreated(params: ClientCreatedNotification) { + this.sphinxClients.set(params.id, new SphinxProcess(params.config)) + this._onDidChangeTreeData.fire() + } + + /** + * Called when a new Sphinx application instance has been created. + * + * @param params Information about the newly created app. + */ + private appCreated(params: AppCreatedNotification) { + const client = this.sphinxClients.get(params.id) + if (!client) { return } + + client.setApplication(params.application) + this._onDidChangeTreeData.fire() + } + + /** + * Called when a SphinxClient encounters an error. + * + * @param params Information about the error. + */ + private clientErrored(params: ClientErroredNotification) { + const client = this.sphinxClients.get(params.id) + if (!client) { return } + + client.setError(params.error, params.detail) + this._onDidChangeTreeData.fire() + } +} + +type ProcessTreeNode = ProcssContainerNode | SphinxProcessNode | ProcessPropertyNode + +/** + * Represents a property of the sphinx process + */ +interface ProcessPropertyNode { + kind: 'property' +} + +/** + * Represents the sphinx process in the tree view + */ +interface SphinxProcessNode { + kind: 'process' + id: string + +} + +/** + * Represents a container for the sphinx process + */ +interface ProcssContainerNode { + kind: 'container' + name: string + path: string +} + +class SphinxProcess { + + /** + * Indicates the current state of the process. + */ + public state: 'starting' | 'running' | 'errored' + + /** + * A short message summarising the error + */ + public errorMessage: string | undefined + + /** + * A detailed error message + */ + public errorDetails: string | undefined + + /** + * Application info + */ + public app: SphinxInfo | undefined + + constructor( + public config: SphinxClientConfig, + ) { + this.state = 'starting' + } + + /** + * Called when the underlying process encounters an error + * + * @param error The error message + */ + setError(error: string, detail: string) { + this.state = 'errored' + this.errorMessage = error + this.errorDetails = detail + } + + /** + * Called when the underlying process encounters an error + * + * @param error The error message + */ + setApplication(app: SphinxInfo) { + this.state = 'running' + this.app = app + } +} From b13f8196b141c0104a19a5368aaac8b036ed1fd2 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 14 Jul 2024 17:31:17 +0000 Subject: [PATCH 34/48] lsp: Add `esbonio.sphinx.restart` command --- .../features/sphinx_manager/__init__.py | 10 +++++++ .../server/features/sphinx_manager/client.py | 7 +++++ .../sphinx_manager/client_subprocess.py | 13 +++++++-- .../server/features/sphinx_manager/manager.py | 28 +++++++++++++++++-- 4 files changed, 54 insertions(+), 4 deletions(-) diff --git a/lib/esbonio/esbonio/server/features/sphinx_manager/__init__.py b/lib/esbonio/esbonio/server/features/sphinx_manager/__init__.py index da73648a..25818171 100644 --- a/lib/esbonio/esbonio/server/features/sphinx_manager/__init__.py +++ b/lib/esbonio/esbonio/server/features/sphinx_manager/__init__.py @@ -20,3 +20,13 @@ def esbonio_setup(server: EsbonioLanguageServer, project_manager: ProjectManager): manager = SphinxManager(make_subprocess_sphinx_client, project_manager, server) server.add_feature(manager) + + @server.command("esbonio.sphinx.restart") + async def restart_client(ls: EsbonioLanguageServer, params, *args): + ls.logger.debug("esbonio.sphinx.restart: %s", params) + + for item in params: + if item is None: + continue + + await manager.restart_client(item["id"]) diff --git a/lib/esbonio/esbonio/server/features/sphinx_manager/client.py b/lib/esbonio/esbonio/server/features/sphinx_manager/client.py index 78b5d089..f83e4c8b 100644 --- a/lib/esbonio/esbonio/server/features/sphinx_manager/client.py +++ b/lib/esbonio/esbonio/server/features/sphinx_manager/client.py @@ -22,6 +22,9 @@ class ClientState(enum.Enum): Starting = enum.auto() """The client is starting.""" + Restarting = enum.auto() + """The client is restarting.""" + Running = enum.auto() """The client is running normally.""" @@ -81,6 +84,10 @@ async def start(self) -> SphinxClient: """Start the client.""" ... + async def restart(self) -> SphinxClient: + """Restart the client.""" + ... + async def build( self, *, diff --git a/lib/esbonio/esbonio/server/features/sphinx_manager/client_subprocess.py b/lib/esbonio/esbonio/server/features/sphinx_manager/client_subprocess.py index a8305e4b..d642c68d 100644 --- a/lib/esbonio/esbonio/server/features/sphinx_manager/client_subprocess.py +++ b/lib/esbonio/esbonio/server/features/sphinx_manager/client_subprocess.py @@ -187,11 +187,21 @@ async def start_io(self, cmd: str, *args, **kwargs): if self._server and self._server.stderr: self._stderr_forwarder = asyncio.create_task(forward_stderr(self._server)) + async def restart(self) -> SphinxClient: + """Restart the client.""" + await self.stop() + + # We need to reset the client's stop event. + self._stop_event.clear() + + self._set_state(ClientState.Restarting) + return await self.start() + async def start(self) -> SphinxClient: """Start the client.""" # Only try starting once. - if self.state is not None: + if self.state not in {None, ClientState.Restarting}: return self try: @@ -205,7 +215,6 @@ async def start(self) -> SphinxClient: params = types.CreateApplicationParams( command=self.config.build_command, ) - self.sphinx_info = await self.protocol.send_request_async( "sphinx/createApp", params ) diff --git a/lib/esbonio/esbonio/server/features/sphinx_manager/manager.py b/lib/esbonio/esbonio/server/features/sphinx_manager/manager.py index 61203e8c..39fa9ff0 100644 --- a/lib/esbonio/esbonio/server/features/sphinx_manager/manager.py +++ b/lib/esbonio/esbonio/server/features/sphinx_manager/manager.py @@ -164,17 +164,22 @@ async def trigger_build_after(self, uri: Uri, app_id: str, delay: float): await asyncio.sleep(delay) self._pending_builds.pop(app_id) - self.logger.debug("Triggering build") await self.trigger_build(uri) async def trigger_build(self, uri: Uri): """Trigger a build for the relevant Sphinx application for the given uri.""" + self.logger.debug("Triggering build") client = await self.get_client(uri) - if client is None or client.state != ClientState.Running: + if client is None: + return + + if client.state != ClientState.Running: + self.logger.debug("Skipping build, state is: %s", client.state) return if (project := self.project_manager.get_project(uri)) is None: + self.logger.debug("Skipping build, project is None") return # Pass through any unsaved content to the Sphinx agent. @@ -202,6 +207,25 @@ async def trigger_build(self, uri: Uri): # Notify listeners. self._events.trigger("build", client, result) + async def restart_client(self, client_id: str): + """Restart the client with the given id""" + for client in self.clients.values(): + if client is None: + continue + + if client.id != client_id: + continue + + try: + await client.restart() + except Exception: + self.logger.exception("Unable to restart sphinx client") + + break + + else: + self.logger.error(f"No client with id {client_id!r} available to restart") + async def get_client(self, uri: Uri) -> Optional[SphinxClient]: """Given a uri, return the relevant sphinx client instance for it.""" From e6d3d85c6b592f3c45d7ab18cc2d4cb97b846bb9 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Sun, 14 Jul 2024 17:32:58 +0000 Subject: [PATCH 35/48] code: Expose `esbonio.sphinx.restart` command --- code/package.json | 23 ++++++++++- code/src/node/extension.ts | 2 +- code/src/node/{view.ts => processTreeView.ts} | 38 ++++++++++++++++--- 3 files changed, 56 insertions(+), 7 deletions(-) rename code/src/node/{view.ts => processTreeView.ts} (85%) diff --git a/code/package.json b/code/package.json index 17187907..8f109bc7 100644 --- a/code/package.json +++ b/code/package.json @@ -78,7 +78,14 @@ { "command": "esbonio.server.restart", "title": "Restart Language Server", - "category": "Esbonio" + "category": "Esbonio", + "icon": "$(refresh)" + }, + { + "command": "esbonio.sphinx.restart", + "title": "Restart Sphinx Process", + "category": "Esbonio", + "icon": "$(refresh)" } ], "configuration": [ @@ -415,6 +422,20 @@ "group": "navigation", "when": "resourceLangId == restructuredtext || resourceLangId == markdown" } + ], + "view/title": [ + { + "command": "esbonio.server.restart", + "when": "view == sphinxProcesses", + "group": "navigation" + } + ], + "view/item/context": [ + { + "command": "esbonio.sphinx.restart", + "when": "view == sphinxProcesses && viewItem == process", + "group": "inline" + } ] }, "views": { diff --git a/code/src/node/extension.ts b/code/src/node/extension.ts index 44405e64..31d70ed3 100644 --- a/code/src/node/extension.ts +++ b/code/src/node/extension.ts @@ -5,7 +5,7 @@ import { OutputChannelLogger } from '../common/log' import { PythonManager } from './python' import { PreviewManager } from "./preview"; import { EsbonioClient } from './client' -import { SphinxProcessProvider } from "./view"; +import { SphinxProcessProvider } from "./processTreeView"; let esbonio: EsbonioClient let logger: OutputChannelLogger diff --git a/code/src/node/view.ts b/code/src/node/processTreeView.ts similarity index 85% rename from code/src/node/view.ts rename to code/src/node/processTreeView.ts index 2c63e92e..3c6d0d12 100644 --- a/code/src/node/view.ts +++ b/code/src/node/processTreeView.ts @@ -1,6 +1,6 @@ import * as vscode from 'vscode' -import { Notifications } from "../common/constants"; -import { AppCreatedNotification, ClientCreatedNotification, ClientErroredNotification, EsbonioClient, SphinxClientConfig, SphinxInfo } from './client'; +import { Notifications, Events } from "../common/constants"; +import { AppCreatedNotification, ClientCreatedNotification, ClientDestroyedNotification, ClientErroredNotification, EsbonioClient, SphinxClientConfig, SphinxInfo } from './client'; /** * Tree View provider that visualises the Sphinx processes currently @@ -28,6 +28,16 @@ export class SphinxProcessProvider implements vscode.TreeDataProvider this.clientErrored(params) ) + + client.addHandler( + Notifications.SPHINX_CLIENT_DESTROYED, + (params: ClientDestroyedNotification) => this.clientDestroyed(params) + ) + + client.addHandler( + Events.SERVER_STOP, + (_: any) => { this.serverStopped() } + ) } /** @@ -40,7 +50,7 @@ export class SphinxProcessProvider implements vscode.TreeDataProvider Date: Mon, 15 Jul 2024 19:46:03 +0100 Subject: [PATCH 36/48] docs: Create dedicated section for integrating Esbonio This section will contain all the information on how to integrate Esbonio into your favourite editor, including documentation on any custom notifications/commands used by the server --- docs/index.rst | 7 +++ docs/integrating/getting-started.rst | 50 +++++++++++++++++++ .../howto}/editors/_installation.rst | 0 .../howto}/editors/kate.rst | 10 ++-- .../howto}/editors/nvim-lspconfig.rst | 0 .../howto}/editors/nvim-lspconfig/.gitignore | 0 .../howto}/editors/nvim-lspconfig/default.nix | 0 .../howto}/editors/nvim-lspconfig/init.vim | 0 .../howto}/editors/nvim.rst | 0 .../howto}/editors/sublime.rst | 0 .../editors/sublime/LSP.sublime-settings | 0 .../howto}/editors/vim-coc/.gitignore | 0 .../howto}/editors/vim-coc/_configuration.rst | 0 .../howto}/editors/vim-coc/_debugging.rst | 0 .../howto}/editors/vim-coc/_examples.rst | 0 .../howto}/editors/vim-coc/_installation.rst | 0 .../howto}/editors/vim-coc/init.vim | 0 .../howto}/editors/vim-lsp/.gitignore | 0 .../howto}/editors/vim-lsp/_configuration.rst | 0 .../howto}/editors/vim-lsp/_debugging.rst | 0 .../howto}/editors/vim-lsp/_examples.rst | 0 .../howto}/editors/vim-lsp/_installation.rst | 0 .../howto}/editors/vim-lsp/init.vim | 0 .../howto}/editors/vim.rst | 0 .../howto}/editors/vscode.rst | 0 .../howto/emacs.rst} | 6 ++- .../howto/nvim.rst} | 12 +++-- .../reference/previews.rst | 19 ++++++- .../reference/sphinx-processes.rst | 40 +++++++++++++++ docs/lsp/howto.rst | 37 -------------- docs/lsp/reference/notifications.rst | 18 ------- 31 files changed, 131 insertions(+), 68 deletions(-) create mode 100644 docs/integrating/getting-started.rst rename docs/{lsp => integrating/howto}/editors/_installation.rst (100%) rename docs/{lsp => integrating/howto}/editors/kate.rst (89%) rename docs/{lsp => integrating/howto}/editors/nvim-lspconfig.rst (100%) rename docs/{lsp => integrating/howto}/editors/nvim-lspconfig/.gitignore (100%) rename docs/{lsp => integrating/howto}/editors/nvim-lspconfig/default.nix (100%) rename docs/{lsp => integrating/howto}/editors/nvim-lspconfig/init.vim (100%) rename docs/{lsp => integrating/howto}/editors/nvim.rst (100%) rename docs/{lsp => integrating/howto}/editors/sublime.rst (100%) rename docs/{lsp => integrating/howto}/editors/sublime/LSP.sublime-settings (100%) rename docs/{lsp => integrating/howto}/editors/vim-coc/.gitignore (100%) rename docs/{lsp => integrating/howto}/editors/vim-coc/_configuration.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-coc/_debugging.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-coc/_examples.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-coc/_installation.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-coc/init.vim (100%) rename docs/{lsp => integrating/howto}/editors/vim-lsp/.gitignore (100%) rename docs/{lsp => integrating/howto}/editors/vim-lsp/_configuration.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-lsp/_debugging.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-lsp/_examples.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-lsp/_installation.rst (100%) rename docs/{lsp => integrating/howto}/editors/vim-lsp/init.vim (100%) rename docs/{lsp => integrating/howto}/editors/vim.rst (100%) rename docs/{lsp => integrating/howto}/editors/vscode.rst (100%) rename docs/{lsp/howto/use-esbonio-in-emacs.rst => integrating/howto/emacs.rst} (94%) rename docs/{lsp/howto/use-esbonio-in-nvim.rst => integrating/howto/nvim.rst} (92%) rename docs/{lsp => integrating}/reference/previews.rst (80%) create mode 100644 docs/integrating/reference/sphinx-processes.rst delete mode 100644 docs/lsp/reference/notifications.rst diff --git a/docs/index.rst b/docs/index.rst index c5ebee9f..6c0de1b3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -54,6 +54,13 @@ The primary goal of Esbonio is to reduce the friction that comes from trying to lsp/reference changelog + +.. toctree:: + :caption: Integrating + :hidden: + + Getting Started + Sphinx Extensions ----------------- diff --git a/docs/integrating/getting-started.rst b/docs/integrating/getting-started.rst new file mode 100644 index 00000000..959c436b --- /dev/null +++ b/docs/integrating/getting-started.rst @@ -0,0 +1,50 @@ +Editor Integration +------------------ + +.. toctree:: + :hidden: + + Emacs + Kate + Neovim + +While the :doc:`tutorial ` focuses on using ``esbonio`` from within VSCode. +These guides will help you get ``esbonio`` setup with your editor of choice + +.. admonition:: Don't see your favourite editor? + + Feel free to submit a pull request with steps on how to get started or if you're not + sure on where to start, `open an issue`_ and we'll help you figure it out. + +.. _open an issue: https://github.com/swyddfa/esbonio/issues/new + +.. grid:: 2 2 3 4 + :gutter: 1 + + .. grid-item-card:: Emacs + :link: integrate-emacs + :link-type: ref + :text-align: center + + How to use esbonio within Emacs, using either ``eglot`` or ``lsp-mode`` as your language client. + + .. grid-item-card:: Neovim + :link: integrate-nvim + :link-type: ref + :text-align: center + + Using ``esbonio`` with Neovim's built in language client. + +Additional Features +=================== + +The language server provides additional notifications and commands that are not part of the LSP specification. +This means that they require additional client side integration code to be enabled. + +Theses features are not a requirement to use ``esbonio``, but they do offer some quality of life improvements. + +.. toctree:: + :maxdepth: 1 + + Sphinx Processes + Previews diff --git a/docs/lsp/editors/_installation.rst b/docs/integrating/howto/editors/_installation.rst similarity index 100% rename from docs/lsp/editors/_installation.rst rename to docs/integrating/howto/editors/_installation.rst diff --git a/docs/lsp/editors/kate.rst b/docs/integrating/howto/editors/kate.rst similarity index 89% rename from docs/lsp/editors/kate.rst rename to docs/integrating/howto/editors/kate.rst index c5fb8dc1..7cbba755 100644 --- a/docs/lsp/editors/kate.rst +++ b/docs/integrating/howto/editors/kate.rst @@ -1,5 +1,7 @@ -Kate -==== +.. _integrate-kate: + +How To Integrate Esbonio with Kate +================================== .. figure:: /images/kate-screenshot.png :align: center @@ -35,7 +37,7 @@ Installation "servers": { "rst": { "command": ["python", "-m", "esbonio"], - "initializationOptions": { + "settings": { "sphinx": { }, "server": { "completion": { @@ -49,7 +51,7 @@ Installation } } - For best results, we recommend you set :confval:`server.completion.preferredInsertBehavior (string)` to ``insert``, see the section on :ref:`lsp-configuration` for details on all the available options. + For best results, we recommend you set :esbonio:conf:`esbonio.server.completion.preferredInsertBehavior` to ``insert``, see the section on :ref:`lsp-configuration` for details on all the available options. For more details on Kate's LSP client see the `project's `__ documentation. diff --git a/docs/lsp/editors/nvim-lspconfig.rst b/docs/integrating/howto/editors/nvim-lspconfig.rst similarity index 100% rename from docs/lsp/editors/nvim-lspconfig.rst rename to docs/integrating/howto/editors/nvim-lspconfig.rst diff --git a/docs/lsp/editors/nvim-lspconfig/.gitignore b/docs/integrating/howto/editors/nvim-lspconfig/.gitignore similarity index 100% rename from docs/lsp/editors/nvim-lspconfig/.gitignore rename to docs/integrating/howto/editors/nvim-lspconfig/.gitignore diff --git a/docs/lsp/editors/nvim-lspconfig/default.nix b/docs/integrating/howto/editors/nvim-lspconfig/default.nix similarity index 100% rename from docs/lsp/editors/nvim-lspconfig/default.nix rename to docs/integrating/howto/editors/nvim-lspconfig/default.nix diff --git a/docs/lsp/editors/nvim-lspconfig/init.vim b/docs/integrating/howto/editors/nvim-lspconfig/init.vim similarity index 100% rename from docs/lsp/editors/nvim-lspconfig/init.vim rename to docs/integrating/howto/editors/nvim-lspconfig/init.vim diff --git a/docs/lsp/editors/nvim.rst b/docs/integrating/howto/editors/nvim.rst similarity index 100% rename from docs/lsp/editors/nvim.rst rename to docs/integrating/howto/editors/nvim.rst diff --git a/docs/lsp/editors/sublime.rst b/docs/integrating/howto/editors/sublime.rst similarity index 100% rename from docs/lsp/editors/sublime.rst rename to docs/integrating/howto/editors/sublime.rst diff --git a/docs/lsp/editors/sublime/LSP.sublime-settings b/docs/integrating/howto/editors/sublime/LSP.sublime-settings similarity index 100% rename from docs/lsp/editors/sublime/LSP.sublime-settings rename to docs/integrating/howto/editors/sublime/LSP.sublime-settings diff --git a/docs/lsp/editors/vim-coc/.gitignore b/docs/integrating/howto/editors/vim-coc/.gitignore similarity index 100% rename from docs/lsp/editors/vim-coc/.gitignore rename to docs/integrating/howto/editors/vim-coc/.gitignore diff --git a/docs/lsp/editors/vim-coc/_configuration.rst b/docs/integrating/howto/editors/vim-coc/_configuration.rst similarity index 100% rename from docs/lsp/editors/vim-coc/_configuration.rst rename to docs/integrating/howto/editors/vim-coc/_configuration.rst diff --git a/docs/lsp/editors/vim-coc/_debugging.rst b/docs/integrating/howto/editors/vim-coc/_debugging.rst similarity index 100% rename from docs/lsp/editors/vim-coc/_debugging.rst rename to docs/integrating/howto/editors/vim-coc/_debugging.rst diff --git a/docs/lsp/editors/vim-coc/_examples.rst b/docs/integrating/howto/editors/vim-coc/_examples.rst similarity index 100% rename from docs/lsp/editors/vim-coc/_examples.rst rename to docs/integrating/howto/editors/vim-coc/_examples.rst diff --git a/docs/lsp/editors/vim-coc/_installation.rst b/docs/integrating/howto/editors/vim-coc/_installation.rst similarity index 100% rename from docs/lsp/editors/vim-coc/_installation.rst rename to docs/integrating/howto/editors/vim-coc/_installation.rst diff --git a/docs/lsp/editors/vim-coc/init.vim b/docs/integrating/howto/editors/vim-coc/init.vim similarity index 100% rename from docs/lsp/editors/vim-coc/init.vim rename to docs/integrating/howto/editors/vim-coc/init.vim diff --git a/docs/lsp/editors/vim-lsp/.gitignore b/docs/integrating/howto/editors/vim-lsp/.gitignore similarity index 100% rename from docs/lsp/editors/vim-lsp/.gitignore rename to docs/integrating/howto/editors/vim-lsp/.gitignore diff --git a/docs/lsp/editors/vim-lsp/_configuration.rst b/docs/integrating/howto/editors/vim-lsp/_configuration.rst similarity index 100% rename from docs/lsp/editors/vim-lsp/_configuration.rst rename to docs/integrating/howto/editors/vim-lsp/_configuration.rst diff --git a/docs/lsp/editors/vim-lsp/_debugging.rst b/docs/integrating/howto/editors/vim-lsp/_debugging.rst similarity index 100% rename from docs/lsp/editors/vim-lsp/_debugging.rst rename to docs/integrating/howto/editors/vim-lsp/_debugging.rst diff --git a/docs/lsp/editors/vim-lsp/_examples.rst b/docs/integrating/howto/editors/vim-lsp/_examples.rst similarity index 100% rename from docs/lsp/editors/vim-lsp/_examples.rst rename to docs/integrating/howto/editors/vim-lsp/_examples.rst diff --git a/docs/lsp/editors/vim-lsp/_installation.rst b/docs/integrating/howto/editors/vim-lsp/_installation.rst similarity index 100% rename from docs/lsp/editors/vim-lsp/_installation.rst rename to docs/integrating/howto/editors/vim-lsp/_installation.rst diff --git a/docs/lsp/editors/vim-lsp/init.vim b/docs/integrating/howto/editors/vim-lsp/init.vim similarity index 100% rename from docs/lsp/editors/vim-lsp/init.vim rename to docs/integrating/howto/editors/vim-lsp/init.vim diff --git a/docs/lsp/editors/vim.rst b/docs/integrating/howto/editors/vim.rst similarity index 100% rename from docs/lsp/editors/vim.rst rename to docs/integrating/howto/editors/vim.rst diff --git a/docs/lsp/editors/vscode.rst b/docs/integrating/howto/editors/vscode.rst similarity index 100% rename from docs/lsp/editors/vscode.rst rename to docs/integrating/howto/editors/vscode.rst diff --git a/docs/lsp/howto/use-esbonio-in-emacs.rst b/docs/integrating/howto/emacs.rst similarity index 94% rename from docs/lsp/howto/use-esbonio-in-emacs.rst rename to docs/integrating/howto/emacs.rst index 49f1f43d..0c6ab5e5 100644 --- a/docs/lsp/howto/use-esbonio-in-emacs.rst +++ b/docs/integrating/howto/emacs.rst @@ -1,5 +1,7 @@ -How To Use Esbonio in Emacs -=========================== +.. _integrate-emacs: + +How To Integrate Esbonio with Emacs +=================================== There are two main language client implementations available in Emacs diff --git a/docs/lsp/howto/use-esbonio-in-nvim.rst b/docs/integrating/howto/nvim.rst similarity index 92% rename from docs/lsp/howto/use-esbonio-in-nvim.rst rename to docs/integrating/howto/nvim.rst index 02c01580..48749945 100644 --- a/docs/lsp/howto/use-esbonio-in-nvim.rst +++ b/docs/integrating/howto/nvim.rst @@ -1,5 +1,7 @@ -How To use Esbonio in Neovim -============================ +.. _integrate-nvim: + +How To Integrate Esbonio with Neovim +==================================== This guide covers how to setup ``esbonio`` with Neovim's built-in language client. @@ -56,7 +58,7 @@ For example the ``find_venv`` function below implements the following discovery - If ``nvim`` is launched with a virtual environment active, use it, otherwise - Look for a virtual environment located within the project's git repository -.. literalinclude:: ../editors/nvim-lspconfig/init.vim +.. literalinclude:: ./editors/nvim-lspconfig/init.vim :language: lua :start-at: function find_venv() :end-before: lspconfig @@ -96,9 +98,9 @@ This configuration includes: .. dropdown:: Show Example Config - You can also :download:`download <../editors/nvim-lspconfig/init.vim>` this file + You can also :download:`download <./editors/nvim-lspconfig/init.vim>` this file - .. literalinclude:: ../editors/nvim-lspconfig/init.vim + .. literalinclude:: ./editors/nvim-lspconfig/init.vim :language: vim diff --git a/docs/lsp/reference/previews.rst b/docs/integrating/reference/previews.rst similarity index 80% rename from docs/lsp/reference/previews.rst rename to docs/integrating/reference/previews.rst index 83d8b0fd..9c713f2e 100644 --- a/docs/lsp/reference/previews.rst +++ b/docs/integrating/reference/previews.rst @@ -1,5 +1,5 @@ -Preview Implementation -====================== +Previews +======== This page gives an overview of how the preview feature in ``esbonio`` is implemented. @@ -31,3 +31,18 @@ At a high level the typical interaction between the components may look somethin #. Once the page loads in the webview, the WebSocket client embedded in the page connects to the WebSocket server running in the Language Server. Using the Language Server as an intermediary, it's now possible for the editor and webview to communicate with each other. #. When the user scrolls the editor, the editor informs the webview where it should scroll to (and vice versa). + +Commands +-------- + +The server offers the following commands for controlling the underlying Sphinx processes. +They are invoked using an :lsp:`workspace/executeCommand` request + +.. esbonio:command:: esbonio.server.previewFile + + Preview the output for the given file. + This command accepts an object of the following form + + .. code-block:: json + + {"uri": "a0a5a856-d4ec-4c45-8461-78748ddbd06f"} diff --git a/docs/integrating/reference/sphinx-processes.rst b/docs/integrating/reference/sphinx-processes.rst new file mode 100644 index 00000000..ce4dd023 --- /dev/null +++ b/docs/integrating/reference/sphinx-processes.rst @@ -0,0 +1,40 @@ +Sphinx Process Management +========================= + +The language server provides additional notifications and commands that the client can use to provide greater insight and control over the Sphinx sub-processes mananged by ``esbonio`` + +Life-Cycle Notifications +------------------------ + +The following notifications will be emitted following during the life-cycle of a Sphinx sub-process + +.. currentmodule:: esbonio.server.features.sphinx_manager.manager + +.. autoclass:: ClientCreatedNotification + :members: + +.. autoclass:: AppCreatedNotification + :members: + +.. autoclass:: ClientErroredNotification + :members: + +.. autoclass:: ClientDestroyedNotification + :members: + +Commands +-------- + +The server offers the following commands for controlling the underlying Sphinx processes. +They are invoked using an :lsp:`workspace/executeCommand` request + +.. esbonio:command:: esbonio.sphinx.restart + + Restart the given Sphinx client(s). + This command accepts a list of objects of the following form + + .. code-block:: json + + {"id": "a0a5a856-d4ec-4c45-8461-78748ddbd06f"} + + Where each ``id`` corresponds to a Sphinx Client. diff --git a/docs/lsp/howto.rst b/docs/lsp/howto.rst index 0f16916b..8038bfc1 100644 --- a/docs/lsp/howto.rst +++ b/docs/lsp/howto.rst @@ -9,40 +9,3 @@ This section contains a number of guides to help you get the most out of Esbonio :hidden: Migrate to v1 - -Editor Integration ------------------- - -.. toctree:: - :hidden: - :maxdepth: 1 - - Use Esbonio in Emacs - Use Esbonio in Neovim - -While the :doc:`tutorial ` focuses on using ``esbonio`` from within VSCode. -These guides will help you get ``esbonio`` setup with your editor of choice - -.. admonition:: Don't see your favourite editor? - - Feel free to submit a pull request with steps on how to get started or if you're not - sure on where to start, `open an issue`_ and we'll help you figure it out. - -.. _open an issue: https://github.com/swyddfa/esbonio/issues/new - -.. grid:: 2 2 3 4 - :gutter: 1 - - .. grid-item-card:: Emacs - :link: howto/use-esbonio-in-emacs - :link-type: doc - :text-align: center - - How to use esbonio within Emacs, using either ``eglot`` or ``lsp-mode`` as your language client. - - .. grid-item-card:: Neovim - :link: howto/use-esbonio-in-nvim - :link-type: doc - :text-align: center - - Using ``esbonio`` with Neovim's built in language client. diff --git a/docs/lsp/reference/notifications.rst b/docs/lsp/reference/notifications.rst deleted file mode 100644 index 3af90708..00000000 --- a/docs/lsp/reference/notifications.rst +++ /dev/null @@ -1,18 +0,0 @@ -Notifications -============= - -In addition to the language server protocol, Esbonio will emit the following notifications - -.. currentmodule:: esbonio.server.features.sphinx_manager.manager - -.. autoclass:: ClientCreatedNotification - :members: - -.. autoclass:: AppCreatedNotification - :members: - -.. autoclass:: ClientErroredNotification - :members: - -.. autoclass:: ClientDestroyedNotification - :members: From e8370fea10f976ded277601873786bd77808f233 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Mon, 15 Jul 2024 19:47:42 +0100 Subject: [PATCH 37/48] docs: Create dedicated extending section --- docs/{lsp/extending.rst => extending/getting-started.rst} | 4 ++-- docs/index.rst | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) rename docs/{lsp/extending.rst => extending/getting-started.rst} (55%) diff --git a/docs/lsp/extending.rst b/docs/extending/getting-started.rst similarity index 55% rename from docs/lsp/extending.rst rename to docs/extending/getting-started.rst index 362a8d43..d9629f4b 100644 --- a/docs/lsp/extending.rst +++ b/docs/extending/getting-started.rst @@ -1,6 +1,6 @@ .. _lsp-extending: -Extending -========= +Extending Esbonio +================= Coming soon\ :sup:`TM` diff --git a/docs/index.rst b/docs/index.rst index 6c0de1b3..f12f9aa9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -43,17 +43,19 @@ The primary goal of Esbonio is to reduce the friction that comes from trying to Documentation on extending the language server .. toctree:: - :glob: :caption: Language Server :hidden: - :maxdepth: 2 lsp/getting-started - lsp/extending lsp/howto lsp/reference changelog +.. toctree:: + :caption: Extending + :hidden: + + Getting Started .. toctree:: :caption: Integrating From e095ab1da76fd275d451b858bde2d62119446822 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Mon, 15 Jul 2024 19:48:00 +0100 Subject: [PATCH 38/48] docs: Add custom directive for documenting LSP commands --- docs/ext/domain.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/ext/domain.py b/docs/ext/domain.py index 39b4d8ba..87b597f4 100644 --- a/docs/ext/domain.py +++ b/docs/ext/domain.py @@ -69,6 +69,25 @@ def add_target_and_index( domain.config_values[name] = (self.env.docname, node_id) +class Command(ObjectDescription[str]): + """Description of a ``workspace/executeCommand`` command.""" + + option_spec: OptionSpec = {} + + def handle_signature(self, sig: str, signode: addnodes.desc_signature) -> str: + signode += addnodes.desc_name(sig, sig) + return sig + + def add_target_and_index( + self, name: str, sig: str, signode: addnodes.desc_signature + ) -> None: + node_id = make_id(self.env, self.state.document, term=name) + signode["ids"].append(node_id) + + domain: EsbonioDomain = self.env.domains["esbonio"] + domain.commands[name] = (self.env.docname, node_id) + + class EsbonioDomain(Domain): """A domain dedicated to documenting the esbonio language server""" @@ -77,24 +96,32 @@ class EsbonioDomain(Domain): object_types: Dict[str, ObjType] = { "config": ObjType("config", "conf"), + "command": ObjType("command", "cmd"), } directives = { "config": ConfigValue, + "command": Command, } roles = { "conf": XRefRole(), + "cmd": XRefRole(), } initial_data = { "config_values": {}, + "commands": {}, } @property def config_values(self) -> dict[str, Tuple[str, str]]: return self.data.setdefault("config_values", {}) + @property + def commands(self) -> dict[str, Tuple[str, str]]: + return self.data.setdefault("commands", {}) + def resolve_xref( self, env: BuildEnvironment, @@ -110,6 +137,9 @@ def resolve_xref( if (entry := self.config_values.get(target, None)) is None: return None + if (entry := self.commands.get(target, None)) is None: + return None + return make_refnode( builder, fromdocname, entry[0], entry[1], [contnode], target ) From bbb151083bd4e070963efa4a78d2f915d7fc5d8b Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Mon, 15 Jul 2024 19:53:54 +0100 Subject: [PATCH 39/48] Update changelog --- code/changes/854.feature.md | 4 ++++ code/changes/854.misc.md | 1 + lib/esbonio/changes/854.feature.md | 1 + 3 files changed, 6 insertions(+) create mode 100644 code/changes/854.feature.md create mode 100644 code/changes/854.misc.md create mode 100644 lib/esbonio/changes/854.feature.md diff --git a/code/changes/854.feature.md b/code/changes/854.feature.md new file mode 100644 index 00000000..89329bcc --- /dev/null +++ b/code/changes/854.feature.md @@ -0,0 +1,4 @@ +Add a "Sphinx Processes" tree view + +The tree view shows the current status of Sphinx sub-processes as well as providing a place from which to control them. +Currently there is just one command that can be used to restart a given process diff --git a/code/changes/854.misc.md b/code/changes/854.misc.md new file mode 100644 index 00000000..b5f4fb07 --- /dev/null +++ b/code/changes/854.misc.md @@ -0,0 +1 @@ +Removed Language Status Items diff --git a/lib/esbonio/changes/854.feature.md b/lib/esbonio/changes/854.feature.md new file mode 100644 index 00000000..90b6b0c3 --- /dev/null +++ b/lib/esbonio/changes/854.feature.md @@ -0,0 +1 @@ +Add a `esbonio.sphinx.restart` command which, as the name suggests, allows a client to restart one or more Sphinx processes managed by the server From 7d96e708734d049ae359d4ac1682a500e406686c Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Mon, 15 Jul 2024 20:25:05 +0100 Subject: [PATCH 40/48] sphinx-agent: Add `nonl` to signature Added in Sphinx v7.4.0 https://github.com/sphinx-doc/sphinx/pull/12387/files#diff-f763bf5a40437258cde46f4e79ff42c4577f7ed831bd8370debdb8e084d49c40R65 --- lib/esbonio/esbonio/sphinx_agent/patches.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/esbonio/esbonio/sphinx_agent/patches.py b/lib/esbonio/esbonio/sphinx_agent/patches.py index 71e26af2..83e28b5c 100644 --- a/lib/esbonio/esbonio/sphinx_agent/patches.py +++ b/lib/esbonio/esbonio/sphinx_agent/patches.py @@ -68,7 +68,7 @@ def status_iterator( class progress_message: """Used to override Spinx's version of this, reports progress to the client.""" - def __init__(self, message: str) -> None: + def __init__(self, message: str, *, nonl: bool = True) -> None: self.message = message def __enter__(self) -> None: From 5baf39282afe6ef4d684907da56d53d3dcb459ba Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Tue, 16 Jul 2024 18:50:38 +0000 Subject: [PATCH 41/48] vscode: Cleanup old settings --- .vscode/settings.json | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1030b6a7..9722740e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -12,9 +12,6 @@ "[typescript]": { "editor.tabSize": 2 }, - "files.associations": { - "setup.cfg": "ini", - }, "files.exclude": { "**/.git": true, "**/.svn": true, @@ -32,10 +29,6 @@ "**/.mypy_cache": true }, "esbonio.server.showDeprecationWarnings": true, - "isort.args": [ - "--settings-file", - "./lib/esbonio/pyproject.toml" - ], "python.testing.pytestArgs": [ "lib/esbonio/tests" ], From 9a789ad5598f2548384f528756e29113e6eb9ce5 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Tue, 16 Jul 2024 20:03:51 +0000 Subject: [PATCH 42/48] devenv: Set TZ environment variable at the container level --- .devcontainer/devcontainer.json | 3 +++ .vscode/launch.json | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index aac2d51f..b8f3d60b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,6 +7,9 @@ // "build": { // "dockerfile": "Dockerfile" // }, + "containerEnv": { + "TZ": "UTC" + }, // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, // Use 'forwardPorts' to make a list of ports inside the container available locally. diff --git a/.vscode/launch.json b/.vscode/launch.json index 3bd8c818..3bd2b184 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -33,9 +33,6 @@ "--folder-uri=${workspaceRoot}/docs", "--folder-uri=${workspaceRoot}/lib/esbonio/tests/workspaces/demo" ], - "env": { - "TZ": "UTC" - }, "outFiles": [ "${workspaceRoot}/code/dist/node/**/*.js" ], From 02649e947f51a807a5c97be4347f43a252838a5f Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Tue, 16 Jul 2024 20:05:51 +0000 Subject: [PATCH 43/48] sphinx-agent: Handle unexpected config values --- lib/esbonio/changes/843.fix.md | 1 + lib/esbonio/esbonio/sphinx_agent/app.py | 1 + .../esbonio/sphinx_agent/handlers/files.py | 26 +++++++++++++------ lib/esbonio/tests/workspaces/demo/conf.py | 4 +++ 4 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 lib/esbonio/changes/843.fix.md diff --git a/lib/esbonio/changes/843.fix.md b/lib/esbonio/changes/843.fix.md new file mode 100644 index 00000000..ca2e6f32 --- /dev/null +++ b/lib/esbonio/changes/843.fix.md @@ -0,0 +1 @@ +The sphinx agent should no longer crash when encountering unexpected config values diff --git a/lib/esbonio/esbonio/sphinx_agent/app.py b/lib/esbonio/esbonio/sphinx_agent/app.py index 2b3e65bb..644baf58 100644 --- a/lib/esbonio/esbonio/sphinx_agent/app.py +++ b/lib/esbonio/esbonio/sphinx_agent/app.py @@ -28,6 +28,7 @@ RoleDefinition = Tuple[str, Any, List[types.Role.TargetProvider]] sphinx_logger = logging.getLogger(SPHINX_LOG_NAMESPACE) +logger = sphinx_logger.getChild("esbonio") sphinx_log_setup = sphinx_logging_module.setup diff --git a/lib/esbonio/esbonio/sphinx_agent/handlers/files.py b/lib/esbonio/esbonio/sphinx_agent/handlers/files.py index cccd470a..eeab0909 100644 --- a/lib/esbonio/esbonio/sphinx_agent/handlers/files.py +++ b/lib/esbonio/esbonio/sphinx_agent/handlers/files.py @@ -4,10 +4,12 @@ from ..app import Database from ..app import Sphinx +from ..app import logger from ..types import Uri from ..util import as_json if typing.TYPE_CHECKING: + from typing import Any from typing import List from typing import Optional from typing import Tuple @@ -45,6 +47,16 @@ def init_db(app: Sphinx, config: Config): app.esbonio.db.ensure_table(CONFIG_TABLE) +def value_to_db(name: str, item: Any) -> Tuple[str, str, Any]: + """Convert a single value to its DB representation""" + + try: + (value, scope, _) = item + return (name, scope, as_json(value)) + except Exception: + return (name, "", as_json(item)) + + def dump_config(app: Sphinx, *args): """Dump the user's config into the db so that the parent language server can inspect it.""" @@ -61,20 +73,18 @@ def dump_config(app: Sphinx, *args): continue try: - (value, scope, _) = item - values.append((name, scope, as_json(value))) - except Exception: - values.append((name, "", as_json(item))) + values.append(value_to_db(name, item)) + except Exception as exc: + logger.debug(f"Unable to dump config value: {name!r}: {exc}") for name, item in config.items(): if name in IGNORED_CONFIG_NAMES: continue try: - (value, scope, _) = item - values.append((name, scope, as_json(value))) - except Exception: - values.append((name, "", as_json(item))) + values.append(value_to_db(name, item)) + except Exception as exc: + logger.debug(f"Unable to dump config value: {name!r}: {exc}") app.esbonio.db.insert_values(CONFIG_TABLE, values) diff --git a/lib/esbonio/tests/workspaces/demo/conf.py b/lib/esbonio/tests/workspaces/demo/conf.py index bbd74a0e..430f82ba 100644 --- a/lib/esbonio/tests/workspaces/demo/conf.py +++ b/lib/esbonio/tests/workspaces/demo/conf.py @@ -24,6 +24,10 @@ templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "env", ".tox", "README.md"] +linkcheck_allowed_redirects = { + # All HTTP redirections from the source URI to the canonical URI will be treated as "working". + r"https://sphinx-doc\.org/.*": r"https://sphinx-doc\.org/en/master/.*" +} # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output From 5aeef3579c9275a1f5c6216b0eca4b8bf3ffbbbf Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Thu, 18 Jul 2024 18:50:40 +0100 Subject: [PATCH 44/48] lsp: Extend role regexes to handle `external+invname` roles --- lib/esbonio/esbonio/sphinx_agent/types/roles.py | 4 ++-- lib/esbonio/tests/server/test_patterns.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lib/esbonio/esbonio/sphinx_agent/types/roles.py b/lib/esbonio/esbonio/sphinx_agent/types/roles.py index 0cda961a..6be91471 100644 --- a/lib/esbonio/esbonio/sphinx_agent/types/roles.py +++ b/lib/esbonio/esbonio/sphinx_agent/types/roles.py @@ -26,7 +26,7 @@ ([^\w`]|^\s*) # roles cannot be preceeded by letter chars (?P { # roles start with a '{' - (?P[:\w-]+)? # roles have a name + (?P[:\w+-]+)? # roles have a name }? # roles end with a '}' ) (?P @@ -74,7 +74,7 @@ (?P : # roles begin with a ':' character (?!:) # the next character cannot be a ':' - ((?P\w([:\w-]*\w)?):?)? # roles have a name + ((?P\w([:\w+-]*\w)?):?)? # roles have a name ) (?P ` # targets begin with a '`' character diff --git a/lib/esbonio/tests/server/test_patterns.py b/lib/esbonio/tests/server/test_patterns.py index 3d674767..722ce0e9 100644 --- a/lib/esbonio/tests/server/test_patterns.py +++ b/lib/esbonio/tests/server/test_patterns.py @@ -73,6 +73,14 @@ def test_myst_directive_regex(string, expected): ("{code-block", {"name": "code-block", "role": "{code-block"}), ("{c:func}", {"name": "c:func", "role": "{c:func}"}), ("{cpp:func}", {"name": "cpp:func", "role": "{cpp:func}"}), + ( + "{external:cpp:func}", + {"name": "external:cpp:func", "role": "{external:cpp:func}"}, + ), + ( + "{external+python:cpp:func}", + {"name": "external+python:cpp:func", "role": "{external+python:cpp:func}"}, + ), ("{ref}`", {"name": "ref", "role": "{ref}", "target": "`"}), ( "{code-block}`", @@ -532,6 +540,14 @@ def test_directive_option_regex(string, expected): (":code-block", {"name": "code-block", "role": ":code-block"}), (":c:func:", {"name": "c:func", "role": ":c:func:"}), (":cpp:func:", {"name": "cpp:func", "role": ":cpp:func:"}), + ( + ":external:cpp:func:", + {"name": "external:cpp:func", "role": ":external:cpp:func:"}, + ), + ( + ":external+python:cpp:func:", + {"name": "external+python:cpp:func", "role": ":external+python:cpp:func:"}, + ), (":ref:`", {"name": "ref", "role": ":ref:", "target": "`"}), ( ":code-block:`", From 65c27466f841f4ae71374ea27b7e3cac3ada7546 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Thu, 18 Jul 2024 20:29:17 +0100 Subject: [PATCH 45/48] sphinx-agent: Dump intersphinx inventories in the DB This adds code to dump all objects defined in intersphinx inventories into the `objects` table in the SQLite DB. So that the language server can distinguish between local objects and objects defined in another project, the `objects` table has been extended to include a `project` column. It will be `NULL` for objects in the local project or be set to the intersphinx inventory name otherwise. To ensure that the language server is able to surface these items in completions this commit updates the domain role indexing code to also store `external:domain:role` and `external+invname:domain:role` variants of the role in the DB. This feels... hacky but seems to work well. Maybe this can be revisited in the future and improved with a more dynamic role completion system... --- lib/esbonio/esbonio/sphinx_agent/app.py | 26 ---- lib/esbonio/esbonio/sphinx_agent/database.py | 7 +- .../esbonio/sphinx_agent/handlers/domains.py | 147 +++++++++++++++++- .../sphinx-agent/handlers/test_domains.py | 36 ++++- lib/esbonio/tests/workspaces/demo/conf.py | 7 + 5 files changed, 189 insertions(+), 34 deletions(-) diff --git a/lib/esbonio/esbonio/sphinx_agent/app.py b/lib/esbonio/esbonio/sphinx_agent/app.py index 644baf58..6cbff3b6 100644 --- a/lib/esbonio/esbonio/sphinx_agent/app.py +++ b/lib/esbonio/esbonio/sphinx_agent/app.py @@ -16,14 +16,9 @@ if typing.TYPE_CHECKING: from typing import IO from typing import Any - from typing import Dict from typing import List from typing import Optional - from typing import Set from typing import Tuple - from typing import Type - - from sphinx.domains import Domain RoleDefinition = Tuple[str, Any, List[types.Role.TargetProvider]] @@ -120,24 +115,3 @@ def __init__(self, *args, **kwargs): def add_role(self, name: str, role: Any, override: bool = False): super().add_role(name, role, override) self.esbonio.add_role(name, role) - - def add_domain(self, domain: Type[Domain], override: bool = False) -> None: - super().add_domain(domain, override) - - target_types: Dict[str, Set[str]] = {} - - for obj_name, item_type in domain.object_types.items(): - for role_name in item_type.roles: - target_type = f"{domain.name}:{obj_name}" - target_types.setdefault(role_name, set()).add(target_type) - - for name, role in domain.roles.items(): - providers = [] - if (item_types := target_types.get(name)) is not None: - providers.append( - self.esbonio.create_role_target_provider( - "objects", obj_types=list(item_types) - ) - ) - - self.esbonio.add_role(f"{domain.name}:{name}", role, providers) diff --git a/lib/esbonio/esbonio/sphinx_agent/database.py b/lib/esbonio/esbonio/sphinx_agent/database.py index 80be9e26..db86c869 100644 --- a/lib/esbonio/esbonio/sphinx_agent/database.py +++ b/lib/esbonio/esbonio/sphinx_agent/database.py @@ -93,8 +93,11 @@ def clear_table(self, table: Table, **kwargs): parameters: List[Any] = [] for param, value in kwargs.items(): - where.append(f"{param} = ?") - parameters.append(value) + if value is None: + where.append(f"{param} is null") + else: + where.append(f"{param} = ?") + parameters.append(value) if where: conditions = " AND ".join(where) diff --git a/lib/esbonio/esbonio/sphinx_agent/handlers/domains.py b/lib/esbonio/esbonio/sphinx_agent/handlers/domains.py index 661f693e..07d4b58e 100644 --- a/lib/esbonio/esbonio/sphinx_agent/handlers/domains.py +++ b/lib/esbonio/esbonio/sphinx_agent/handlers/domains.py @@ -11,9 +11,26 @@ if typing.TYPE_CHECKING: from typing import Dict + from typing import List from typing import Optional + from typing import Set from typing import Tuple + from sphinx.domains import Domain + from sphinx.util.typing import Inventory + + +PROJECTS_TABLE = Database.Table( + "intersphinx_projects", + [ + Database.Column(name="id", dtype="TEXT"), + Database.Column(name="name", dtype="TEXT"), + Database.Column(name="version", dtype="TEXT"), + Database.Column(name="uri", dtype="TEXT"), + ], +) + + OBJECTS_TABLE = Database.Table( "objects", [ @@ -22,6 +39,7 @@ Database.Column(name="domain", dtype="TEXT"), Database.Column(name="objtype", dtype="TEXT"), Database.Column(name="docname", dtype="TEXT"), + Database.Column(name="project", dtype="TEXT"), Database.Column(name="description", dtype="TEXT"), Database.Column(name="location", dtype="JSON"), ], @@ -36,13 +54,18 @@ def __init__(self, app: Sphinx): Tuple[str, str, str, str], Tuple[Optional[str], Optional[str]] ] = {} - app.connect("builder-inited", self.init_db) + # Needs to run late, but before the handler in ./roles.py + app.connect("builder-inited", self.init_db, priority=998) app.connect("object-description-transform", self.object_defined) app.connect("build-finished", self.commit) def init_db(self, app: Sphinx): """Prepare the database.""" - app.esbonio.db.ensure_table(OBJECTS_TABLE) + projects = index_intersphinx_projects(app) + project_names = [p[0] for p in projects] + + for domain in app.env.domains.values(): + index_domain(app, domain, project_names) def commit(self, app, exc): """Commit changes to the database. @@ -54,7 +77,7 @@ def commit(self, app, exc): I will be *very* surprised if this never becomes a performance issue, but we will have to think of a smarter approach when it comes to it. """ - app.esbonio.db.clear_table(OBJECTS_TABLE) + app.esbonio.db.clear_table(OBJECTS_TABLE, project=None) rows = [] for name, domain in app.env.domains.items(): @@ -62,8 +85,12 @@ def commit(self, app, exc): desc, location = self._info.get( (objname, name, objtype, docname), (None, None) ) + + if objname == (display := str(dispname)): + display = "-" + rows.append( - (objname, str(dispname), name, objtype, docname, desc, location) + (objname, display, name, objtype, docname, None, desc, location) ) app.esbonio.db.insert_values(OBJECTS_TABLE, rows) @@ -112,5 +139,117 @@ def object_defined( self._info[key] = (description, location) +def index_domain(app: Sphinx, domain: Domain, projects: Optional[List[str]]): + """Index the roles in the given domain. + + Parameters + ---------- + app + The application instance + + domain + The domain to index + + projects + The list of known intersphinx projects + """ + target_types: Dict[str, Set[str]] = {} + + for obj_name, item_type in domain.object_types.items(): + for role_name in item_type.roles: + target_type = f"{domain.name}:{obj_name}" + target_types.setdefault(role_name, set()).add(target_type) + + for name, role in domain.roles.items(): + if (item_types := target_types.get(name)) is None: + app.esbonio.add_role(f"{domain.name}:{name}", role, []) + continue + + # Add an entry for the local project. + provider = app.esbonio.create_role_target_provider( + "objects", obj_types=list(item_types), projects=None + ) + app.esbonio.add_role(f"{domain.name}:{name}", role, [provider]) + + if projects is None or len(projects) == 0: + continue + + # Add an entry referencing all external projects + provider = app.esbonio.create_role_target_provider( + "objects", obj_types=list(item_types), projects=projects + ) + app.esbonio.add_role(f"external:{domain.name}:{name}", role, [provider]) + + # Add an entry dedicated to each external project + for project in projects: + provider = app.esbonio.create_role_target_provider( + "objects", obj_types=list(item_types), projects=[project] + ) + app.esbonio.add_role( + f"external+{project}:{domain.name}:{name}", role, [provider] + ) + + +def index_intersphinx_projects(app: Sphinx) -> List[Tuple[str, str, str, str]]: + """Index all the projects known to intersphinx. + + Parameters + ---------- + app + The application instance + + Returns + ------- + List[Tuple[str, str, str, str]] + The list of discovered projects + """ + app.esbonio.db.ensure_table(OBJECTS_TABLE) + app.esbonio.db.ensure_table(PROJECTS_TABLE) + app.esbonio.db.clear_table(PROJECTS_TABLE) + + projects: List[Tuple[str, str, str, str]] = [] + objects = [] + + mapping = getattr(app.config, "intersphinx_mapping", {}) + inventory = getattr(app.env, "intersphinx_named_inventory", {}) + + for id_, (_, (uri, _)) in mapping.items(): + if (project := inventory.get(id_, None)) is None: + continue + + app.esbonio.db.clear_table(OBJECTS_TABLE, project=id_) + + # We just need an entry to be able to extract the project name and version + (name, version, _, _) = next(iter(next(iter(project.values())).values())) + + projects.append((id_, name, version, uri)) + objects.extend(index_intersphinx_objects(id_, uri, project)) + + app.esbonio.db.insert_values(PROJECTS_TABLE, projects) + app.esbonio.db.insert_values(OBJECTS_TABLE, objects) + + return projects + + +def index_intersphinx_objects(project_name: str, uri: str, project: Inventory): + """Index all the objects in the given project.""" + + objects = [] + + for objtype, items in project.items(): + domain = None + if ":" in objtype: + domain, *parts = objtype.split(":") + objtype = ":".join(parts) + + for objname, (_, _, item_uri, display) in items.items(): + docname = item_uri.replace(uri, "") + objects.append( + (objname, display, domain, objtype, docname, project_name, None, None) + ) + + return objects + + def setup(app: Sphinx): DomainObjects(app) diff --git a/lib/esbonio/tests/sphinx-agent/handlers/test_domains.py b/lib/esbonio/tests/sphinx-agent/handlers/test_domains.py index e1c07c5f..ffa5788a 100644 --- a/lib/esbonio/tests/sphinx-agent/handlers/test_domains.py +++ b/lib/esbonio/tests/sphinx-agent/handlers/test_domains.py @@ -7,6 +7,8 @@ from esbonio.server.features.project_manager import Project if typing.TYPE_CHECKING: + from typing import List + from sphinx.application import Sphinx @@ -23,7 +25,8 @@ async def test_python_domain_discovery(app: Sphinx, project: Project): actual = set() db = await project.get_db() cursor = await db.execute( - "SELECT name, objtype, docname FROM objects where domain = 'py'" + "SELECT name, objtype, docname FROM objects " + "WHERE domain = 'py' AND project IS NULL" ) for item in await cursor.fetchall(): @@ -45,10 +48,39 @@ async def test_std_domain_discovery(app: Sphinx, project: Project): actual = set() db = await project.get_db() cursor = await db.execute( - "SELECT name, objtype, docname FROM objects where domain = 'std'" + "SELECT name, objtype, docname FROM objects " + "WHERE domain = 'std' AND project IS NULL" ) for item in await cursor.fetchall(): actual.add(item) assert expected == actual + + +@pytest.mark.parametrize( + "projname, domain, objtype, expected", + [ + ("python", "py", "class", ["logging.Filter"]), + ("sphinx", "py", "class", ["sphinx.addnodes.desc"]), + ], +) +@pytest.mark.asyncio +async def test_intersphinx_domain_discovery( + project: Project, domain: str, objtype: str, projname: str, expected: List[str] +): + """Ensure that we can correctly index all the objects associated with the Python + domain in intersphinx projects.""" + + db = await project.get_db() + cursor = await db.execute( + "SELECT name FROM objects " "WHERE domain = ? AND objtype = ? AND project = ?", + (domain, objtype, projname), + ) + + actual = set() + for (name,) in await cursor.fetchall(): + actual.add(name) + + for name in expected: + assert name in actual diff --git a/lib/esbonio/tests/workspaces/demo/conf.py b/lib/esbonio/tests/workspaces/demo/conf.py index 430f82ba..cd49e88c 100644 --- a/lib/esbonio/tests/workspaces/demo/conf.py +++ b/lib/esbonio/tests/workspaces/demo/conf.py @@ -17,6 +17,7 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration extensions = [ + "sphinx.ext.intersphinx", "sphinx_design", "myst_parser", ] @@ -24,6 +25,12 @@ templates_path = ["_templates"] exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "env", ".tox", "README.md"] +intersphinx_mapping = { + "python": ("https://docs.python.org/3/", None), + "sphinx": ("https://www.sphinx-doc.org/en/master", None), +} + + linkcheck_allowed_redirects = { # All HTTP redirections from the source URI to the canonical URI will be treated as "working". r"https://sphinx-doc\.org/.*": r"https://sphinx-doc\.org/en/master/.*" From c64d749dfdb505858042807497e93fdf7bb0c338 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 19 Jul 2024 19:24:50 +0100 Subject: [PATCH 46/48] lsp: Update the objects target provider to handle `project` --- lib/esbonio/changes/464.feature.md | 1 + .../server/features/sphinx_support/roles.py | 51 +++++++++++++----- lib/esbonio/tests/e2e/test_e2e_roles.py | 54 ++++++++++++++++--- 3 files changed, 86 insertions(+), 20 deletions(-) create mode 100644 lib/esbonio/changes/464.feature.md diff --git a/lib/esbonio/changes/464.feature.md b/lib/esbonio/changes/464.feature.md new file mode 100644 index 00000000..aeceb9e8 --- /dev/null +++ b/lib/esbonio/changes/464.feature.md @@ -0,0 +1 @@ +The language server now generates completions for `:external:` roles and their corresponding targets diff --git a/lib/esbonio/esbonio/server/features/sphinx_support/roles.py b/lib/esbonio/esbonio/server/features/sphinx_support/roles.py index 582b17d9..541fe8b2 100644 --- a/lib/esbonio/esbonio/server/features/sphinx_support/roles.py +++ b/lib/esbonio/esbonio/server/features/sphinx_support/roles.py @@ -42,36 +42,63 @@ async def suggest_targets( # type: ignore[override] context: server.CompletionContext, *, obj_types: List[str], + projects: Optional[List[str]], ) -> Optional[List[lsp.CompletionItem]]: - self.logger.debug("Suggesting targets for types: %s", obj_types) + # TODO: Handle .. currentmodule if (project := self.manager.get_project(context.uri)) is None: return None + items = [] db = await project.get_db() - query = " ".join( - [ - "SELECT name, display, objtype FROM objects", - "WHERE printf('%s:%s', domain, objtype) IN (", - ", ".join("?" for _ in range(len(obj_types))), - ");", - ] - ) - items = [] - cursor = await db.execute(query, tuple(obj_types)) + query, parameters = self._prepare_target_query(projects, obj_types) + cursor = await db.execute(query, parameters) + for name, display, type_ in await cursor.fetchall(): kind = TARGET_KINDS.get(type_, lsp.CompletionItemKind.Reference) items.append( lsp.CompletionItem( label=name, - detail=display, + detail=None if display == "-" else display, kind=kind, ), ) return items + def _prepare_target_query( + self, projects: Optional[List[str]], obj_types: List[str] + ): + """Prepare the query to use when looking up targets.""" + + select = "SELECT name, display, objtype FROM objects" + where = [] + parameters = [] + + if projects is None: + self.logger.debug( + "Suggesting targets from the local project for types: %s", obj_types + ) + where.append("project IS NULL") + + else: + self.logger.debug( + "Suggesting targets from projects %s for types: %s", projects, obj_types + ) + + placeholders = ", ".join("?" for _ in range(len(projects))) + where.append(f"project IN ({placeholders})") + parameters.extend(projects) + + placeholders = ", ".join("?" for _ in range(len(obj_types))) + where.append(f"printf('%s:%s', domain, objtype) IN ({placeholders})") + parameters.extend(obj_types) + + query = " ".join([select, "WHERE", " AND ".join(where)]) + + return query, tuple(parameters) + class SphinxRoles(roles.RoleProvider): """Support for roles in a sphinx project.""" diff --git a/lib/esbonio/tests/e2e/test_e2e_roles.py b/lib/esbonio/tests/e2e/test_e2e_roles.py index 81b6049d..1ad20590 100644 --- a/lib/esbonio/tests/e2e/test_e2e_roles.py +++ b/lib/esbonio/tests/e2e/test_e2e_roles.py @@ -32,6 +32,14 @@ } +LOCAL_PY_CLASSES = { + "counters.pattern.PatternCounter", + "counters.pattern.NoMatchesError", +} +PYTHON_PY_CLASSES = {"logging.Filter", "http.server.HTTPServer"} +SPHINX_PY_CLASSES = {"sphinx.addnodes.desc"} + + @pytest.mark.parametrize( "text, expected, unexpected", [ @@ -131,13 +139,28 @@ async def test_rst_role_completions( (":std:doc:`", {"demo_myst", "demo_rst", "rst/domains/python"}, set()), ( ":class:`", - {"counters.pattern.PatternCounter", "counters.pattern.NoMatchesError"}, - set(), + LOCAL_PY_CLASSES, + PYTHON_PY_CLASSES | SPHINX_PY_CLASSES, ), ( ":py:class:`", - {"counters.pattern.PatternCounter", "counters.pattern.NoMatchesError"}, - set(), + LOCAL_PY_CLASSES, + PYTHON_PY_CLASSES | SPHINX_PY_CLASSES, + ), + ( + ":external:py:class:`", + PYTHON_PY_CLASSES | SPHINX_PY_CLASSES, + LOCAL_PY_CLASSES, + ), + ( + ":external+python:py:class:`", + PYTHON_PY_CLASSES, + LOCAL_PY_CLASSES | SPHINX_PY_CLASSES, + ), + ( + ":external+sphinx:py:class:`", + SPHINX_PY_CLASSES, + LOCAL_PY_CLASSES | PYTHON_PY_CLASSES, ), (":func:`", {"counters.pattern.count_numbers"}, set()), (":py:func:`", {"counters.pattern.count_numbers"}, set()), @@ -313,13 +336,28 @@ async def test_myst_role_completions( ("{std:doc}`", {"demo_myst", "demo_rst", "rst/domains/python"}, set()), ( "{class}`", - {"counters.pattern.PatternCounter", "counters.pattern.NoMatchesError"}, - set(), + LOCAL_PY_CLASSES, + PYTHON_PY_CLASSES | SPHINX_PY_CLASSES, ), ( "{py:class}`", - {"counters.pattern.PatternCounter", "counters.pattern.NoMatchesError"}, - set(), + LOCAL_PY_CLASSES, + PYTHON_PY_CLASSES | SPHINX_PY_CLASSES, + ), + ( + "{external:py:class}`", + PYTHON_PY_CLASSES | SPHINX_PY_CLASSES, + LOCAL_PY_CLASSES, + ), + ( + "{external+sphinx:py:class}`", + SPHINX_PY_CLASSES, + LOCAL_PY_CLASSES | PYTHON_PY_CLASSES, + ), + ( + "{external+python:py:class}`", + PYTHON_PY_CLASSES, + LOCAL_PY_CLASSES | SPHINX_PY_CLASSES, ), ("{func}`", {"counters.pattern.count_numbers"}, set()), ("{py:func}`", {"counters.pattern.count_numbers"}, set()), From 015087b30b4b747b30c247b6d6e4fb0d1dd6e661 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 19 Jul 2024 19:26:02 +0100 Subject: [PATCH 47/48] Print traceback when entering pdb --- scripts/sphinx-app.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/sphinx-app.py b/scripts/sphinx-app.py index f7fa996d..8bb0aadf 100644 --- a/scripts/sphinx-app.py +++ b/scripts/sphinx-app.py @@ -35,6 +35,7 @@ import pathlib import pdb import time +import traceback from esbonio.sphinx_agent import handlers, types from esbonio.sphinx_agent.app import Sphinx @@ -53,4 +54,5 @@ ) app.build() except Exception: + traceback.print_exc() pdb.post_mortem() From 9290cefc819376dda0119a9cb0e3227bacd1d0d8 Mon Sep 17 00:00:00 2001 From: Alex Carney Date: Fri, 19 Jul 2024 19:55:32 +0100 Subject: [PATCH 48/48] code: Update changelog --- code/changes/831.misc.md | 1 - code/changes/857.misc.md | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 code/changes/831.misc.md create mode 100644 code/changes/857.misc.md diff --git a/code/changes/831.misc.md b/code/changes/831.misc.md deleted file mode 100644 index 27c8ac9e..00000000 --- a/code/changes/831.misc.md +++ /dev/null @@ -1 +0,0 @@ -Update bundled version of the language server to `v1.0.0b4` diff --git a/code/changes/857.misc.md b/code/changes/857.misc.md new file mode 100644 index 00000000..408e19b3 --- /dev/null +++ b/code/changes/857.misc.md @@ -0,0 +1 @@ +Update bundled version of the language server to `v1.0.0b6`