mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-02-13 12:43:38 +00:00
Auto merge of #15265 - tetsuharuohzeki:update-dependencies, r=lnicola
editor/code: Update dependencies This includes: - Some major changes. - [typescript-eslint v6](https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/) - [prettier v3](https://prettier.io/blog/2023/07/05/3.0.0.html) - ~Update ``@types/vscode`` to [1.79](https://code.visualstudio.com/updates/v1_79).~ - ~[1.80 has been released](https://code.visualstudio.com/updates/v1_80). We can now bump it.~ - _Update1: I removed this change. See the below comments_ - and some patch/minor updates.
This commit is contained in:
commit
c7ce8add14
20 changed files with 690 additions and 363 deletions
|
@ -6,7 +6,7 @@ module.exports = {
|
|||
extends: ["prettier"],
|
||||
parser: "@typescript-eslint/parser",
|
||||
parserOptions: {
|
||||
project: "tsconfig.eslint.json",
|
||||
project: true,
|
||||
tsconfigRootDir: __dirname,
|
||||
sourceType: "module",
|
||||
},
|
||||
|
|
682
editors/code/package-lock.json
generated
682
editors/code/package-lock.json
generated
|
@ -19,26 +19,99 @@
|
|||
"@tsconfig/strictest": "^2.0.1",
|
||||
"@types/node": "~16.11.7",
|
||||
"@types/vscode": "~1.78.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||
"@typescript-eslint/parser": "^5.60.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"@vscode/test-electron": "^2.3.3",
|
||||
"@vscode/vsce": "^2.19.0",
|
||||
"esbuild": "^0.18.10",
|
||||
"eslint": "^8.43.0",
|
||||
"esbuild": "^0.18.12",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"ovsx": "^0.8.1",
|
||||
"prettier": "^2.8.8",
|
||||
"ovsx": "^0.8.2",
|
||||
"prettier": "^3.0.0",
|
||||
"tslib": "^2.6.0",
|
||||
"typescript": "^5.1.3"
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"engines": {
|
||||
"vscode": "^1.78.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@aashutoshrathi/word-wrap": {
|
||||
"version": "1.2.6",
|
||||
"resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
|
||||
"integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.12.tgz",
|
||||
"integrity": "sha512-LIxaNIQfkFZbTLb4+cX7dozHlAbAshhFE5PKdro0l+FnCpx1GDJaQ2WMcqm+ToXKMt8p8Uojk/MFRuGyz3V5Sw==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-arm64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.12.tgz",
|
||||
"integrity": "sha512-BMAlczRqC/LUt2P97E4apTBbkvS9JTJnp2DKFbCwpZ8vBvXVbNdqmvzW/OsdtI/+mGr+apkkpqGM8WecLkPgrA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/android-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-zU5MyluNsykf5cOJ0LZZZjgAHbhPJ1cWfdH1ZXVMXxVMhEV0VZiZXQdwBBVvmvbF28EizeK7obG9fs+fpmS0eQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"android"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-arm64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.12.tgz",
|
||||
"integrity": "sha512-zUZMep7YONnp6954QOOwEBwFX9svlKd3ov6PkxKd53LGTHsp/gy7vHaPGhhjBmEpqXEXShi6dddjIkmd+NgMsA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"darwin"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/darwin-x64": {
|
||||
"version": "0.18.10",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.10.tgz",
|
||||
"integrity": "sha512-tnz/mdZk1L1Z3WpGjin/L2bKTe8/AKZpI8fcCLtH+gq8WXWsCNJSxlesAObV4qbtTl6pG5vmqFXfWUQ5hV8PAQ==",
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-ohqLPc7i67yunArPj1+/FeeJ7AgwAjHqKZ512ADk3WsE3FHU9l+m5aa7NdxXr0HmN1bjDlUslBjWNbFlD9y12Q==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
@ -51,6 +124,278 @@
|
|||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-arm64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.12.tgz",
|
||||
"integrity": "sha512-GIIHtQXqgeOOqdG16a/A9N28GpkvjJnjYMhOnXVbn3EDJcoItdR58v/pGN31CHjyXDc8uCcRnFWmqaJt24AYJg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/freebsd-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-zK0b9a1/0wZY+6FdOS3BpZcPc1kcx2G5yxxfEJtEUzVxI6n/FrC2Phsxj/YblPuBchhBZ/1wwn7AyEBUyNSa6g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"freebsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.12.tgz",
|
||||
"integrity": "sha512-y75OijvrBE/1XRrXq1jtrJfG26eHeMoqLJ2dwQNwviwTuTtHGCojsDO6BJNF8gU+3jTn1KzJEMETytwsFSvc+Q==",
|
||||
"cpu": [
|
||||
"arm"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-arm64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.12.tgz",
|
||||
"integrity": "sha512-JKgG8Q/LL/9sw/iHHxQyVMoQYu3rU3+a5Z87DxC+wAu3engz+EmctIrV+FGOgI6gWG1z1+5nDDbXiRMGQZXqiw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ia32": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.12.tgz",
|
||||
"integrity": "sha512-yoRIAqc0B4lDIAAEFEIu9ttTRFV84iuAl0KNCN6MhKLxNPfzwCBvEMgwco2f71GxmpBcTtn7KdErueZaM2rEvw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-loong64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.12.tgz",
|
||||
"integrity": "sha512-qYgt3dHPVvf/MgbIBpJ4Sup/yb9DAopZ3a2JgMpNKIHUpOdnJ2eHBo/aQdnd8dJ21X/+sS58wxHtA9lEazYtXQ==",
|
||||
"cpu": [
|
||||
"loong64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-mips64el": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.12.tgz",
|
||||
"integrity": "sha512-wHphlMLK4ufNOONqukELfVIbnGQJrHJ/mxZMMrP2jYrPgCRZhOtf0kC4yAXBwnfmULimV1qt5UJJOw4Kh13Yfg==",
|
||||
"cpu": [
|
||||
"mips64el"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-ppc64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.12.tgz",
|
||||
"integrity": "sha512-TeN//1Ft20ZZW41+zDSdOI/Os1bEq5dbvBvYkberB7PHABbRcsteeoNVZFlI0YLpGdlBqohEpjrn06kv8heCJg==",
|
||||
"cpu": [
|
||||
"ppc64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-riscv64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.12.tgz",
|
||||
"integrity": "sha512-AgUebVS4DoAblBgiB2ACQ/8l4eGE5aWBb8ZXtkXHiET9mbj7GuWt3OnsIW/zX+XHJt2RYJZctbQ2S/mDjbp0UA==",
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-s390x": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.12.tgz",
|
||||
"integrity": "sha512-dJ3Rb3Ei2u/ysSXd6pzleGtfDdc2MuzKt8qc6ls8vreP1G3B7HInX3i7gXS4BGeVd24pp0yqyS7bJ5NHaI9ing==",
|
||||
"cpu": [
|
||||
"s390x"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/linux-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-OrNJMGQbPaVyHHcDF8ybNSwu7TDOfX8NGpXCbetwOSP6txOJiWlgQnRymfC9ocR1S0Y5PW0Wb1mV6pUddqmvmQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"linux"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/netbsd-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-55FzVCAiwE9FK8wWeCRuvjazNRJ1QqLCYGZVB6E8RuQuTeStSwotpSW4xoRGwp3a1wUsaVCdYcj5LGCASVJmMg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"netbsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/openbsd-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-qnluf8rfb6Y5Lw2tirfK2quZOBbVqmwxut7GPCIJsM8lc4AEUj9L8y0YPdLaPK0TECt4IdyBdBD/KRFKorlK3g==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"openbsd"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/sunos-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-+RkKpVQR7bICjTOPUpkTBTaJ4TFqQBX5Ywyd/HSdDkQGn65VPkTsR/pL4AMvuMWy+wnXgIl4EY6q4mVpJal8Kg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"sunos"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-arm64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.12.tgz",
|
||||
"integrity": "sha512-GNHuciv0mFM7ouzsU0+AwY+7eV4Mgo5WnbhfDCQGtpvOtD1vbOiRjPYG6dhmMoFyBjj+pNqQu2X+7DKn0KQ/Gw==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-ia32": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.12.tgz",
|
||||
"integrity": "sha512-kR8cezhYipbbypGkaqCTWIeu4zID17gamC8YTPXYtcN3E5BhhtTnwKBn9I0PJur/T6UVwIEGYzkffNL0lFvxEw==",
|
||||
"cpu": [
|
||||
"ia32"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esbuild/win32-x64": {
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.12.tgz",
|
||||
"integrity": "sha512-O0UYQVkvfM/jO8a4OwoV0mAKSJw+mjWTAd1MJd/1FCX6uiMdLmMRPK/w6e9OQ0ob2WGxzIm9va/KG0Ja4zIOgg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"os": [
|
||||
"win32"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@eslint-community/eslint-utils": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
|
||||
|
@ -76,14 +421,14 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/eslintrc": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz",
|
||||
"integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==",
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz",
|
||||
"integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ajv": "^6.12.4",
|
||||
"debug": "^4.3.2",
|
||||
"espree": "^9.5.2",
|
||||
"espree": "^9.6.0",
|
||||
"globals": "^13.19.0",
|
||||
"ignore": "^5.2.0",
|
||||
"import-fresh": "^3.2.1",
|
||||
|
@ -99,9 +444,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@eslint/js": {
|
||||
"version": "8.43.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.43.0.tgz",
|
||||
"integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==",
|
||||
"version": "8.44.0",
|
||||
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz",
|
||||
"integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
|
@ -226,32 +571,35 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/@typescript-eslint/eslint-plugin": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.60.1.tgz",
|
||||
"integrity": "sha512-KSWsVvsJsLJv3c4e73y/Bzt7OpqMCADUO846bHcuWYSYM19bldbAeDv7dYyV0jwkbMfJ2XdlzwjhXtuD7OY6bw==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.0.0.tgz",
|
||||
"integrity": "sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@typescript-eslint/scope-manager": "5.60.1",
|
||||
"@typescript-eslint/type-utils": "5.60.1",
|
||||
"@typescript-eslint/utils": "5.60.1",
|
||||
"@eslint-community/regexpp": "^4.5.0",
|
||||
"@typescript-eslint/scope-manager": "6.0.0",
|
||||
"@typescript-eslint/type-utils": "6.0.0",
|
||||
"@typescript-eslint/utils": "6.0.0",
|
||||
"@typescript-eslint/visitor-keys": "6.0.0",
|
||||
"debug": "^4.3.4",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"ignore": "^5.2.0",
|
||||
"graphemer": "^1.4.0",
|
||||
"ignore": "^5.2.4",
|
||||
"natural-compare": "^1.4.0",
|
||||
"natural-compare-lite": "^1.4.0",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
"semver": "^7.5.0",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
"@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha",
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
@ -260,25 +608,26 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/parser": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.60.1.tgz",
|
||||
"integrity": "sha512-pHWlc3alg2oSMGwsU/Is8hbm3XFbcrb6P5wIxcQW9NsYBfnrubl/GhVVD/Jm/t8HXhA2WncoIRfBtnCgRGV96Q==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.0.0.tgz",
|
||||
"integrity": "sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "5.60.1",
|
||||
"@typescript-eslint/types": "5.60.1",
|
||||
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||
"@typescript-eslint/scope-manager": "6.0.0",
|
||||
"@typescript-eslint/types": "6.0.0",
|
||||
"@typescript-eslint/typescript-estree": "6.0.0",
|
||||
"@typescript-eslint/visitor-keys": "6.0.0",
|
||||
"debug": "^4.3.4"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
@ -287,16 +636,16 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/scope-manager": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.60.1.tgz",
|
||||
"integrity": "sha512-Dn/LnN7fEoRD+KspEOV0xDMynEmR3iSHdgNsarlXNLGGtcUok8L4N71dxUgt3YvlO8si7E+BJ5Fe3wb5yUw7DQ==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.0.0.tgz",
|
||||
"integrity": "sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.60.1",
|
||||
"@typescript-eslint/visitor-keys": "5.60.1"
|
||||
"@typescript-eslint/types": "6.0.0",
|
||||
"@typescript-eslint/visitor-keys": "6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -304,25 +653,25 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/type-utils": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.60.1.tgz",
|
||||
"integrity": "sha512-vN6UztYqIu05nu7JqwQGzQKUJctzs3/Hg7E2Yx8rz9J+4LgtIDFWjjl1gm3pycH0P3mHAcEUBd23LVgfrsTR8A==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.0.0.tgz",
|
||||
"integrity": "sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||
"@typescript-eslint/utils": "5.60.1",
|
||||
"@typescript-eslint/typescript-estree": "6.0.0",
|
||||
"@typescript-eslint/utils": "6.0.0",
|
||||
"debug": "^4.3.4",
|
||||
"tsutils": "^3.21.0"
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "*"
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"typescript": {
|
||||
|
@ -331,12 +680,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/types": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.60.1.tgz",
|
||||
"integrity": "sha512-zDcDx5fccU8BA0IDZc71bAtYIcG9PowaOwaD8rjYbqwK7dpe/UMQl3inJ4UtUK42nOCT41jTSCwg76E62JpMcg==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.0.0.tgz",
|
||||
"integrity": "sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -344,21 +693,21 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/typescript-estree": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.60.1.tgz",
|
||||
"integrity": "sha512-hkX70J9+2M2ZT6fhti5Q2FoU9zb+GeZK2SLP1WZlvUDqdMbEKhexZODD1WodNRyO8eS+4nScvT0dts8IdaBzfw==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.0.0.tgz",
|
||||
"integrity": "sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.60.1",
|
||||
"@typescript-eslint/visitor-keys": "5.60.1",
|
||||
"@typescript-eslint/types": "6.0.0",
|
||||
"@typescript-eslint/visitor-keys": "6.0.0",
|
||||
"debug": "^4.3.4",
|
||||
"globby": "^11.1.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"semver": "^7.3.7",
|
||||
"tsutils": "^3.21.0"
|
||||
"semver": "^7.5.0",
|
||||
"ts-api-utils": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -371,42 +720,42 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/utils": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.60.1.tgz",
|
||||
"integrity": "sha512-tiJ7FFdFQOWssFa3gqb94Ilexyw0JVxj6vBzaSpfN/8IhoKkDuSAenUKvsSHw2A/TMpJb26izIszTXaqygkvpQ==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.0.0.tgz",
|
||||
"integrity": "sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@types/json-schema": "^7.0.9",
|
||||
"@eslint-community/eslint-utils": "^4.3.0",
|
||||
"@types/json-schema": "^7.0.11",
|
||||
"@types/semver": "^7.3.12",
|
||||
"@typescript-eslint/scope-manager": "5.60.1",
|
||||
"@typescript-eslint/types": "5.60.1",
|
||||
"@typescript-eslint/typescript-estree": "5.60.1",
|
||||
"@typescript-eslint/scope-manager": "6.0.0",
|
||||
"@typescript-eslint/types": "6.0.0",
|
||||
"@typescript-eslint/typescript-estree": "6.0.0",
|
||||
"eslint-scope": "^5.1.1",
|
||||
"semver": "^7.3.7"
|
||||
"semver": "^7.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/typescript-eslint"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
|
||||
"eslint": "^7.0.0 || ^8.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@typescript-eslint/visitor-keys": {
|
||||
"version": "5.60.1",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.60.1.tgz",
|
||||
"integrity": "sha512-xEYIxKcultP6E/RMKqube11pGjXH1DCo60mQoWhVYyKfLkwbIVVjYxmOenNMxILx0TjCujPTjjnTIVzm09TXIw==",
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.0.0.tgz",
|
||||
"integrity": "sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/types": "5.60.1",
|
||||
"eslint-visitor-keys": "^3.3.0"
|
||||
"@typescript-eslint/types": "6.0.0",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
"node": "^16.0.0 || >=18.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
|
@ -568,9 +917,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.9.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.9.0.tgz",
|
||||
"integrity": "sha512-jaVNAFBHNLXspO543WnNNPZFRtavh3skAkITqD0/2aeMkKZTN+254PyhwxFYrk3vQ1xfY+2wbesJMs/JC8/PwQ==",
|
||||
"version": "8.10.0",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz",
|
||||
"integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
|
@ -1556,9 +1905,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/esbuild": {
|
||||
"version": "0.18.10",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.10.tgz",
|
||||
"integrity": "sha512-33WKo67auOXzZHBY/9DTJRo7kIvfU12S+D4sp2wIz39N88MDIaCGyCwbW01RR70pK6Iya0I74lHEpyLfFqOHPA==",
|
||||
"version": "0.18.12",
|
||||
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.12.tgz",
|
||||
"integrity": "sha512-XuOVLDdtsDslXStStduT41op21Ytmf4/BDS46aa3xPJ7X5h2eMWBF1oAe3QjUH3bDksocNXgzGUZ7XHIBya6Tg==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
|
@ -1568,28 +1917,28 @@
|
|||
"node": ">=12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@esbuild/android-arm": "0.18.10",
|
||||
"@esbuild/android-arm64": "0.18.10",
|
||||
"@esbuild/android-x64": "0.18.10",
|
||||
"@esbuild/darwin-arm64": "0.18.10",
|
||||
"@esbuild/darwin-x64": "0.18.10",
|
||||
"@esbuild/freebsd-arm64": "0.18.10",
|
||||
"@esbuild/freebsd-x64": "0.18.10",
|
||||
"@esbuild/linux-arm": "0.18.10",
|
||||
"@esbuild/linux-arm64": "0.18.10",
|
||||
"@esbuild/linux-ia32": "0.18.10",
|
||||
"@esbuild/linux-loong64": "0.18.10",
|
||||
"@esbuild/linux-mips64el": "0.18.10",
|
||||
"@esbuild/linux-ppc64": "0.18.10",
|
||||
"@esbuild/linux-riscv64": "0.18.10",
|
||||
"@esbuild/linux-s390x": "0.18.10",
|
||||
"@esbuild/linux-x64": "0.18.10",
|
||||
"@esbuild/netbsd-x64": "0.18.10",
|
||||
"@esbuild/openbsd-x64": "0.18.10",
|
||||
"@esbuild/sunos-x64": "0.18.10",
|
||||
"@esbuild/win32-arm64": "0.18.10",
|
||||
"@esbuild/win32-ia32": "0.18.10",
|
||||
"@esbuild/win32-x64": "0.18.10"
|
||||
"@esbuild/android-arm": "0.18.12",
|
||||
"@esbuild/android-arm64": "0.18.12",
|
||||
"@esbuild/android-x64": "0.18.12",
|
||||
"@esbuild/darwin-arm64": "0.18.12",
|
||||
"@esbuild/darwin-x64": "0.18.12",
|
||||
"@esbuild/freebsd-arm64": "0.18.12",
|
||||
"@esbuild/freebsd-x64": "0.18.12",
|
||||
"@esbuild/linux-arm": "0.18.12",
|
||||
"@esbuild/linux-arm64": "0.18.12",
|
||||
"@esbuild/linux-ia32": "0.18.12",
|
||||
"@esbuild/linux-loong64": "0.18.12",
|
||||
"@esbuild/linux-mips64el": "0.18.12",
|
||||
"@esbuild/linux-ppc64": "0.18.12",
|
||||
"@esbuild/linux-riscv64": "0.18.12",
|
||||
"@esbuild/linux-s390x": "0.18.12",
|
||||
"@esbuild/linux-x64": "0.18.12",
|
||||
"@esbuild/netbsd-x64": "0.18.12",
|
||||
"@esbuild/openbsd-x64": "0.18.12",
|
||||
"@esbuild/sunos-x64": "0.18.12",
|
||||
"@esbuild/win32-arm64": "0.18.12",
|
||||
"@esbuild/win32-ia32": "0.18.12",
|
||||
"@esbuild/win32-x64": "0.18.12"
|
||||
}
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
|
@ -1613,15 +1962,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/eslint": {
|
||||
"version": "8.43.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.43.0.tgz",
|
||||
"integrity": "sha512-aaCpf2JqqKesMFGgmRPessmVKjcGXqdlAYLLC3THM8t5nBRZRQ+st5WM/hoJXkdioEXLLbXgclUpM0TXo5HX5Q==",
|
||||
"version": "8.44.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz",
|
||||
"integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@eslint-community/regexpp": "^4.4.0",
|
||||
"@eslint/eslintrc": "^2.0.3",
|
||||
"@eslint/js": "8.43.0",
|
||||
"@eslint/eslintrc": "^2.1.0",
|
||||
"@eslint/js": "8.44.0",
|
||||
"@humanwhocodes/config-array": "^0.11.10",
|
||||
"@humanwhocodes/module-importer": "^1.0.1",
|
||||
"@nodelib/fs.walk": "^1.2.8",
|
||||
|
@ -1633,7 +1982,7 @@
|
|||
"escape-string-regexp": "^4.0.0",
|
||||
"eslint-scope": "^7.2.0",
|
||||
"eslint-visitor-keys": "^3.4.1",
|
||||
"espree": "^9.5.2",
|
||||
"espree": "^9.6.0",
|
||||
"esquery": "^1.4.2",
|
||||
"esutils": "^2.0.2",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
|
@ -1653,7 +2002,7 @@
|
|||
"lodash.merge": "^4.6.2",
|
||||
"minimatch": "^3.1.2",
|
||||
"natural-compare": "^1.4.0",
|
||||
"optionator": "^0.9.1",
|
||||
"optionator": "^0.9.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"strip-json-comments": "^3.1.0",
|
||||
"text-table": "^0.2.0"
|
||||
|
@ -1731,12 +2080,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/espree": {
|
||||
"version": "9.5.2",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz",
|
||||
"integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==",
|
||||
"version": "9.6.0",
|
||||
"resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz",
|
||||
"integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"acorn": "^8.8.0",
|
||||
"acorn": "^8.9.0",
|
||||
"acorn-jsx": "^5.3.2",
|
||||
"eslint-visitor-keys": "^3.4.1"
|
||||
},
|
||||
|
@ -1824,9 +2173,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/fast-glob": {
|
||||
"version": "3.2.12",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
|
||||
"integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==",
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz",
|
||||
"integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@nodelib/fs.stat": "^2.0.2",
|
||||
|
@ -2667,34 +3016,34 @@
|
|||
}
|
||||
},
|
||||
"node_modules/optionator": {
|
||||
"version": "0.9.1",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
|
||||
"integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
|
||||
"version": "0.9.3",
|
||||
"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
|
||||
"integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@aashutoshrathi/word-wrap": "^1.2.3",
|
||||
"deep-is": "^0.1.3",
|
||||
"fast-levenshtein": "^2.0.6",
|
||||
"levn": "^0.4.1",
|
||||
"prelude-ls": "^1.2.1",
|
||||
"type-check": "^0.4.0",
|
||||
"word-wrap": "^1.2.3"
|
||||
"type-check": "^0.4.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ovsx": {
|
||||
"version": "0.8.1",
|
||||
"resolved": "https://registry.npmjs.org/ovsx/-/ovsx-0.8.1.tgz",
|
||||
"integrity": "sha512-smfdxuSScUwzEsNgxdEWTmWVYaRmb2Xa1qF/LadMtowq/gg01+zNxDGUAlqALin82RBj++IF0O+qrzrC10O7ww==",
|
||||
"version": "0.8.2",
|
||||
"resolved": "https://registry.npmjs.org/ovsx/-/ovsx-0.8.2.tgz",
|
||||
"integrity": "sha512-btDXZorXlmwN9+9Un3khrVygCXmhwbrtg8gifNXw92rZPXcRBAiLG/L09Kb6srhGEratsFt42AktfD8t9XhzoA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@vscode/vsce": "^2.15.0",
|
||||
"@vscode/vsce": "^2.19.0",
|
||||
"commander": "^6.1.0",
|
||||
"follow-redirects": "^1.14.6",
|
||||
"is-ci": "^2.0.0",
|
||||
"leven": "^3.1.0",
|
||||
"semver": "^5.1.0",
|
||||
"semver": "^7.5.2",
|
||||
"tmp": "^0.2.1"
|
||||
},
|
||||
"bin": {
|
||||
|
@ -2713,15 +3062,6 @@
|
|||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/ovsx/node_modules/semver": {
|
||||
"version": "5.7.2",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
|
||||
"integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver"
|
||||
}
|
||||
},
|
||||
"node_modules/p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
|
@ -2904,15 +3244,15 @@
|
|||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz",
|
||||
"integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
"node": ">=14"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
|
@ -3367,33 +3707,24 @@
|
|||
"node": ">=8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ts-api-utils": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz",
|
||||
"integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=16.13.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/tslib": {
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz",
|
||||
"integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tsutils": {
|
||||
"version": "3.21.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
|
||||
"integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"tslib": "^1.8.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
|
||||
}
|
||||
},
|
||||
"node_modules/tsutils/node_modules/tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/tunnel": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
|
||||
|
@ -3452,9 +3783,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "5.1.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz",
|
||||
"integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==",
|
||||
"version": "5.1.6",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz",
|
||||
"integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
|
@ -3566,15 +3897,6 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/word-wrap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
|
||||
"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/wrap-ansi": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
|
||||
|
|
|
@ -51,17 +51,17 @@
|
|||
"@tsconfig/strictest": "^2.0.1",
|
||||
"@types/node": "~16.11.7",
|
||||
"@types/vscode": "~1.78.1",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.1",
|
||||
"@typescript-eslint/parser": "^5.60.1",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"@vscode/test-electron": "^2.3.3",
|
||||
"@vscode/vsce": "^2.19.0",
|
||||
"esbuild": "^0.18.10",
|
||||
"eslint": "^8.43.0",
|
||||
"esbuild": "^0.18.12",
|
||||
"eslint": "^8.44.0",
|
||||
"eslint-config-prettier": "^8.8.0",
|
||||
"ovsx": "^0.8.1",
|
||||
"prettier": "^2.8.8",
|
||||
"ovsx": "^0.8.2",
|
||||
"prettier": "^3.0.0",
|
||||
"tslib": "^2.6.0",
|
||||
"typescript": "^5.1.3"
|
||||
"typescript": "^5.1.6"
|
||||
},
|
||||
"activationEvents": [
|
||||
"workspaceContains:*/Cargo.toml",
|
||||
|
|
|
@ -37,23 +37,23 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
|
||||
constructor(ctx: Ctx) {
|
||||
ctx.pushExtCleanup(
|
||||
vscode.languages.registerHoverProvider({ scheme: "rust-analyzer" }, this)
|
||||
vscode.languages.registerHoverProvider({ scheme: "rust-analyzer" }, this),
|
||||
);
|
||||
ctx.pushExtCleanup(vscode.languages.registerDefinitionProvider({ language: "rust" }, this));
|
||||
vscode.workspace.onDidCloseTextDocument(
|
||||
this.onDidCloseTextDocument,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.workspace.onDidChangeTextDocument(
|
||||
this.onDidChangeTextDocument,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.window.onDidChangeVisibleTextEditors(
|
||||
this.onDidChangeVisibleTextEditors,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
}
|
||||
dispose() {
|
||||
|
@ -85,7 +85,7 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
|
||||
private findAstTextEditor(): undefined | vscode.TextEditor {
|
||||
return vscode.window.visibleTextEditors.find(
|
||||
(it) => it.document.uri.scheme === "rust-analyzer"
|
||||
(it) => it.document.uri.scheme === "rust-analyzer",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -100,7 +100,7 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
// additional positional params are omitted
|
||||
provideDefinition(
|
||||
doc: vscode.TextDocument,
|
||||
pos: vscode.Position
|
||||
pos: vscode.Position,
|
||||
): vscode.ProviderResult<vscode.DefinitionLink[]> {
|
||||
if (!this.rustEditor || doc.uri.toString() !== this.rustEditor.document.uri.toString()) {
|
||||
return;
|
||||
|
@ -132,7 +132,7 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
// additional positional params are omitted
|
||||
provideHover(
|
||||
doc: vscode.TextDocument,
|
||||
hoverPosition: vscode.Position
|
||||
hoverPosition: vscode.Position,
|
||||
): vscode.ProviderResult<vscode.Hover> {
|
||||
if (!this.rustEditor) return;
|
||||
|
||||
|
@ -159,7 +159,7 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
|
||||
private parseRustTextRange(
|
||||
doc: vscode.TextDocument,
|
||||
astLine: string
|
||||
astLine: string,
|
||||
): undefined | vscode.Range {
|
||||
const parsedRange = /(\d+)\.\.(\d+)/.exec(astLine);
|
||||
if (!parsedRange) return;
|
||||
|
|
|
@ -8,13 +8,13 @@ import { exec } from "child_process";
|
|||
export async function bootstrap(
|
||||
context: vscode.ExtensionContext,
|
||||
config: Config,
|
||||
state: PersistentState
|
||||
state: PersistentState,
|
||||
): Promise<string> {
|
||||
const path = await getServer(context, config, state);
|
||||
if (!path) {
|
||||
throw new Error(
|
||||
"Rust Analyzer Language Server is not available. " +
|
||||
"Please, ensure its [proper installation](https://rust-analyzer.github.io/manual.html#installation)."
|
||||
"Please, ensure its [proper installation](https://rust-analyzer.github.io/manual.html#installation).",
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -34,7 +34,7 @@ export async function bootstrap(
|
|||
async function getServer(
|
||||
context: vscode.ExtensionContext,
|
||||
config: Config,
|
||||
state: PersistentState
|
||||
state: PersistentState,
|
||||
): Promise<string | undefined> {
|
||||
const explicitPath = process.env["__RA_LSP_SERVER_DEBUG"] ?? config.serverPath;
|
||||
if (explicitPath) {
|
||||
|
@ -49,7 +49,7 @@ async function getServer(
|
|||
const bundled = vscode.Uri.joinPath(context.extensionUri, "server", `rust-analyzer${ext}`);
|
||||
const bundledExists = await vscode.workspace.fs.stat(bundled).then(
|
||||
() => true,
|
||||
() => false
|
||||
() => false,
|
||||
);
|
||||
if (bundledExists) {
|
||||
let server = bundled;
|
||||
|
@ -58,7 +58,7 @@ async function getServer(
|
|||
const dest = vscode.Uri.joinPath(config.globalStorageUri, `rust-analyzer${ext}`);
|
||||
let exists = await vscode.workspace.fs.stat(dest).then(
|
||||
() => true,
|
||||
() => false
|
||||
() => false,
|
||||
);
|
||||
if (exists && config.package.version !== state.serverVersion) {
|
||||
await vscode.workspace.fs.delete(dest);
|
||||
|
@ -81,7 +81,7 @@ async function getServer(
|
|||
"run `cargo xtask install --server` to build the language server from sources. " +
|
||||
"If you feel that your platform should be supported, please create an issue " +
|
||||
"about that [here](https://github.com/rust-lang/rust-analyzer/issues) and we " +
|
||||
"will consider it."
|
||||
"will consider it.",
|
||||
);
|
||||
return undefined;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ async function patchelf(dest: vscode.Uri): Promise<void> {
|
|||
} else {
|
||||
resolve(stdout);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
handle.stdin?.write(expression);
|
||||
handle.stdin?.end();
|
||||
|
@ -139,6 +139,6 @@ async function patchelf(dest: vscode.Uri): Promise<void> {
|
|||
} finally {
|
||||
await vscode.workspace.fs.delete(origFile);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
@ -34,21 +34,24 @@ export const LINKED_COMMANDS = new Map<string, ra.CommandLink>();
|
|||
// add code to remove a target command from the map after the link is
|
||||
// clicked, but assuming most links in hover sheets won't be clicked anyway
|
||||
// this code won't change the overall memory use much.
|
||||
setInterval(function cleanupOlderCommandLinks() {
|
||||
// keys are returned in insertion order, we'll keep a few
|
||||
// of recent keys available, and clean the rest
|
||||
const keys = [...LINKED_COMMANDS.keys()];
|
||||
const keysToRemove = keys.slice(0, keys.length - 10);
|
||||
for (const key of keysToRemove) {
|
||||
LINKED_COMMANDS.delete(key);
|
||||
}
|
||||
}, 10 * 60 * 1000);
|
||||
setInterval(
|
||||
function cleanupOlderCommandLinks() {
|
||||
// keys are returned in insertion order, we'll keep a few
|
||||
// of recent keys available, and clean the rest
|
||||
const keys = [...LINKED_COMMANDS.keys()];
|
||||
const keysToRemove = keys.slice(0, keys.length - 10);
|
||||
for (const key of keysToRemove) {
|
||||
LINKED_COMMANDS.delete(key);
|
||||
}
|
||||
},
|
||||
10 * 60 * 1000,
|
||||
);
|
||||
|
||||
function renderCommand(cmd: ra.CommandLink): string {
|
||||
const commandId = randomUUID();
|
||||
LINKED_COMMANDS.set(commandId, cmd);
|
||||
return `[${cmd.title}](command:rust-analyzer.linkToCommand?${encodeURIComponent(
|
||||
JSON.stringify([commandId])
|
||||
JSON.stringify([commandId]),
|
||||
)} '${cmd.tooltip}')`;
|
||||
}
|
||||
|
||||
|
@ -57,7 +60,7 @@ function renderHoverActions(actions: ra.CommandLinkGroup[]): vscode.MarkdownStri
|
|||
.map(
|
||||
(group) =>
|
||||
(group.title ? group.title + " " : "") +
|
||||
group.commands.map(renderCommand).join(" | ")
|
||||
group.commands.map(renderCommand).join(" | "),
|
||||
)
|
||||
.join("___");
|
||||
|
||||
|
@ -72,7 +75,7 @@ export async function createClient(
|
|||
initializationOptions: vscode.WorkspaceConfiguration,
|
||||
serverOptions: lc.ServerOptions,
|
||||
config: Config,
|
||||
unlinkedFiles: vscode.Uri[]
|
||||
unlinkedFiles: vscode.Uri[],
|
||||
): Promise<lc.LanguageClient> {
|
||||
const clientOptions: lc.LanguageClientOptions = {
|
||||
documentSelector: [{ scheme: "file", language: "rust" }],
|
||||
|
@ -93,7 +96,7 @@ export async function createClient(
|
|||
async configuration(
|
||||
params: lc.ConfigurationParams,
|
||||
token: vscode.CancellationToken,
|
||||
next: lc.ConfigurationRequest.HandlerSignature
|
||||
next: lc.ConfigurationRequest.HandlerSignature,
|
||||
) {
|
||||
const resp = await next(params, token);
|
||||
if (resp && Array.isArray(resp)) {
|
||||
|
@ -117,7 +120,7 @@ export async function createClient(
|
|||
async handleDiagnostics(
|
||||
uri: vscode.Uri,
|
||||
diagnosticList: vscode.Diagnostic[],
|
||||
next: lc.HandleDiagnosticsSignature
|
||||
next: lc.HandleDiagnosticsSignature,
|
||||
) {
|
||||
const preview = config.previewRustcOutput;
|
||||
const errorCode = config.useRustcErrorCode;
|
||||
|
@ -137,20 +140,20 @@ export async function createClient(
|
|||
const folder = vscode.workspace.getWorkspaceFolder(uri)?.uri.fsPath;
|
||||
if (folder) {
|
||||
const parentBackslash = uri.fsPath.lastIndexOf(
|
||||
pathSeparator + "src"
|
||||
pathSeparator + "src",
|
||||
);
|
||||
const parent = uri.fsPath.substring(0, parentBackslash);
|
||||
|
||||
if (parent.startsWith(folder)) {
|
||||
const path = vscode.Uri.file(
|
||||
parent + pathSeparator + "Cargo.toml"
|
||||
parent + pathSeparator + "Cargo.toml",
|
||||
);
|
||||
void vscode.workspace.fs.stat(path).then(async () => {
|
||||
const choice = await vscode.window.showInformationMessage(
|
||||
`This rust file does not belong to a loaded cargo project. It looks like it might belong to the workspace at ${path.path}, do you want to add it to the linked Projects?`,
|
||||
"Yes",
|
||||
"No",
|
||||
"Don't show this again"
|
||||
"Don't show this again",
|
||||
);
|
||||
switch (choice) {
|
||||
case undefined:
|
||||
|
@ -168,14 +171,14 @@ export async function createClient(
|
|||
config
|
||||
.get<any[]>("linkedProjects")
|
||||
?.concat(pathToInsert),
|
||||
false
|
||||
false,
|
||||
);
|
||||
break;
|
||||
case "Don't show this again":
|
||||
await config.update(
|
||||
"showUnlinkedFileNotification",
|
||||
false,
|
||||
false
|
||||
false,
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
@ -222,7 +225,7 @@ export async function createClient(
|
|||
document: vscode.TextDocument,
|
||||
position: vscode.Position,
|
||||
token: vscode.CancellationToken,
|
||||
_next: lc.ProvideHoverSignature
|
||||
_next: lc.ProvideHoverSignature,
|
||||
) {
|
||||
const editor = vscode.window.activeTextEditor;
|
||||
const positionOrRange = editor?.selection?.contains(position)
|
||||
|
@ -236,7 +239,7 @@ export async function createClient(
|
|||
client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
||||
position: positionOrRange,
|
||||
},
|
||||
token
|
||||
token,
|
||||
)
|
||||
.then(
|
||||
(result) => {
|
||||
|
@ -250,7 +253,7 @@ export async function createClient(
|
|||
(error) => {
|
||||
client.handleFailedRequest(lc.HoverRequest.type, token, error, null);
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
// Using custom handling of CodeActions to support action groups and snippet edits.
|
||||
|
@ -260,14 +263,14 @@ export async function createClient(
|
|||
range: vscode.Range,
|
||||
context: vscode.CodeActionContext,
|
||||
token: vscode.CancellationToken,
|
||||
_next: lc.ProvideCodeActionsSignature
|
||||
_next: lc.ProvideCodeActionsSignature,
|
||||
) {
|
||||
const params: lc.CodeActionParams = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(document),
|
||||
range: client.code2ProtocolConverter.asRange(range),
|
||||
context: await client.code2ProtocolConverter.asCodeActionContext(
|
||||
context,
|
||||
token
|
||||
token,
|
||||
),
|
||||
};
|
||||
return client.sendRequest(lc.CodeActionRequest.type, params, token).then(
|
||||
|
@ -283,21 +286,21 @@ export async function createClient(
|
|||
if (lc.CodeAction.is(item)) {
|
||||
assert(
|
||||
!item.command,
|
||||
"We don't expect to receive commands in CodeActions"
|
||||
"We don't expect to receive commands in CodeActions",
|
||||
);
|
||||
const action = await client.protocol2CodeConverter.asCodeAction(
|
||||
item,
|
||||
token
|
||||
token,
|
||||
);
|
||||
result.push(action);
|
||||
continue;
|
||||
}
|
||||
assert(
|
||||
isCodeActionWithoutEditsAndCommands(item),
|
||||
"We don't expect edits or commands here"
|
||||
"We don't expect edits or commands here",
|
||||
);
|
||||
const kind = client.protocol2CodeConverter.asCodeActionKind(
|
||||
(item as any).kind
|
||||
(item as any).kind,
|
||||
);
|
||||
const action = new vscode.CodeAction(item.title, kind);
|
||||
const group = (item as any).group;
|
||||
|
@ -351,7 +354,7 @@ export async function createClient(
|
|||
}
|
||||
return result;
|
||||
},
|
||||
(_error) => undefined
|
||||
(_error) => undefined,
|
||||
);
|
||||
},
|
||||
},
|
||||
|
@ -364,7 +367,7 @@ export async function createClient(
|
|||
"rust-analyzer",
|
||||
"Rust Analyzer Language Server",
|
||||
serverOptions,
|
||||
clientOptions
|
||||
clientOptions,
|
||||
);
|
||||
|
||||
// To turn on all proposed features use: client.registerProposedFeatures();
|
||||
|
@ -400,7 +403,7 @@ class ExperimentalFeatures implements lc.StaticFeature {
|
|||
}
|
||||
initialize(
|
||||
_capabilities: lc.ServerCapabilities,
|
||||
_documentSelector: lc.DocumentSelector | undefined
|
||||
_documentSelector: lc.DocumentSelector | undefined,
|
||||
): void {}
|
||||
dispose(): void {}
|
||||
}
|
||||
|
@ -419,7 +422,7 @@ class OverrideFeatures implements lc.StaticFeature {
|
|||
}
|
||||
initialize(
|
||||
_capabilities: lc.ServerCapabilities,
|
||||
_documentSelector: lc.DocumentSelector | undefined
|
||||
_documentSelector: lc.DocumentSelector | undefined,
|
||||
): void {}
|
||||
dispose(): void {}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export function analyzerStatus(ctx: CtxInit): Cmd {
|
|||
})();
|
||||
|
||||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-status", tdcp)
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-status", tdcp),
|
||||
);
|
||||
|
||||
return async () => {
|
||||
|
@ -80,7 +80,7 @@ export function memoryUsage(ctx: CtxInit): Cmd {
|
|||
})();
|
||||
|
||||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-memory", tdcp)
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-memory", tdcp),
|
||||
);
|
||||
|
||||
return async () => {
|
||||
|
@ -126,7 +126,7 @@ export function matchingBrace(ctx: CtxInit): Cmd {
|
|||
const response = await client.sendRequest(ra.matchingBrace, {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(editor.document),
|
||||
positions: editor.selections.map((s) =>
|
||||
client.code2ProtocolConverter.asPosition(s.active)
|
||||
client.code2ProtocolConverter.asPosition(s.active),
|
||||
),
|
||||
});
|
||||
editor.selections = editor.selections.map((sel, idx) => {
|
||||
|
@ -196,7 +196,7 @@ export function onEnter(ctx: CtxInit): Cmd {
|
|||
const lcEdits = await client
|
||||
.sendRequest(ra.onEnter, {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
editor.document
|
||||
editor.document,
|
||||
),
|
||||
position: client.code2ProtocolConverter.asPosition(editor.selection.active),
|
||||
})
|
||||
|
@ -249,7 +249,7 @@ export function parentModule(ctx: CtxInit): Cmd {
|
|||
client,
|
||||
uri,
|
||||
position,
|
||||
locations.map((loc) => lc.Location.create(loc.targetUri, loc.targetRange))
|
||||
locations.map((loc) => lc.Location.create(loc.targetUri, loc.targetRange)),
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -357,7 +357,7 @@ export function ssr(ctx: CtxInit): Cmd {
|
|||
const position = editor.selection.active;
|
||||
const selections = editor.selections;
|
||||
const textDocument = client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
editor.document
|
||||
editor.document,
|
||||
);
|
||||
|
||||
const options: vscode.InputBoxOptions = {
|
||||
|
@ -397,9 +397,9 @@ export function ssr(ctx: CtxInit): Cmd {
|
|||
});
|
||||
|
||||
await vscode.workspace.applyEdit(
|
||||
await client.protocol2CodeConverter.asWorkspaceEdit(edit, token)
|
||||
await client.protocol2CodeConverter.asWorkspaceEdit(edit, token),
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@ -428,12 +428,12 @@ export function syntaxTree(ctx: CtxInit): Cmd {
|
|||
vscode.workspace.onDidChangeTextDocument(
|
||||
this.onDidChangeTextDocument,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.window.onDidChangeActiveTextEditor(
|
||||
this.onDidChangeActiveTextEditor,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -452,7 +452,7 @@ export function syntaxTree(ctx: CtxInit): Cmd {
|
|||
|
||||
async provideTextDocumentContent(
|
||||
uri: vscode.Uri,
|
||||
ct: vscode.CancellationToken
|
||||
ct: vscode.CancellationToken,
|
||||
): Promise<string> {
|
||||
const rustEditor = ctx.activeRustEditor;
|
||||
if (!rustEditor) return "";
|
||||
|
@ -475,12 +475,12 @@ export function syntaxTree(ctx: CtxInit): Cmd {
|
|||
|
||||
ctx.pushExtCleanup(new AstInspector(ctx));
|
||||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-syntax-tree", tdcp)
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-syntax-tree", tdcp),
|
||||
);
|
||||
ctx.pushExtCleanup(
|
||||
vscode.languages.setLanguageConfiguration("ra_syntax_tree", {
|
||||
brackets: [["[", ")"]],
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
return async () => {
|
||||
|
@ -513,7 +513,7 @@ function viewFileUsingTextDocumentContentProvider(
|
|||
requestType: lc.RequestType<lc.TextDocumentPositionParams, string, void>,
|
||||
uri: string,
|
||||
scheme: string,
|
||||
shouldUpdate: boolean
|
||||
shouldUpdate: boolean,
|
||||
): Cmd {
|
||||
const tdcp = new (class implements vscode.TextDocumentContentProvider {
|
||||
readonly uri = vscode.Uri.parse(uri);
|
||||
|
@ -522,12 +522,12 @@ function viewFileUsingTextDocumentContentProvider(
|
|||
vscode.workspace.onDidChangeTextDocument(
|
||||
this.onDidChangeTextDocument,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.window.onDidChangeActiveTextEditor(
|
||||
this.onDidChangeActiveTextEditor,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -546,7 +546,7 @@ function viewFileUsingTextDocumentContentProvider(
|
|||
|
||||
async provideTextDocumentContent(
|
||||
_uri: vscode.Uri,
|
||||
ct: vscode.CancellationToken
|
||||
ct: vscode.CancellationToken,
|
||||
): Promise<string> {
|
||||
const rustEditor = ctx.activeRustEditor;
|
||||
if (!rustEditor) return "";
|
||||
|
@ -554,7 +554,7 @@ function viewFileUsingTextDocumentContentProvider(
|
|||
const client = ctx.client;
|
||||
const params = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
rustEditor.document
|
||||
rustEditor.document,
|
||||
),
|
||||
position: client.code2ProtocolConverter.asPosition(rustEditor.selection.active),
|
||||
};
|
||||
|
@ -602,7 +602,7 @@ export function interpretFunction(ctx: CtxInit): Cmd {
|
|||
ra.interpretFunction,
|
||||
uri,
|
||||
`rust-analyzer-interpret-function`,
|
||||
false
|
||||
false,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -614,12 +614,12 @@ export function viewFileText(ctx: CtxInit): Cmd {
|
|||
vscode.workspace.onDidChangeTextDocument(
|
||||
this.onDidChangeTextDocument,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.window.onDidChangeActiveTextEditor(
|
||||
this.onDidChangeActiveTextEditor,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -638,14 +638,14 @@ export function viewFileText(ctx: CtxInit): Cmd {
|
|||
|
||||
async provideTextDocumentContent(
|
||||
_uri: vscode.Uri,
|
||||
ct: vscode.CancellationToken
|
||||
ct: vscode.CancellationToken,
|
||||
): Promise<string> {
|
||||
const rustEditor = ctx.activeRustEditor;
|
||||
if (!rustEditor) return "";
|
||||
const client = ctx.client;
|
||||
|
||||
const params = client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
rustEditor.document
|
||||
rustEditor.document,
|
||||
);
|
||||
return client.sendRequest(ra.viewFileText, params, ct);
|
||||
}
|
||||
|
@ -656,7 +656,7 @@ export function viewFileText(ctx: CtxInit): Cmd {
|
|||
})();
|
||||
|
||||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-file-text", tdcp)
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-file-text", tdcp),
|
||||
);
|
||||
|
||||
return async () => {
|
||||
|
@ -677,12 +677,12 @@ export function viewItemTree(ctx: CtxInit): Cmd {
|
|||
vscode.workspace.onDidChangeTextDocument(
|
||||
this.onDidChangeTextDocument,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.window.onDidChangeActiveTextEditor(
|
||||
this.onDidChangeActiveTextEditor,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -701,7 +701,7 @@ export function viewItemTree(ctx: CtxInit): Cmd {
|
|||
|
||||
async provideTextDocumentContent(
|
||||
_uri: vscode.Uri,
|
||||
ct: vscode.CancellationToken
|
||||
ct: vscode.CancellationToken,
|
||||
): Promise<string> {
|
||||
const rustEditor = ctx.activeRustEditor;
|
||||
if (!rustEditor) return "";
|
||||
|
@ -709,7 +709,7 @@ export function viewItemTree(ctx: CtxInit): Cmd {
|
|||
|
||||
const params = {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
rustEditor.document
|
||||
rustEditor.document,
|
||||
),
|
||||
};
|
||||
return client.sendRequest(ra.viewItemTree, params, ct);
|
||||
|
@ -721,7 +721,7 @@ export function viewItemTree(ctx: CtxInit): Cmd {
|
|||
})();
|
||||
|
||||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-item-tree", tdcp)
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-item-tree", tdcp),
|
||||
);
|
||||
|
||||
return async () => {
|
||||
|
@ -746,7 +746,7 @@ function crateGraph(ctx: CtxInit, full: boolean): Cmd {
|
|||
enableScripts: true,
|
||||
retainContextWhenHidden: true,
|
||||
localResourceRoots: [nodeModulesPath],
|
||||
}
|
||||
},
|
||||
);
|
||||
const params = {
|
||||
full: full,
|
||||
|
@ -835,7 +835,7 @@ export function expandMacro(ctx: CtxInit): Cmd {
|
|||
|
||||
const expanded = await client.sendRequest(ra.expandMacro, {
|
||||
textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
|
||||
editor.document
|
||||
editor.document,
|
||||
),
|
||||
position,
|
||||
});
|
||||
|
@ -851,7 +851,7 @@ export function expandMacro(ctx: CtxInit): Cmd {
|
|||
})();
|
||||
|
||||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-expand-macro", tdcp)
|
||||
vscode.workspace.registerTextDocumentContentProvider("rust-analyzer-expand-macro", tdcp),
|
||||
);
|
||||
|
||||
return async () => {
|
||||
|
@ -883,7 +883,7 @@ export function addProject(ctx: CtxInit): Cmd {
|
|||
return discoverWorkspace([file], discoverProjectCommand, {
|
||||
cwd: path.dirname(file.uri.fsPath),
|
||||
});
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
ctx.addToDiscoveredWorkspaces(workspaces);
|
||||
|
@ -901,14 +901,14 @@ async function showReferencesImpl(
|
|||
client: LanguageClient | undefined,
|
||||
uri: string,
|
||||
position: lc.Position,
|
||||
locations: lc.Location[]
|
||||
locations: lc.Location[],
|
||||
) {
|
||||
if (client) {
|
||||
await vscode.commands.executeCommand(
|
||||
"editor.action.showReferences",
|
||||
vscode.Uri.parse(uri),
|
||||
client.protocol2CodeConverter.asPosition(position),
|
||||
locations.map(client.protocol2CodeConverter.asLocation)
|
||||
locations.map(client.protocol2CodeConverter.asLocation),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -925,7 +925,7 @@ export function applyActionGroup(_ctx: CtxInit): Cmd {
|
|||
if (!selectedAction) return;
|
||||
await vscode.commands.executeCommand(
|
||||
"rust-analyzer.resolveCodeAction",
|
||||
selectedAction.arguments
|
||||
selectedAction.arguments,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@ -1000,7 +1000,7 @@ export function resolveCodeAction(ctx: CtxInit): Cmd {
|
|||
documentChanges: itemEdit.documentChanges?.filter((change) => "kind" in change),
|
||||
};
|
||||
const fileSystemEdit = await client.protocol2CodeConverter.asWorkspaceEdit(
|
||||
lcFileSystemEdit
|
||||
lcFileSystemEdit,
|
||||
);
|
||||
await vscode.workspace.applyEdit(fileSystemEdit);
|
||||
await applySnippetWorkspaceEdit(edit);
|
||||
|
@ -1053,12 +1053,12 @@ export function peekTests(ctx: CtxInit): Cmd {
|
|||
const locations: lc.Location[] = tests.map((it) =>
|
||||
lc.Location.create(
|
||||
it.runnable.location!.targetUri,
|
||||
it.runnable.location!.targetSelectionRange
|
||||
)
|
||||
it.runnable.location!.targetSelectionRange,
|
||||
),
|
||||
);
|
||||
|
||||
await showReferencesImpl(client, uri, position, locations);
|
||||
}
|
||||
},
|
||||
);
|
||||
};
|
||||
}
|
||||
|
@ -1146,7 +1146,7 @@ export function viewMemoryLayout(ctx: CtxInit): Cmd {
|
|||
"memory_layout",
|
||||
"[Memory Layout]",
|
||||
vscode.ViewColumn.Two,
|
||||
{ enableScripts: true }
|
||||
{ enableScripts: true },
|
||||
);
|
||||
|
||||
document.webview.html = `<!DOCTYPE html>
|
||||
|
|
|
@ -38,7 +38,7 @@ export class Config {
|
|||
vscode.workspace.onDidChangeConfiguration(
|
||||
this.onDidChangeConfiguration,
|
||||
this,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
this.refreshLogging();
|
||||
this.configureLanguage();
|
||||
|
@ -64,7 +64,7 @@ export class Config {
|
|||
this.configureLanguage();
|
||||
|
||||
const requiresReloadOpt = this.requiresReloadOpts.find((opt) =>
|
||||
event.affectsConfiguration(opt)
|
||||
event.affectsConfiguration(opt),
|
||||
);
|
||||
|
||||
if (!requiresReloadOpt) return;
|
||||
|
@ -210,8 +210,8 @@ export class Config {
|
|||
Object.entries(extraEnv).map(([k, v]) => [
|
||||
k,
|
||||
typeof v !== "string" ? v.toString() : v,
|
||||
])
|
||||
)
|
||||
]),
|
||||
),
|
||||
);
|
||||
}
|
||||
get traceExtension() {
|
||||
|
@ -306,7 +306,7 @@ export class Config {
|
|||
// to interact with.
|
||||
export function prepareVSCodeConfig<T>(
|
||||
resp: T,
|
||||
cb?: (key: Extract<keyof T, string>, res: { [key: string]: any }) => void
|
||||
cb?: (key: Extract<keyof T, string>, res: { [key: string]: any }) => void,
|
||||
): T {
|
||||
if (Is.string(resp)) {
|
||||
return substituteVSCodeVariableInString(resp) as T;
|
||||
|
@ -349,7 +349,7 @@ export function substituteVariablesInEnv(env: Env): Env {
|
|||
}
|
||||
}
|
||||
return [`env:${key}`, { deps: [...deps], value }];
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
const resolved = new Set<string>();
|
||||
|
@ -457,7 +457,7 @@ function computeVscodeVar(varName: string): string | null {
|
|||
if (varName in supportedVariables) {
|
||||
const fn = expectNotUndefined(
|
||||
supportedVariables[varName],
|
||||
`${varName} should not be undefined here`
|
||||
`${varName} should not be undefined here`,
|
||||
);
|
||||
return fn();
|
||||
} else {
|
||||
|
|
|
@ -42,10 +42,10 @@ export type Workspace =
|
|||
|
||||
export function fetchWorkspace(): Workspace {
|
||||
const folders = (vscode.workspace.workspaceFolders || []).filter(
|
||||
(folder) => folder.uri.scheme === "file"
|
||||
(folder) => folder.uri.scheme === "file",
|
||||
);
|
||||
const rustDocuments = vscode.workspace.textDocuments.filter((document) =>
|
||||
isRustDocument(document)
|
||||
isRustDocument(document),
|
||||
);
|
||||
|
||||
return folders.length === 0
|
||||
|
@ -61,7 +61,7 @@ export function fetchWorkspace(): Workspace {
|
|||
export async function discoverWorkspace(
|
||||
files: readonly vscode.TextDocument[],
|
||||
command: string[],
|
||||
options: ExecOptions
|
||||
options: ExecOptions,
|
||||
): Promise<JsonProject> {
|
||||
const paths = files.map((f) => `"${f.uri.fsPath}"`).join(" ");
|
||||
const joinedCommand = command.join(" ");
|
||||
|
@ -110,7 +110,7 @@ export class Ctx {
|
|||
constructor(
|
||||
readonly extCtx: vscode.ExtensionContext,
|
||||
commandFactories: Record<string, CommandFactory>,
|
||||
workspace: Workspace
|
||||
workspace: Workspace,
|
||||
) {
|
||||
extCtx.subscriptions.push(this);
|
||||
this.statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
|
||||
|
@ -186,7 +186,7 @@ export class Ctx {
|
|||
|
||||
log.error("Bootstrap error", err);
|
||||
throw new Error(message);
|
||||
}
|
||||
},
|
||||
);
|
||||
const newEnv = Object.assign({}, process.env, this.config.serverExtraEnv);
|
||||
const run: lc.Executable = {
|
||||
|
@ -216,7 +216,7 @@ export class Ctx {
|
|||
return discoverWorkspace([file], discoverProjectCommand, {
|
||||
cwd: path.dirname(file.uri.fsPath),
|
||||
});
|
||||
})
|
||||
}),
|
||||
);
|
||||
|
||||
this.addToDiscoveredWorkspaces(workspaces);
|
||||
|
@ -230,7 +230,7 @@ export class Ctx {
|
|||
if (key === "linkedProjects" && this.config.discoveredWorkspaces.length > 0) {
|
||||
obj["linkedProjects"] = this.config.discoveredWorkspaces;
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
this._client = await createClient(
|
||||
|
@ -239,17 +239,17 @@ export class Ctx {
|
|||
initializationOptions,
|
||||
serverOptions,
|
||||
this.config,
|
||||
this.unlinkedFiles
|
||||
this.unlinkedFiles,
|
||||
);
|
||||
this.pushClientCleanup(
|
||||
this._client.onNotification(ra.serverStatus, (params) =>
|
||||
this.setServerStatus(params)
|
||||
)
|
||||
this.setServerStatus(params),
|
||||
),
|
||||
);
|
||||
this.pushClientCleanup(
|
||||
this._client.onNotification(ra.openServerLogs, () => {
|
||||
this.outputChannel!.show();
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
return this._client;
|
||||
|
@ -395,7 +395,7 @@ export class Ctx {
|
|||
} else {
|
||||
callback = () =>
|
||||
vscode.window.showErrorMessage(
|
||||
`command ${fullName} failed: rust-analyzer server is not running`
|
||||
`command ${fullName} failed: rust-analyzer server is not running`,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,7 @@ export class Ctx {
|
|||
}
|
||||
statusBar.color = new vscode.ThemeColor("statusBarItem.warningForeground");
|
||||
statusBar.backgroundColor = new vscode.ThemeColor(
|
||||
"statusBarItem.warningBackground"
|
||||
"statusBarItem.warningBackground",
|
||||
);
|
||||
statusBar.command = "rust-analyzer.openLogs";
|
||||
icon = "$(warning) ";
|
||||
|
@ -440,7 +440,7 @@ export class Ctx {
|
|||
case "stopped":
|
||||
statusBar.tooltip.appendText("Server is stopped");
|
||||
statusBar.tooltip.appendMarkdown(
|
||||
"\n\n[Start server](command:rust-analyzer.startServer)"
|
||||
"\n\n[Start server](command:rust-analyzer.startServer)",
|
||||
);
|
||||
statusBar.color = undefined;
|
||||
statusBar.backgroundColor = undefined;
|
||||
|
@ -453,13 +453,13 @@ export class Ctx {
|
|||
}
|
||||
statusBar.tooltip.appendMarkdown("\n\n[Open logs](command:rust-analyzer.openLogs)");
|
||||
statusBar.tooltip.appendMarkdown(
|
||||
"\n\n[Reload Workspace](command:rust-analyzer.reloadWorkspace)"
|
||||
"\n\n[Reload Workspace](command:rust-analyzer.reloadWorkspace)",
|
||||
);
|
||||
statusBar.tooltip.appendMarkdown(
|
||||
"\n\n[Rebuild Proc Macros](command:rust-analyzer.rebuildProcMacros)"
|
||||
"\n\n[Rebuild Proc Macros](command:rust-analyzer.rebuildProcMacros)",
|
||||
);
|
||||
statusBar.tooltip.appendMarkdown(
|
||||
"\n\n[Restart server](command:rust-analyzer.restartServer)"
|
||||
"\n\n[Restart server](command:rust-analyzer.restartServer)",
|
||||
);
|
||||
statusBar.tooltip.appendMarkdown("\n\n[Stop server](command:rust-analyzer.stopServer)");
|
||||
if (!status.quiescent) icon = "$(sync~spin) ";
|
||||
|
|
|
@ -13,7 +13,7 @@ type DebugConfigProvider = (
|
|||
config: ra.Runnable,
|
||||
executable: string,
|
||||
env: Record<string, string>,
|
||||
sourceFileMap?: Record<string, string>
|
||||
sourceFileMap?: Record<string, string>,
|
||||
) => vscode.DebugConfiguration;
|
||||
|
||||
export async function makeDebugConfig(ctx: Ctx, runnable: ra.Runnable): Promise<void> {
|
||||
|
@ -31,7 +31,7 @@ export async function makeDebugConfig(ctx: Ctx, runnable: ra.Runnable): Promise<
|
|||
const answer = await vscode.window.showErrorMessage(
|
||||
`Launch configuration '${debugConfig.name}' already exists!`,
|
||||
"Cancel",
|
||||
"Update"
|
||||
"Update",
|
||||
);
|
||||
if (answer === "Cancel") return;
|
||||
|
||||
|
@ -68,7 +68,7 @@ export async function startDebugSession(ctx: Ctx, runnable: ra.Runnable): Promis
|
|||
|
||||
async function getDebugConfiguration(
|
||||
ctx: Ctx,
|
||||
runnable: ra.Runnable
|
||||
runnable: ra.Runnable,
|
||||
): Promise<vscode.DebugConfiguration | undefined> {
|
||||
const editor = ctx.activeRustEditor;
|
||||
if (!editor) return;
|
||||
|
@ -92,7 +92,7 @@ async function getDebugConfiguration(
|
|||
if (!debugEngine) {
|
||||
await vscode.window.showErrorMessage(
|
||||
`Install [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb)` +
|
||||
` or [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension for debugging.`
|
||||
` or [MS C++ tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools) extension for debugging.`,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ async function getDebugConfiguration(
|
|||
|
||||
async function getDebugExecutable(
|
||||
runnable: ra.Runnable,
|
||||
env: Record<string, string>
|
||||
env: Record<string, string>,
|
||||
): Promise<string> {
|
||||
const cargo = new Cargo(runnable.args.workspaceRoot || ".", debugOutput, env);
|
||||
const executable = await cargo.executableFromArgs(runnable.args.cargoArgs);
|
||||
|
@ -170,7 +170,7 @@ function getLldbDebugConfig(
|
|||
runnable: ra.Runnable,
|
||||
executable: string,
|
||||
env: Record<string, string>,
|
||||
sourceFileMap?: Record<string, string>
|
||||
sourceFileMap?: Record<string, string>,
|
||||
): vscode.DebugConfiguration {
|
||||
return {
|
||||
type: "lldb",
|
||||
|
@ -189,7 +189,7 @@ function getCppvsDebugConfig(
|
|||
runnable: ra.Runnable,
|
||||
executable: string,
|
||||
env: Record<string, string>,
|
||||
sourceFileMap?: Record<string, string>
|
||||
sourceFileMap?: Record<string, string>,
|
||||
): vscode.DebugConfiguration {
|
||||
return {
|
||||
type: os.platform() === "win32" ? "cppvsdbg" : "cppdbg",
|
||||
|
|
|
@ -43,7 +43,7 @@ export class RustDependenciesProvider
|
|||
}
|
||||
|
||||
getParent?(
|
||||
element: Dependency | DependencyFile
|
||||
element: Dependency | DependencyFile,
|
||||
): vscode.ProviderResult<Dependency | DependencyFile> {
|
||||
if (element instanceof Dependency) return undefined;
|
||||
return element.parent;
|
||||
|
@ -60,7 +60,7 @@ export class RustDependenciesProvider
|
|||
}
|
||||
|
||||
getChildren(
|
||||
element?: Dependency | DependencyFile
|
||||
element?: Dependency | DependencyFile,
|
||||
): vscode.ProviderResult<Dependency[] | DependencyFile[]> {
|
||||
return new Promise((resolve, _reject) => {
|
||||
if (!vscode.workspace.workspaceFolders) {
|
||||
|
@ -87,7 +87,7 @@ export class RustDependenciesProvider
|
|||
private async getRootDependencies(): Promise<Dependency[]> {
|
||||
const dependenciesResult: FetchDependencyListResult = await this.ctx.client.sendRequest(
|
||||
ra.fetchDependencyList,
|
||||
{}
|
||||
{},
|
||||
);
|
||||
const crates = dependenciesResult.crates;
|
||||
|
||||
|
@ -107,7 +107,7 @@ export class RustDependenciesProvider
|
|||
moduleName,
|
||||
version,
|
||||
vscode.Uri.parse(path).fsPath,
|
||||
vscode.TreeItemCollapsibleState.Collapsed
|
||||
vscode.TreeItemCollapsibleState.Collapsed,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ export class Dependency extends vscode.TreeItem {
|
|||
public override readonly label: string,
|
||||
private version: string,
|
||||
readonly dependencyPath: string,
|
||||
public override readonly collapsibleState: vscode.TreeItemCollapsibleState
|
||||
public override readonly collapsibleState: vscode.TreeItemCollapsibleState,
|
||||
) {
|
||||
super(label, collapsibleState);
|
||||
this.resourceUri = vscode.Uri.file(dependencyPath);
|
||||
|
@ -136,7 +136,7 @@ export class DependencyFile extends vscode.TreeItem {
|
|||
override readonly label: string,
|
||||
readonly dependencyPath: string,
|
||||
readonly parent: Dependency | DependencyFile,
|
||||
public override readonly collapsibleState: vscode.TreeItemCollapsibleState
|
||||
public override readonly collapsibleState: vscode.TreeItemCollapsibleState,
|
||||
) {
|
||||
super(vscode.Uri.file(dependencyPath), collapsibleState);
|
||||
this.id = this.resourceUri!.fsPath.toLowerCase();
|
||||
|
|
|
@ -89,7 +89,7 @@ export class AnsiDecorationProvider implements vscode.Disposable {
|
|||
}
|
||||
|
||||
private _getDecorations(
|
||||
uri: vscode.Uri
|
||||
uri: vscode.Uri,
|
||||
): ProviderResult<[TextEditorDecorationType, Range[]][]> {
|
||||
const stringContents = getRenderedDiagnostic(this.ctx, uri);
|
||||
const lines = stringContents.split("\n");
|
||||
|
@ -117,7 +117,7 @@ export class AnsiDecorationProvider implements vscode.Disposable {
|
|||
lineNumber,
|
||||
offset - totalEscapeLength,
|
||||
lineNumber,
|
||||
offset + content.length - totalEscapeLength
|
||||
offset + content.length - totalEscapeLength,
|
||||
);
|
||||
|
||||
offset += content.length;
|
||||
|
@ -183,7 +183,7 @@ export class AnsiDecorationProvider implements vscode.Disposable {
|
|||
|
||||
private static _convertColor(
|
||||
color?: string,
|
||||
truecolor?: string
|
||||
truecolor?: string,
|
||||
): ThemeColor | string | undefined {
|
||||
if (!color) {
|
||||
return undefined;
|
||||
|
|
|
@ -27,17 +27,17 @@ export type CommandLinkGroup = {
|
|||
// rust-analyzer extensions
|
||||
|
||||
export const analyzerStatus = new lc.RequestType<AnalyzerStatusParams, string, void>(
|
||||
"rust-analyzer/analyzerStatus"
|
||||
"rust-analyzer/analyzerStatus",
|
||||
);
|
||||
export const cancelFlycheck = new lc.NotificationType0("rust-analyzer/cancelFlycheck");
|
||||
export const clearFlycheck = new lc.NotificationType0("rust-analyzer/clearFlycheck");
|
||||
export const expandMacro = new lc.RequestType<ExpandMacroParams, ExpandedMacro | null, void>(
|
||||
"rust-analyzer/expandMacro"
|
||||
"rust-analyzer/expandMacro",
|
||||
);
|
||||
export const memoryUsage = new lc.RequestType0<string, void>("rust-analyzer/memoryUsage");
|
||||
export const openServerLogs = new lc.NotificationType0("rust-analyzer/openServerLogs");
|
||||
export const relatedTests = new lc.RequestType<lc.TextDocumentPositionParams, TestInfo[], void>(
|
||||
"rust-analyzer/relatedTests"
|
||||
"rust-analyzer/relatedTests",
|
||||
);
|
||||
export const reloadWorkspace = new lc.RequestType0<null, void>("rust-analyzer/reloadWorkspace");
|
||||
export const rebuildProcMacros = new lc.RequestType0<null, void>("rust-analyzer/rebuildProcMacros");
|
||||
|
@ -47,25 +47,25 @@ export const runFlycheck = new lc.NotificationType<{
|
|||
}>("rust-analyzer/runFlycheck");
|
||||
export const shuffleCrateGraph = new lc.RequestType0<null, void>("rust-analyzer/shuffleCrateGraph");
|
||||
export const syntaxTree = new lc.RequestType<SyntaxTreeParams, string, void>(
|
||||
"rust-analyzer/syntaxTree"
|
||||
"rust-analyzer/syntaxTree",
|
||||
);
|
||||
export const viewCrateGraph = new lc.RequestType<ViewCrateGraphParams, string, void>(
|
||||
"rust-analyzer/viewCrateGraph"
|
||||
"rust-analyzer/viewCrateGraph",
|
||||
);
|
||||
export const viewFileText = new lc.RequestType<lc.TextDocumentIdentifier, string, void>(
|
||||
"rust-analyzer/viewFileText"
|
||||
"rust-analyzer/viewFileText",
|
||||
);
|
||||
export const viewHir = new lc.RequestType<lc.TextDocumentPositionParams, string, void>(
|
||||
"rust-analyzer/viewHir"
|
||||
"rust-analyzer/viewHir",
|
||||
);
|
||||
export const viewMir = new lc.RequestType<lc.TextDocumentPositionParams, string, void>(
|
||||
"rust-analyzer/viewMir"
|
||||
"rust-analyzer/viewMir",
|
||||
);
|
||||
export const interpretFunction = new lc.RequestType<lc.TextDocumentPositionParams, string, void>(
|
||||
"rust-analyzer/interpretFunction"
|
||||
"rust-analyzer/interpretFunction",
|
||||
);
|
||||
export const viewItemTree = new lc.RequestType<ViewItemTreeParams, string, void>(
|
||||
"rust-analyzer/viewItemTree"
|
||||
"rust-analyzer/viewItemTree",
|
||||
);
|
||||
|
||||
export type AnalyzerStatusParams = { textDocument?: lc.TextDocumentIdentifier };
|
||||
|
@ -121,22 +121,22 @@ export type ViewItemTreeParams = { textDocument: lc.TextDocumentIdentifier };
|
|||
// experimental extensions
|
||||
|
||||
export const joinLines = new lc.RequestType<JoinLinesParams, lc.TextEdit[], void>(
|
||||
"experimental/joinLines"
|
||||
"experimental/joinLines",
|
||||
);
|
||||
export const matchingBrace = new lc.RequestType<MatchingBraceParams, lc.Position[], void>(
|
||||
"experimental/matchingBrace"
|
||||
"experimental/matchingBrace",
|
||||
);
|
||||
export const moveItem = new lc.RequestType<MoveItemParams, lc.TextEdit[], void>(
|
||||
"experimental/moveItem"
|
||||
"experimental/moveItem",
|
||||
);
|
||||
export const onEnter = new lc.RequestType<lc.TextDocumentPositionParams, lc.TextEdit[], void>(
|
||||
"experimental/onEnter"
|
||||
"experimental/onEnter",
|
||||
);
|
||||
export const openCargoToml = new lc.RequestType<OpenCargoTomlParams, lc.Location, void>(
|
||||
"experimental/openCargoToml"
|
||||
"experimental/openCargoToml",
|
||||
);
|
||||
export const openDocs = new lc.RequestType<lc.TextDocumentPositionParams, string | void, void>(
|
||||
"experimental/externalDocs"
|
||||
"experimental/externalDocs",
|
||||
);
|
||||
export const parentModule = new lc.RequestType<
|
||||
lc.TextDocumentPositionParams,
|
||||
|
@ -144,10 +144,10 @@ export const parentModule = new lc.RequestType<
|
|||
void
|
||||
>("experimental/parentModule");
|
||||
export const runnables = new lc.RequestType<RunnablesParams, Runnable[], void>(
|
||||
"experimental/runnables"
|
||||
"experimental/runnables",
|
||||
);
|
||||
export const serverStatus = new lc.NotificationType<ServerStatusParams>(
|
||||
"experimental/serverStatus"
|
||||
"experimental/serverStatus",
|
||||
);
|
||||
export const ssr = new lc.RequestType<SsrParams, lc.WorkspaceEdit, void>("experimental/ssr");
|
||||
export const viewRecursiveMemoryLayout = new lc.RequestType<
|
||||
|
|
|
@ -18,7 +18,7 @@ export async function deactivate() {
|
|||
}
|
||||
|
||||
export async function activate(
|
||||
context: vscode.ExtensionContext
|
||||
context: vscode.ExtensionContext,
|
||||
): Promise<RustAnalyzerExtensionApi> {
|
||||
if (vscode.extensions.getExtension("rust-lang.rust")) {
|
||||
vscode.window
|
||||
|
@ -26,7 +26,7 @@ export async function activate(
|
|||
`You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` +
|
||||
"plugins enabled. These are known to conflict and cause various functions of " +
|
||||
"both plugins to not work correctly. You should disable one of them.",
|
||||
"Got it"
|
||||
"Got it",
|
||||
)
|
||||
.then(() => {}, console.error);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ export async function activate(
|
|||
// so we do it ourselves.
|
||||
const api = await activateServer(ctx).catch((err) => {
|
||||
void vscode.window.showErrorMessage(
|
||||
`Cannot activate rust-analyzer extension: ${err.message}`
|
||||
`Cannot activate rust-analyzer extension: ${err.message}`,
|
||||
);
|
||||
throw err;
|
||||
});
|
||||
|
@ -53,8 +53,8 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
|
|||
ctx.pushExtCleanup(
|
||||
vscode.workspace.registerTextDocumentContentProvider(
|
||||
diagnostics.URI_SCHEME,
|
||||
diagnosticProvider
|
||||
)
|
||||
diagnosticProvider,
|
||||
),
|
||||
);
|
||||
|
||||
const decorationProvider = new diagnostics.AnsiDecorationProvider(ctx);
|
||||
|
@ -71,7 +71,7 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
|
|||
vscode.workspace.onDidChangeTextDocument(
|
||||
async (event) => await decorateVisibleEditors(event.document),
|
||||
null,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.workspace.onDidOpenTextDocument(decorateVisibleEditors, null, ctx.subscriptions);
|
||||
vscode.window.onDidChangeActiveTextEditor(
|
||||
|
@ -82,7 +82,7 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
|
|||
}
|
||||
},
|
||||
null,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.window.onDidChangeVisibleTextEditors(
|
||||
async (visibleEditors) => {
|
||||
|
@ -92,13 +92,13 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
|
|||
}
|
||||
},
|
||||
null,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
|
||||
vscode.workspace.onDidChangeWorkspaceFolders(
|
||||
async (_) => ctx.onWorkspaceFolderChanges(),
|
||||
null,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
vscode.workspace.onDidChangeConfiguration(
|
||||
async (_) => {
|
||||
|
@ -107,7 +107,7 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
|
|||
});
|
||||
},
|
||||
null,
|
||||
ctx.subscriptions
|
||||
ctx.subscriptions,
|
||||
);
|
||||
|
||||
await ctx.start();
|
||||
|
|
|
@ -16,7 +16,7 @@ export async function selectRunnable(
|
|||
ctx: CtxInit,
|
||||
prevRunnable?: RunnableQuickPick,
|
||||
debuggeeOnly = false,
|
||||
showButtons: boolean = true
|
||||
showButtons: boolean = true,
|
||||
): Promise<RunnableQuickPick | undefined> {
|
||||
const editor = ctx.activeRustEditor;
|
||||
if (!editor) return;
|
||||
|
@ -84,7 +84,7 @@ export async function selectRunnable(
|
|||
}
|
||||
}
|
||||
}),
|
||||
quickPick
|
||||
quickPick,
|
||||
);
|
||||
quickPick.show();
|
||||
});
|
||||
|
@ -103,7 +103,7 @@ export class RunnableQuickPick implements vscode.QuickPickItem {
|
|||
|
||||
export function prepareEnv(
|
||||
runnable: ra.Runnable,
|
||||
runnableEnvCfg: RunnableEnvCfg
|
||||
runnableEnvCfg: RunnableEnvCfg,
|
||||
): Record<string, string> {
|
||||
const env: Record<string, string> = { RUST_BACKTRACE: "short" };
|
||||
|
||||
|
@ -156,7 +156,7 @@ export async function createTask(runnable: ra.Runnable, config: Config): Promise
|
|||
args,
|
||||
config.problemMatcher,
|
||||
config.cargoRunner,
|
||||
true
|
||||
true,
|
||||
);
|
||||
|
||||
cargoTask.presentationOptions.clear = true;
|
||||
|
|
|
@ -17,7 +17,9 @@ export async function applySnippetWorkspaceEdit(edit: vscode.WorkspaceEdit) {
|
|||
for (const indel of edits) {
|
||||
assert(
|
||||
!parseSnippet(indel.newText),
|
||||
`bad ws edit: snippet received with multiple edits: ${JSON.stringify(edit)}`
|
||||
`bad ws edit: snippet received with multiple edits: ${JSON.stringify(
|
||||
edit,
|
||||
)}`,
|
||||
);
|
||||
builder.replace(indel.range, indel.newText);
|
||||
}
|
||||
|
@ -32,7 +34,7 @@ async function editorFromUri(uri: vscode.Uri): Promise<vscode.TextEditor | undef
|
|||
await vscode.window.showTextDocument(uri, {});
|
||||
}
|
||||
return vscode.window.visibleTextEditors.find(
|
||||
(it) => it.document.uri.toString() === uri.toString()
|
||||
(it) => it.document.uri.toString() === uri.toString(),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -56,8 +58,8 @@ export async function applySnippetTextEdits(editor: vscode.TextEditor, edits: vs
|
|||
selections.push(
|
||||
new vscode.Selection(
|
||||
new vscode.Position(startLine, startColumn),
|
||||
new vscode.Position(startLine, endColumn)
|
||||
)
|
||||
new vscode.Position(startLine, endColumn),
|
||||
),
|
||||
);
|
||||
builder.replace(indel.range, newText);
|
||||
} else {
|
||||
|
|
|
@ -48,7 +48,7 @@ class CargoTaskProvider implements vscode.TaskProvider {
|
|||
`cargo ${def.command}`,
|
||||
[def.command],
|
||||
this.config.problemMatcher,
|
||||
this.config.cargoRunner
|
||||
this.config.cargoRunner,
|
||||
);
|
||||
vscodeTask.group = def.group;
|
||||
tasks.push(vscodeTask);
|
||||
|
@ -73,7 +73,7 @@ class CargoTaskProvider implements vscode.TaskProvider {
|
|||
task.name,
|
||||
args,
|
||||
this.config.problemMatcher,
|
||||
this.config.cargoRunner
|
||||
this.config.cargoRunner,
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,7 @@ export async function buildCargoTask(
|
|||
args: string[],
|
||||
problemMatcher: string[],
|
||||
customRunner?: string,
|
||||
throwOnError: boolean = false
|
||||
throwOnError: boolean = false,
|
||||
): Promise<vscode.Task> {
|
||||
let exec: vscode.ProcessExecution | vscode.ShellExecution | undefined = undefined;
|
||||
|
||||
|
@ -133,7 +133,7 @@ export async function buildCargoTask(
|
|||
name,
|
||||
TASK_SOURCE,
|
||||
exec,
|
||||
problemMatcher
|
||||
problemMatcher,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ export class Cargo {
|
|||
constructor(
|
||||
readonly rootFolder: string,
|
||||
readonly output: vscode.OutputChannel,
|
||||
readonly env: Record<string, string>
|
||||
readonly env: Record<string, string>,
|
||||
) {}
|
||||
|
||||
// Made public for testing purposes
|
||||
|
@ -76,7 +76,7 @@ export class Cargo {
|
|||
this.output.append(message.message.rendered);
|
||||
}
|
||||
},
|
||||
(stderr) => this.output.append(stderr)
|
||||
(stderr) => this.output.append(stderr),
|
||||
);
|
||||
} catch (err) {
|
||||
this.output.show(true);
|
||||
|
@ -102,7 +102,7 @@ export class Cargo {
|
|||
private async runCargo(
|
||||
cargoArgs: string[],
|
||||
onStdoutJson: (obj: any) => void,
|
||||
onStderrString: (data: string) => void
|
||||
onStderrString: (data: string) => void,
|
||||
): Promise<number> {
|
||||
const path = await cargoPath();
|
||||
return await new Promise((resolve, reject) => {
|
||||
|
@ -172,7 +172,7 @@ export const getPathForExecutable = memoizeAsync(
|
|||
if (await isFileAtUri(standardPath)) return standardPath.fsPath;
|
||||
}
|
||||
return executableName;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
async function lookupInPath(exec: string): Promise<boolean> {
|
||||
|
|
|
@ -114,7 +114,7 @@ export function setContextValue(key: string, value: any): Thenable<void> {
|
|||
* underlying async function.
|
||||
*/
|
||||
export function memoizeAsync<Ret, TThis, Param extends string>(
|
||||
func: (this: TThis, arg: Param) => Promise<Ret>
|
||||
func: (this: TThis, arg: Param) => Promise<Ret>,
|
||||
) {
|
||||
const cache = new Map<string, Ret>();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ export async function run(): Promise<void> {
|
|||
const context = new Context();
|
||||
|
||||
const testFiles = (await readdir(path.resolve(__dirname))).filter((name) =>
|
||||
name.endsWith(".test.js")
|
||||
name.endsWith(".test.js"),
|
||||
);
|
||||
for (const testFile of testFiles) {
|
||||
try {
|
||||
|
|
Loading…
Add table
Reference in a new issue