diff --git a/configs/eslint-config-compass/package.json b/configs/eslint-config-compass/package.json index 3addfa01eaf..447405ea610 100644 --- a/configs/eslint-config-compass/package.json +++ b/configs/eslint-config-compass/package.json @@ -16,10 +16,11 @@ "dependencies": { "@babel/core": "^7.24.3", "@babel/eslint-parser": "^7.14.3", - "@mongodb-js/eslint-config-devtools": "^0.9.9", + "@mongodb-js/eslint-config-devtools": "^0.11.2", "@mongodb-js/eslint-plugin-compass": "^1.2.18", - "@typescript-eslint/eslint-plugin": "^8.49.0", - "@typescript-eslint/parser": "^8.49.0", + "@mongodb-js/eslint-plugin-devtools": "^0.3.2", + "@typescript-eslint/eslint-plugin": "^8.50.0", + "@typescript-eslint/parser": "^8.50.0", "eslint": "^8.57.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-chai-friendly": "^1.1.0", diff --git a/package-lock.json b/package-lock.json index c3f19efc556..99d5d334192 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,10 +39,11 @@ "dependencies": { "@babel/core": "^7.24.3", "@babel/eslint-parser": "^7.14.3", - "@mongodb-js/eslint-config-devtools": "^0.9.9", + "@mongodb-js/eslint-config-devtools": "^0.11.2", "@mongodb-js/eslint-plugin-compass": "^1.2.18", - "@typescript-eslint/eslint-plugin": "^8.49.0", - "@typescript-eslint/parser": "^8.49.0", + "@mongodb-js/eslint-plugin-devtools": "^0.3.2", + "@typescript-eslint/eslint-plugin": "^8.50.0", + "@typescript-eslint/parser": "^8.50.0", "eslint": "^8.57.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-chai-friendly": "^1.1.0", @@ -56,6 +57,251 @@ "eslint-compass": "bin/eslint.js" } }, + "configs/eslint-config-compass/node_modules/@mongodb-js/eslint-config-devtools": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@mongodb-js/eslint-config-devtools/-/eslint-config-devtools-0.11.2.tgz", + "integrity": "sha512-RgEavFg9aYhWH5RM0ws0IxURZa3eNLek7n27eLb1A5VBLvc4YFUuNbZ4KIpAhp5yP0IL0GmocnPJXO0FdmBMFQ==", + "license": "SSPL", + "dependencies": { + "@babel/core": "^7.22.8", + "@babel/eslint-parser": "^7.22.7", + "@babel/preset-env": "^7.22.7", + "@babel/preset-react": "^7.22.5", + "@mongodb-js/eslint-plugin-devtools": "^0.3.2", + "@typescript-eslint/eslint-plugin": "^5.59.0", + "@typescript-eslint/parser": "^5.59.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-filename-rules": "^1.2.0", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-react": "^7.24.0", + "eslint-plugin-react-hooks": "^4.2.0" + }, + "peerDependencies": { + "eslint": "^7.25.0 || ^8.0.0" + } + }, + "configs/eslint-config-compass/node_modules/@mongodb-js/eslint-config-devtools/node_modules/@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.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" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "configs/eslint-config-compass/node_modules/@mongodb-js/eslint-config-devtools/node_modules/@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "configs/eslint-config-compass/node_modules/@mongodb-js/eslint-config-devtools/node_modules/eslint-plugin-react-hooks": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "license": "MIT", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" + } + }, + "configs/eslint-config-compass/node_modules/@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "configs/eslint-config-compass/node_modules/@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "configs/eslint-config-compass/node_modules/@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==", + "license": "MIT", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "configs/eslint-config-compass/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "license": "BSD-2-Clause", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "configs/eslint-config-compass/node_modules/@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "configs/eslint-config-compass/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "configs/eslint-config-compass/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "configs/eslint-config-compass/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "configs/eslint-plugin-compass": { "name": "@mongodb-js/eslint-plugin-compass", "version": "1.2.18", @@ -10080,32 +10326,16 @@ "resolved": "configs/eslint-config-compass", "link": true }, - "node_modules/@mongodb-js/eslint-config-devtools": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/@mongodb-js/eslint-config-devtools/-/eslint-config-devtools-0.9.9.tgz", - "integrity": "sha512-TnIAFO/40XsLRYbsWGzADbWXsFalVna///x0xxj622xfp4l4W9wXLeOHRSyCRu2S73qACzCX48MhuctjTS662A==", - "dependencies": { - "@babel/core": "^7.22.8", - "@babel/eslint-parser": "^7.22.7", - "@babel/preset-env": "^7.22.7", - "@babel/preset-react": "^7.22.5", - "@typescript-eslint/eslint-plugin": "^5.59.0", - "@typescript-eslint/parser": "^5.59.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-filename-rules": "^1.2.0", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-mocha": "^8.0.0", - "eslint-plugin-react": "^7.24.0", - "eslint-plugin-react-hooks": "^4.2.0" - }, - "peerDependencies": { - "eslint": "^7.25.0" - } - }, "node_modules/@mongodb-js/eslint-plugin-compass": { "resolved": "configs/eslint-plugin-compass", "link": true }, + "node_modules/@mongodb-js/eslint-plugin-devtools": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@mongodb-js/eslint-plugin-devtools/-/eslint-plugin-devtools-0.3.2.tgz", + "integrity": "sha512-wvRoFR+F/TNCEDnyib0pkssJTuVrES64/7hv76GtPdpG9+guF8lf+H1tcXQQcmIPDvOvL3XZPP3Lwf1gJjIz8A==", + "license": "SSPL" + }, "node_modules/@mongodb-js/explain-plan-helper": { "resolved": "packages/explain-plan-helper", "link": true @@ -11433,7 +11663,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz", "integrity": "sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA==", - "dev": true, "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -16196,8 +16425,7 @@ "node_modules/@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, "node_modules/@types/serve-index": { "version": "1.9.1", @@ -16444,15 +16672,16 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.49.0.tgz", - "integrity": "sha512-JXij0vzIaTtCwu6SxTh8qBc66kmf1xs7pI4UOiMDFVct6q86G0Zs7KRcEoJgY3Cav3x5Tq0MF5jwgpgLqgKG3A==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.50.0.tgz", + "integrity": "sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg==", + "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.49.0", - "@typescript-eslint/type-utils": "8.49.0", - "@typescript-eslint/utils": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0", + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/type-utils": "8.50.0", + "@typescript-eslint/utils": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" @@ -16465,7 +16694,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.49.0", + "@typescript-eslint/parser": "^8.50.0", "eslint": "^8.57.0 || ^9.0.0", "typescript": ">=4.8.4 <6.0.0" } @@ -16480,14 +16709,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.49.0.tgz", - "integrity": "sha512-N9lBGA9o9aqb1hVMc9hzySbhKibHmB+N3IpoShyV6HyQYRGIhlrO5rQgttypi+yEeKsKI4idxC8Jw6gXKD4THA==", - "dependencies": { - "@typescript-eslint/scope-manager": "8.49.0", - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/typescript-estree": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.50.0.tgz", + "integrity": "sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "debug": "^4.3.4" }, "engines": { @@ -16503,12 +16733,13 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.49.0.tgz", - "integrity": "sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.50.0.tgz", + "integrity": "sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ==", + "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.49.0", - "@typescript-eslint/types": "^8.49.0", + "@typescript-eslint/tsconfig-utils": "^8.50.0", + "@typescript-eslint/types": "^8.50.0", "debug": "^4.3.4" }, "engines": { @@ -16523,12 +16754,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.49.0.tgz", - "integrity": "sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.50.0.tgz", + "integrity": "sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A==", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0" + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -16539,9 +16771,10 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.49.0.tgz", - "integrity": "sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.50.0.tgz", + "integrity": "sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w==", + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -16554,13 +16787,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.49.0.tgz", - "integrity": "sha512-KTExJfQ+svY8I10P4HdxKzWsvtVnsuCifU5MvXrRwoP2KOlNZ9ADNEWWsQTJgMxLzS5VLQKDjkCT/YzgsnqmZg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.50.0.tgz", + "integrity": "sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw==", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/typescript-estree": "8.49.0", - "@typescript-eslint/utils": "8.49.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0", + "@typescript-eslint/utils": "8.50.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" }, @@ -16577,9 +16811,10 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.49.0.tgz", - "integrity": "sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.50.0.tgz", + "integrity": "sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==", + "license": "MIT", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -16589,14 +16824,15 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.49.0.tgz", - "integrity": "sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==", - "dependencies": { - "@typescript-eslint/project-service": "8.49.0", - "@typescript-eslint/tsconfig-utils": "8.49.0", - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.50.0.tgz", + "integrity": "sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ==", + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.50.0", + "@typescript-eslint/tsconfig-utils": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "debug": "^4.3.4", "minimatch": "^9.0.4", "semver": "^7.6.0", @@ -16618,6 +16854,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } @@ -16626,6 +16863,7 @@ "version": "9.0.5", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -16637,14 +16875,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.49.0.tgz", - "integrity": "sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.50.0.tgz", + "integrity": "sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg==", + "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.49.0", - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/typescript-estree": "8.49.0" + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -16659,11 +16898,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.49.0.tgz", - "integrity": "sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.50.0.tgz", + "integrity": "sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q==", + "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.49.0", + "@typescript-eslint/types": "8.50.0", "eslint-visitor-keys": "^4.2.1" }, "engines": { @@ -16678,6 +16918,7 @@ "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "license": "Apache-2.0", "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -18497,7 +18738,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, "engines": { "node": ">=8" } @@ -22944,7 +23184,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "dependencies": { "path-type": "^4.0.0" }, @@ -25419,18 +25658,6 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/espree/node_modules/acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==", - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/espree/node_modules/eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -25860,7 +26087,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -27471,7 +27697,6 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -27491,7 +27716,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, "engines": { "node": ">= 4" } @@ -33171,7 +33395,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true, "engines": { "node": ">= 8" } @@ -34995,6 +35218,12 @@ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "license": "MIT" + }, "node_modules/nearley": { "version": "2.20.1", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", @@ -42418,7 +42647,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, "engines": { "node": ">=8" } @@ -44156,6 +44384,21 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "license": "MIT", + "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/tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", @@ -65191,10 +65434,11 @@ "requires": { "@babel/core": "^7.24.3", "@babel/eslint-parser": "^7.14.3", - "@mongodb-js/eslint-config-devtools": "^0.9.9", + "@mongodb-js/eslint-config-devtools": "^0.11.2", "@mongodb-js/eslint-plugin-compass": "^1.2.18", - "@typescript-eslint/eslint-plugin": "^8.49.0", - "@typescript-eslint/parser": "^8.49.0", + "@mongodb-js/eslint-plugin-devtools": "^0.3.2", + "@typescript-eslint/eslint-plugin": "^8.50.0", + "@typescript-eslint/parser": "^8.50.0", "eslint": "^8.57.1", "eslint-config-prettier": "^8.3.0", "eslint-plugin-chai-friendly": "^1.1.0", @@ -65203,25 +65447,137 @@ "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-react": "^7.37.5", "eslint-plugin-react-hooks": "^7.0.1" - } - }, - "@mongodb-js/eslint-config-devtools": { - "version": "0.9.9", - "resolved": "https://registry.npmjs.org/@mongodb-js/eslint-config-devtools/-/eslint-config-devtools-0.9.9.tgz", - "integrity": "sha512-TnIAFO/40XsLRYbsWGzADbWXsFalVna///x0xxj622xfp4l4W9wXLeOHRSyCRu2S73qACzCX48MhuctjTS662A==", - "requires": { - "@babel/core": "^7.22.8", - "@babel/eslint-parser": "^7.22.7", - "@babel/preset-env": "^7.22.7", - "@babel/preset-react": "^7.22.5", - "@typescript-eslint/eslint-plugin": "^8.49.0", - "@typescript-eslint/parser": "^8.49.0", - "eslint-config-prettier": "^8.3.0", - "eslint-plugin-filename-rules": "^1.2.0", - "eslint-plugin-jsx-a11y": "^6.10.2", - "eslint-plugin-mocha": "^8.0.0", - "eslint-plugin-react": "^7.37.5", - "eslint-plugin-react-hooks": "^7.0.1" + }, + "dependencies": { + "@mongodb-js/eslint-config-devtools": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@mongodb-js/eslint-config-devtools/-/eslint-config-devtools-0.11.2.tgz", + "integrity": "sha512-RgEavFg9aYhWH5RM0ws0IxURZa3eNLek7n27eLb1A5VBLvc4YFUuNbZ4KIpAhp5yP0IL0GmocnPJXO0FdmBMFQ==", + "requires": { + "@babel/core": "^7.22.8", + "@babel/eslint-parser": "^7.22.7", + "@babel/preset-env": "^7.22.7", + "@babel/preset-react": "^7.22.5", + "@mongodb-js/eslint-plugin-devtools": "^0.3.2", + "@typescript-eslint/eslint-plugin": "^5.59.0", + "@typescript-eslint/parser": "^5.59.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-filename-rules": "^1.2.0", + "eslint-plugin-jsx-a11y": "^6.4.1", + "eslint-plugin-mocha": "^8.0.0", + "eslint-plugin-react": "^7.24.0", + "eslint-plugin-react-hooks": "^4.2.0" + }, + "dependencies": { + "@typescript-eslint/eslint-plugin": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.62.0.tgz", + "integrity": "sha512-TiZzBSJja/LbhNPvk6yc0JrX9XqhQ0hdh6M2svYfsHGejaKFIAGd9MQ+ERIMzLGlN/kZoYIgdxFV0PuljTKXag==", + "requires": { + "@eslint-community/regexpp": "^4.4.0", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/type-utils": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "natural-compare-lite": "^1.4.0", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/parser": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.62.0.tgz", + "integrity": "sha512-VlJEV0fOQ7BExOsHYAGrgbEiZoi8D+Bl2+f6V2RrXerRSylnp+ZBHmPvaIa8cz0Ajx7WO7Z5RqfgYg7ED1nRhA==", + "requires": { + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "debug": "^4.3.4" + } + }, + "eslint-plugin-react-hooks": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz", + "integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==", + "requires": {} + } + } + }, + "@typescript-eslint/scope-manager": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz", + "integrity": "sha512-VXuvVvZeQCQb5Zgf4HAxc04q5j+WrNAtNh9OwCsCgpKqESMTu3tF/jhZ3xG6T4NZwWl65Bg8KuS2uEvhSfLl0w==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0" + } + }, + "@typescript-eslint/type-utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz", + "integrity": "sha512-xsSQreu+VnfbqQpW5vnCJdq1Z3Q0U31qiWmRhr98ONQmcp/yhiPJFPq8MXiJVLiksmOKSjIldZzkebzHuCGzew==", + "requires": { + "@typescript-eslint/typescript-estree": "5.62.0", + "@typescript-eslint/utils": "5.62.0", + "debug": "^4.3.4", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/types": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.62.0.tgz", + "integrity": "sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==" + }, + "@typescript-eslint/typescript-estree": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz", + "integrity": "sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/visitor-keys": "5.62.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/utils": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.62.0.tgz", + "integrity": "sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==", + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@types/json-schema": "^7.0.9", + "@types/semver": "^7.3.12", + "@typescript-eslint/scope-manager": "5.62.0", + "@typescript-eslint/types": "5.62.0", + "@typescript-eslint/typescript-estree": "5.62.0", + "eslint-scope": "^5.1.1", + "semver": "^7.3.7" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.62.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.62.0.tgz", + "integrity": "sha512-07ny+LHRzQXepkGg6w0mFY41fVUNBrL2Roj/++7V1txKugfjm/Ci/qSND03r2RhlJhJYMcTn9AhhSSqQp0Ysyw==", + "requires": { + "@typescript-eslint/types": "5.62.0", + "eslint-visitor-keys": "^3.3.0" + } + }, + "eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" + }, + "ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==" + } } }, "@mongodb-js/eslint-plugin-compass": { @@ -65235,6 +65591,11 @@ "nyc": "^15.1.0" } }, + "@mongodb-js/eslint-plugin-devtools": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@mongodb-js/eslint-plugin-devtools/-/eslint-plugin-devtools-0.3.2.tgz", + "integrity": "sha512-wvRoFR+F/TNCEDnyib0pkssJTuVrES64/7hv76GtPdpG9+guF8lf+H1tcXQQcmIPDvOvL3XZPP3Lwf1gJjIz8A==" + }, "@mongodb-js/explain-plan-helper": { "version": "file:packages/explain-plan-helper", "requires": { @@ -67169,7 +67530,6 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.7.tgz", "integrity": "sha512-BTIhocbPBSrRmHxOAJFtR18oLhxTtAFDAvL8hY1S3iU8k+E60W/YFs4jrixGzQjMpF4qPXxIQHcjVD9dz1C2QA==", - "dev": true, "requires": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" @@ -70971,8 +71331,7 @@ "@types/semver": { "version": "7.3.13", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz", - "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==", - "dev": true + "integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==" }, "@types/serve-index": { "version": "1.9.1", @@ -71216,15 +71575,15 @@ } }, "@typescript-eslint/eslint-plugin": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.49.0.tgz", - "integrity": "sha512-JXij0vzIaTtCwu6SxTh8qBc66kmf1xs7pI4UOiMDFVct6q86G0Zs7KRcEoJgY3Cav3x5Tq0MF5jwgpgLqgKG3A==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.50.0.tgz", + "integrity": "sha512-O7QnmOXYKVtPrfYzMolrCTfkezCJS9+ljLdKW/+DCvRsc3UAz+sbH6Xcsv7p30+0OwUbeWfUDAQE0vpabZ3QLg==", "requires": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.49.0", - "@typescript-eslint/type-utils": "8.49.0", - "@typescript-eslint/utils": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0", + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/type-utils": "8.50.0", + "@typescript-eslint/utils": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "ignore": "^7.0.0", "natural-compare": "^1.4.0", "ts-api-utils": "^2.1.0" @@ -71238,68 +71597,68 @@ } }, "@typescript-eslint/parser": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.49.0.tgz", - "integrity": "sha512-N9lBGA9o9aqb1hVMc9hzySbhKibHmB+N3IpoShyV6HyQYRGIhlrO5rQgttypi+yEeKsKI4idxC8Jw6gXKD4THA==", - "requires": { - "@typescript-eslint/scope-manager": "8.49.0", - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/typescript-estree": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.50.0.tgz", + "integrity": "sha512-6/cmF2piao+f6wSxUsJLZjck7OQsYyRtcOZS02k7XINSNlz93v6emM8WutDQSXnroG2xwYlEVHJI+cPA7CPM3Q==", + "requires": { + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "debug": "^4.3.4" } }, "@typescript-eslint/project-service": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.49.0.tgz", - "integrity": "sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.50.0.tgz", + "integrity": "sha512-Cg/nQcL1BcoTijEWyx4mkVC56r8dj44bFDvBdygifuS20f3OZCHmFbjF34DPSi07kwlFvqfv/xOLnJ5DquxSGQ==", "requires": { - "@typescript-eslint/tsconfig-utils": "^8.49.0", - "@typescript-eslint/types": "^8.49.0", + "@typescript-eslint/tsconfig-utils": "^8.50.0", + "@typescript-eslint/types": "^8.50.0", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.49.0.tgz", - "integrity": "sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.50.0.tgz", + "integrity": "sha512-xCwfuCZjhIqy7+HKxBLrDVT5q/iq7XBVBXLn57RTIIpelLtEIZHXAF/Upa3+gaCpeV1NNS5Z9A+ID6jn50VD4A==", "requires": { - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0" + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0" } }, "@typescript-eslint/tsconfig-utils": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.49.0.tgz", - "integrity": "sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.50.0.tgz", + "integrity": "sha512-vxd3G/ybKTSlm31MOA96gqvrRGv9RJ7LGtZCn2Vrc5htA0zCDvcMqUkifcjrWNNKXHUU3WCkYOzzVSFBd0wa2w==", "requires": {} }, "@typescript-eslint/type-utils": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.49.0.tgz", - "integrity": "sha512-KTExJfQ+svY8I10P4HdxKzWsvtVnsuCifU5MvXrRwoP2KOlNZ9ADNEWWsQTJgMxLzS5VLQKDjkCT/YzgsnqmZg==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.50.0.tgz", + "integrity": "sha512-7OciHT2lKCewR0mFoBrvZJ4AXTMe/sYOe87289WAViOocEmDjjv8MvIOT2XESuKj9jp8u3SZYUSh89QA4S1kQw==", "requires": { - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/typescript-estree": "8.49.0", - "@typescript-eslint/utils": "8.49.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0", + "@typescript-eslint/utils": "8.50.0", "debug": "^4.3.4", "ts-api-utils": "^2.1.0" } }, "@typescript-eslint/types": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.49.0.tgz", - "integrity": "sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==" + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.50.0.tgz", + "integrity": "sha512-iX1mgmGrXdANhhITbpp2QQM2fGehBse9LbTf0sidWK6yg/NE+uhV5dfU1g6EYPlcReYmkE9QLPq/2irKAmtS9w==" }, "@typescript-eslint/typescript-estree": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.49.0.tgz", - "integrity": "sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==", - "requires": { - "@typescript-eslint/project-service": "8.49.0", - "@typescript-eslint/tsconfig-utils": "8.49.0", - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/visitor-keys": "8.49.0", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.50.0.tgz", + "integrity": "sha512-W7SVAGBR/IX7zm1t70Yujpbk+zdPq/u4soeFSknWFdXIFuWsBGBOUu/Tn/I6KHSKvSh91OiMuaSnYp3mtPt5IQ==", + "requires": { + "@typescript-eslint/project-service": "8.50.0", + "@typescript-eslint/tsconfig-utils": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/visitor-keys": "8.50.0", "debug": "^4.3.4", "minimatch": "^9.0.4", "semver": "^7.6.0", @@ -71326,22 +71685,22 @@ } }, "@typescript-eslint/utils": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.49.0.tgz", - "integrity": "sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.50.0.tgz", + "integrity": "sha512-87KgUXET09CRjGCi2Ejxy3PULXna63/bMYv72tCAlDJC3Yqwln0HiFJ3VJMst2+mEtNtZu5oFvX4qJGjKsnAgg==", "requires": { "@eslint-community/eslint-utils": "^4.7.0", - "@typescript-eslint/scope-manager": "8.49.0", - "@typescript-eslint/types": "8.49.0", - "@typescript-eslint/typescript-estree": "8.49.0" + "@typescript-eslint/scope-manager": "8.50.0", + "@typescript-eslint/types": "8.50.0", + "@typescript-eslint/typescript-estree": "8.50.0" } }, "@typescript-eslint/visitor-keys": { - "version": "8.49.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.49.0.tgz", - "integrity": "sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==", + "version": "8.50.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.50.0.tgz", + "integrity": "sha512-Xzmnb58+Db78gT/CCj/PVCvK+zxbnsw6F+O1oheYszJbBSdEjVhQi3C/Xttzxgi/GLmpvOggRs1RFpiJ8+c34Q==", "requires": { - "@typescript-eslint/types": "8.49.0", + "@typescript-eslint/types": "8.50.0", "eslint-visitor-keys": "^4.2.1" }, "dependencies": { @@ -72733,8 +73092,7 @@ "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" }, "array-uniq": { "version": "1.0.3", @@ -76530,7 +76888,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "requires": { "path-type": "^4.0.0" } @@ -78416,11 +78773,6 @@ "eslint-visitor-keys": "^3.4.1" }, "dependencies": { - "acorn": { - "version": "8.14.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz", - "integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==" - }, "eslint-visitor-keys": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", @@ -78756,7 +79108,6 @@ "version": "3.3.3", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", - "dev": true, "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -79971,7 +80322,6 @@ "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -79984,8 +80334,7 @@ "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" } } }, @@ -85002,8 +85351,7 @@ "merge2": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", - "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", - "dev": true + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "methods": { "version": "1.1.2", @@ -86716,6 +87064,11 @@ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" }, + "natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==" + }, "nearley": { "version": "2.20.1", "resolved": "https://registry.npmjs.org/nearley/-/nearley-2.20.1.tgz", @@ -92270,8 +92623,7 @@ "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, "slugify": { "version": "1.6.6", @@ -93610,6 +93962,14 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "requires": { + "tslib": "^1.8.1" + } + }, "tuf-js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/tuf-js/-/tuf-js-1.1.7.tgz", diff --git a/package.json b/package.json index 339013c50b5..e51126eca02 100644 --- a/package.json +++ b/package.json @@ -104,8 +104,8 @@ "cheerio": "1.0.0-rc.10" }, "@mongodb-js/eslint-config-devtools": { - "@typescript-eslint/eslint-plugin": "^8.49.0", - "@typescript-eslint/parser": "^8.49.0", + "@typescript-eslint/eslint-plugin": "^8.50.0", + "@typescript-eslint/parser": "^8.50.0", "eslint": "^8.57.1", "eslint-plugin-jsx-a11y": "^6.10.2", "eslint-plugin-react": "^7.37.5", diff --git a/packages/compass-aggregations/src/modules/side-panel.spec.ts b/packages/compass-aggregations/src/modules/side-panel.spec.ts index f149587e215..487b55a8f9c 100644 --- a/packages/compass-aggregations/src/modules/side-panel.spec.ts +++ b/packages/compass-aggregations/src/modules/side-panel.spec.ts @@ -14,7 +14,7 @@ describe('side-panel module', function () { beforeEach(async function () { store = (await configureStore()).plugin.store; - const localStorageValues: Record = {}; + const localStorageValues: Record = Object.create(null); fakeLocalStorage = sinon.stub(global, 'localStorage').value({ getItem: sinon.fake((key: string) => { diff --git a/packages/compass-assistant/src/prompts.spec.ts b/packages/compass-assistant/src/prompts.spec.ts index 4069bb4a956..de1942cd008 100644 --- a/packages/compass-assistant/src/prompts.spec.ts +++ b/packages/compass-assistant/src/prompts.spec.ts @@ -237,7 +237,12 @@ describe('prompts', function () { ]; for (const testCase of testCases) { - const summary: Record = { + const summary: { + type: string; + isTimeSeries?: boolean; + isView?: boolean; + subTab?: string; + } = { type: testCase.context.activeWorkspace?.type || 'No active tab', }; if (testCase.context.activeCollectionMetadata?.isTimeSeries) { diff --git a/packages/compass-collection/src/components/collection-header/badges.tsx b/packages/compass-collection/src/components/collection-header/badges.tsx index 40670e27b34..631561d90f2 100644 --- a/packages/compass-collection/src/components/collection-header/badges.tsx +++ b/packages/compass-collection/src/components/collection-header/badges.tsx @@ -12,9 +12,11 @@ export type CollectionBadgeType = | 'fle' | 'clustered'; -const badges: Record< - CollectionBadgeType, - { label: React.ReactNode; variant?: BadgeVariant } +const badges: Readonly< + Record< + CollectionBadgeType, + { label: React.ReactNode; variant?: BadgeVariant } + > > = { readonly: { label: 'READ-ONLY', diff --git a/packages/compass-collection/src/components/mock-data-generator-modal/constants.ts b/packages/compass-collection/src/components/mock-data-generator-modal/constants.ts index 63fe30d4404..e909161baf3 100644 --- a/packages/compass-collection/src/components/mock-data-generator-modal/constants.ts +++ b/packages/compass-collection/src/components/mock-data-generator-modal/constants.ts @@ -12,9 +12,8 @@ export const StepButtonLabelMap = { // Map of the current mock data generator step to the next step or 'finish' if the user is on the last step. // For the purposes of telemetry tracking the step progression in the modal. -export const MOCK_DATA_GENERATOR_STEP_TO_NEXT_STEP_MAP: Record< - MockDataGeneratorStep, - MockDataGeneratorStep | 'finish' +export const MOCK_DATA_GENERATOR_STEP_TO_NEXT_STEP_MAP: Readonly< + Record > = { [MockDataGeneratorSteps.SCHEMA_CONFIRMATION]: MockDataGeneratorSteps.SCHEMA_EDITOR, @@ -51,9 +50,8 @@ export const MongoDBFieldTypeValues: MongoDBFieldType[] = [ * Not all Faker methods are included here. * More can be found in the Faker.js API: https://v9.fakerjs.dev/api/ */ -export const MONGO_TYPE_TO_FAKER_METHODS: Record< - MongoDBFieldType, - Array<{ method: string; description?: string }> +export const MONGO_TYPE_TO_FAKER_METHODS: Readonly< + Record> > = { String: [ { method: 'lorem.word', description: 'Single word' }, diff --git a/packages/compass-collection/src/transform-schema-to-field-info.ts b/packages/compass-collection/src/transform-schema-to-field-info.ts index 516a8fdc038..59cb5f18f80 100644 --- a/packages/compass-collection/src/transform-schema-to-field-info.ts +++ b/packages/compass-collection/src/transform-schema-to-field-info.ts @@ -203,7 +203,7 @@ function isPrimitiveSchemaType(type: SchemaType): type is PrimitiveSchemaType { * The result is used for the Mock Data Generator LLM call and script generation. */ export function processSchema(schema: Schema): ProcessSchemaResult { - const fieldInfo: Record = {}; + const fieldInfo: Record = Object.create(null); const arrayLengthMap: ArrayLengthMap = {}; if (!schema.fields) { diff --git a/packages/compass-components/src/components/actions/small-icon-button.tsx b/packages/compass-components/src/components/actions/small-icon-button.tsx index 63e0871a202..e4af5479abe 100644 --- a/packages/compass-components/src/components/actions/small-icon-button.tsx +++ b/packages/compass-components/src/components/actions/small-icon-button.tsx @@ -30,7 +30,7 @@ const buttonSizeStyle: Record = { width: `${20}px !important`, height: `${20}px !important`, }), -}; +} as const; export type SmallIconButtonProps = { glyph: React.ReactChild; diff --git a/packages/compass-components/src/components/bson-value.tsx b/packages/compass-components/src/components/bson-value.tsx index 5e78c6f3c8d..51f82ce8b28 100644 --- a/packages/compass-components/src/components/bson-value.tsx +++ b/packages/compass-components/src/components/bson-value.tsx @@ -51,7 +51,7 @@ const VALUE_COLOR_BY_THEME_AND_TYPE: Record< String: variantColors.light[7], ObjectId: variantColors.light[5], }, -}; +} as const; const bsonValue = css({ whiteSpace: 'nowrap', diff --git a/packages/compass-components/src/components/document-list/document-edit-actions-footer.tsx b/packages/compass-components/src/components/document-list/document-edit-actions-footer.tsx index 10ecfd03851..b0c6e606595 100644 --- a/packages/compass-components/src/components/document-list/document-edit-actions-footer.tsx +++ b/packages/compass-components/src/components/document-list/document-edit-actions-footer.tsx @@ -73,7 +73,7 @@ const StatusMessages: Record = { ['DeleteStart']: 'Removing document…', ['DeleteError']: '', ['DeleteSuccess']: 'Document deleted.', -}; +} as const; function useHadronDocumentStatus( doc: HadronDocument, diff --git a/packages/compass-components/src/components/drawer-portal.tsx b/packages/compass-components/src/components/drawer-portal.tsx index 91a8f23bad7..d98acb6875a 100644 --- a/packages/compass-components/src/components/drawer-portal.tsx +++ b/packages/compass-components/src/components/drawer-portal.tsx @@ -353,7 +353,8 @@ export const DrawerAnchor: React.FunctionComponent = ({ children }) => { if (!drawerEl) { return; } - const nodes: Record = {}; + const nodes: Record = + Object.create(null); for (const item of toolbarData) { if (!item.guideCue) { continue; diff --git a/packages/compass-context-menu/src/use-context-menu.spec.tsx b/packages/compass-context-menu/src/use-context-menu.spec.tsx index 56e6f4248d3..d695c5fb4e3 100644 --- a/packages/compass-context-menu/src/use-context-menu.spec.tsx +++ b/packages/compass-context-menu/src/use-context-menu.spec.tsx @@ -210,8 +210,8 @@ describe('useContextMenu', function () { expect(screen.getByTestId('menu-item-Parent Item 2')).to.exist; // Should not show child items - expect(() => screen.getByTestId('menu-item-Child Item 1')).to.throw; - expect(() => screen.getByTestId('menu-item-Child Item 2')).to.throw; + expect(screen.queryByTestId('menu-item-Child Item 1')).to.not.exist; + expect(screen.queryByTestId('menu-item-Child Item 2')).to.not.exist; }); it('shows both parent and child items when right clicking child area', function () { diff --git a/packages/compass-data-modeling/src/components/saved-diagrams-list.tsx b/packages/compass-data-modeling/src/components/saved-diagrams-list.tsx index 840d3439294..3b11ec6b491 100644 --- a/packages/compass-data-modeling/src/components/saved-diagrams-list.tsx +++ b/packages/compass-data-modeling/src/components/saved-diagrams-list.tsx @@ -118,7 +118,7 @@ const featureDescription: Record< title: 'Interactive Diagram Analysis', subtitle: 'Explore and annotate interactive diagrams', }, -}; +} as const; const FeaturesList: React.FunctionComponent<{ features: Feature[] }> = ({ features, diff --git a/packages/compass-data-modeling/src/utils/nodes-and-edges.ts b/packages/compass-data-modeling/src/utils/nodes-and-edges.ts index 0c98c1583dd..d23292309e9 100644 --- a/packages/compass-data-modeling/src/utils/nodes-and-edges.ts +++ b/packages/compass-data-modeling/src/utils/nodes-and-edges.ts @@ -25,7 +25,7 @@ export const getHighlightedFields = ( return NO_HIGHLIGHTED_FIELDS; const { id } = selectedItems; const { relationship } = relationships?.find((rel) => rel.id === id) ?? {}; - const selection: Record = {}; + const selection: Record = Object.create(null); if (relationship?.[0].ns && relationship?.[0].fields) { selection[relationship[0].ns] = [relationship[0].fields]; } diff --git a/packages/compass-e2e-tests/helpers/commands/connect-form.ts b/packages/compass-e2e-tests/helpers/commands/connect-form.ts index 497e13623e8..f9347a49823 100644 --- a/packages/compass-e2e-tests/helpers/commands/connect-form.ts +++ b/packages/compass-e2e-tests/helpers/commands/connect-form.ts @@ -426,7 +426,7 @@ const colorMap: Record = { color7: 'Pink', color8: 'Orange', color9: 'Yellow', -}; +} as const; function colorValueToName(color: string): string { if (colorMap[color]) { diff --git a/packages/compass-e2e-tests/helpers/commands/create-index.ts b/packages/compass-e2e-tests/helpers/commands/create-index.ts index 847f674ddd4..98d7bc64f9b 100644 --- a/packages/compass-e2e-tests/helpers/commands/create-index.ts +++ b/packages/compass-e2e-tests/helpers/commands/create-index.ts @@ -19,7 +19,7 @@ const indexTypeToIndexSelectOption: Record = { '-1': '-1 (desc)', '2dsphere': '2dsphere', text: 'text (full text search)', -}; +} as const; export async function createIndex( browser: CompassBrowser, diff --git a/packages/compass-e2e-tests/helpers/compass.ts b/packages/compass-e2e-tests/helpers/compass.ts index a614354389a..efe77df7801 100644 --- a/packages/compass-e2e-tests/helpers/compass.ts +++ b/packages/compass-e2e-tests/helpers/compass.ts @@ -821,7 +821,7 @@ export async function startBrowser( }, }, }, - }; + } as const; // webdriverio removed RemoteOptions. It is now // Capabilities.WebdriverIOConfig, but Capabilities is not exported diff --git a/packages/compass-e2e-tests/tests/collection-ai-query.test.ts b/packages/compass-e2e-tests/tests/collection-ai-query.test.ts index cb1dfa10f00..ae1e13a5eb1 100644 --- a/packages/compass-e2e-tests/tests/collection-ai-query.test.ts +++ b/packages/compass-e2e-tests/tests/collection-ai-query.test.ts @@ -106,7 +106,7 @@ describe('Collection ai query (with mocked backend)', function () { expect(queryRequest.req.headers).to.have.property('x-client-request-id'); expect(queryRequest.req.headers).to.have.property('entrypoint'); expect(queryRequest.content.model).to.equal('mongodb-slim-latest'); - expect(queryRequest.content.instructions).to.be.string; + expect(queryRequest.content.instructions).to.be.a('string'); expect(queryRequest.content.metadata).to.have.property('userId'); expect(queryRequest.content.metadata.store).to.have.equal('true'); expect(queryRequest.content.metadata.sensitiveStorage).to.have.equal( diff --git a/packages/compass-e2e-tests/tests/my-queries-tab.test.ts b/packages/compass-e2e-tests/tests/my-queries-tab.test.ts index cb4561df752..114e93fc3df 100644 --- a/packages/compass-e2e-tests/tests/my-queries-tab.test.ts +++ b/packages/compass-e2e-tests/tests/my-queries-tab.test.ts @@ -44,8 +44,8 @@ async function openMenuForQueryItem( await browser.$(Selectors.SavedItemMenu).waitForDisplayed(); } -const knownQueryNames: Record = {}; -const knownQueryFilters: Record = {}; +const knownQueryNames: Record = Object.create(null); +const knownQueryFilters: Record = Object.create(null); async function saveQuery( browser: CompassBrowser, diff --git a/packages/compass-editor/src/editor.tsx b/packages/compass-editor/src/editor.tsx index c38a2578c66..7687c061239 100644 --- a/packages/compass-editor/src/editor.tsx +++ b/packages/compass-editor/src/editor.tsx @@ -609,7 +609,7 @@ export const languages: Record LanguageSupport> = { 'javascript-expression': () => { return new LanguageSupport(javascriptExpression); }, -}; +} as const; export const languageName = Facet.define({}); diff --git a/packages/compass-generative-ai/src/atlas-ai-service.ts b/packages/compass-generative-ai/src/atlas-ai-service.ts index 6fa1b3e7a09..bf398c658fc 100644 --- a/packages/compass-generative-ai/src/atlas-ai-service.ts +++ b/packages/compass-generative-ai/src/atlas-ai-service.ts @@ -541,7 +541,7 @@ export class AtlasAiService { const newSchema: Record< string, Omit - > = {}; + > = Object.create(null); for (const [k, v] of Object.entries(schema)) { newSchema[k] = { type: v.type }; } diff --git a/packages/compass-generative-ai/src/components/ai-optin-modal.tsx b/packages/compass-generative-ai/src/components/ai-optin-modal.tsx index b286d3eaae9..2bb35edffe4 100644 --- a/packages/compass-generative-ai/src/components/ai-optin-modal.tsx +++ b/packages/compass-generative-ai/src/components/ai-optin-modal.tsx @@ -118,7 +118,7 @@ const disabledButtonStyles: Record = { }, }, }), -}; +} as const; const CloudAIOptInBannerContent: React.FunctionComponent<{ isProjectAIEnabled: boolean; diff --git a/packages/compass-generative-ai/src/utils/parse-xml-response.ts b/packages/compass-generative-ai/src/utils/parse-xml-response.ts index dc3531aa0a1..75ea2a3630b 100644 --- a/packages/compass-generative-ai/src/utils/parse-xml-response.ts +++ b/packages/compass-generative-ai/src/utils/parse-xml-response.ts @@ -42,37 +42,33 @@ export function parseXmlToJsonResponse( ); // Currently the prompt forces LLM to return xml-styled data - const result: Record<(typeof expectedTags)[number], string | null> = { - filter: null, - project: null, - sort: null, - skip: null, - limit: null, - aggregation: null, - }; + const result: Record<(typeof expectedTags)[number], string | null> = + Object.create(null); + for (const tag of expectedTags) { + result[tag] = null; + const value = xmlDoc.querySelector(tag)?.textContent?.trim(); - if (value) { - try { - const tagValue = parse(value); - if ( - !tagValue || - (typeof tagValue === 'object' && Object.keys(tagValue).length === 0) - ) { - result[tag] = null; - } else { - // No indentation - result[tag] = toJSString(tagValue, 0) ?? null; - } - } catch (e) { - logger.log.warn( - logger.mongoLogId(1_001_000_384), - 'AtlasAiService', - `Failed to parse value for tag <${tag}>: ${value}`, - { error: e } - ); - result[tag] = null; + if (!value) { + continue; + } + + try { + const tagValue = parse(value); + if ( + tagValue && + !(typeof tagValue === 'object' && Object.keys(tagValue).length === 0) + ) { + // No indentation + result[tag] = toJSString(tagValue, 0) ?? null; } + } catch (e) { + logger.log.warn( + logger.mongoLogId(1_001_000_384), + 'AtlasAiService', + `Failed to parse value for tag <${tag}>: ${value}`, + { error: e } + ); } } diff --git a/packages/compass-import-export/src/csv/csv-types.ts b/packages/compass-import-export/src/csv/csv-types.ts index 3a90a23876f..d851f2cd889 100644 --- a/packages/compass-import-export/src/csv/csv-types.ts +++ b/packages/compass-import-export/src/csv/csv-types.ts @@ -57,7 +57,9 @@ export const parsableFieldTypes = [ ] as const; export type CSVParsableFieldType = (typeof parsableFieldTypes)[number]; -export const CSVFieldTypeLabels: Record = { +export const CSVFieldTypeLabels: Readonly< + Record +> = { int: 'Int32', long: 'Long', double: 'Double', diff --git a/packages/compass-import-export/src/csv/csv-utils.spec.ts b/packages/compass-import-export/src/csv/csv-utils.spec.ts index 4599b476e49..6d2a00fadeb 100644 --- a/packages/compass-import-export/src/csv/csv-utils.spec.ts +++ b/packages/compass-import-export/src/csv/csv-utils.spec.ts @@ -480,7 +480,7 @@ describe('placeValue', function () { }); function parseHeader(header: string[]): Record { - const parsed: Record = {}; + const parsed: Record = Object.create(null); for (const name of header) { parsed[name] = parseCSVHeaderName(name); } diff --git a/packages/compass-import-export/src/import/list-csv-fields.ts b/packages/compass-import-export/src/import/list-csv-fields.ts index 0a7bbaf1557..84376d980e4 100644 --- a/packages/compass-import-export/src/import/list-csv-fields.ts +++ b/packages/compass-import-export/src/import/list-csv-fields.ts @@ -72,7 +72,7 @@ export async function listCSVFields({ // ie. the whole array counts as one field const flattened = headerFields.map(csvHeaderNameToFieldName); - const fieldMap: Record = {}; + const fieldMap: Record = Object.create(null); // make sure that each array field is only included once for (const name of flattened) { diff --git a/packages/compass-import-export/src/modules/import.ts b/packages/compass-import-export/src/modules/import.ts index 968adc6b6f3..cc4d2788af0 100644 --- a/packages/compass-import-export/src/modules/import.ts +++ b/packages/compass-import-export/src/modules/import.ts @@ -229,7 +229,7 @@ export const startImport = (): ImportThunkAction> => { const ignoreBlanks = ignoreBlanks_ && fileType === FILE_TYPES.CSV; const fileSize = fileStats?.size || 0; - const fields: Record = {}; + const fields: Record = Object.create(null); for (const [name, type] of transform) { if (exclude.includes(name)) { continue; @@ -662,7 +662,7 @@ const loadCSVPreviewDocs = (): ImportThunkAction> => { try { const result = await listCSVFields({ input, delimiter, newline }); - const fieldMap: Record = {}; + const fieldMap: Record = Object.create(null); const fields: FieldFromCSV[] = []; // group the array fields' cells together so that large arrays don't kill diff --git a/packages/compass-import-export/src/utils/logger.ts b/packages/compass-import-export/src/utils/logger.ts index 9f11a75d69d..7b411cb3741 100644 --- a/packages/compass-import-export/src/utils/logger.ts +++ b/packages/compass-import-export/src/utils/logger.ts @@ -1,7 +1,7 @@ import debug from 'debug'; const PREFIX = 'mongodb-compass-import-export'; -const _LOGGERS: Record = {}; +const _LOGGERS: Record = Object.create(null); export const createDebug = function (name: string) { if (!_LOGGERS[name]) { diff --git a/packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.spec.tsx b/packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.spec.tsx index fedad13703a..a8f51e30201 100644 --- a/packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.spec.tsx +++ b/packages/compass-indexes/src/components/regular-indexes-table/regular-indexes-table.spec.tsx @@ -257,8 +257,8 @@ describe('RegularIndexesTable Component', function () { expect(within(indexRow).getByTestId(indexCell)).to.exist; } - expect(() => within(indexRow).getByTestId('index-actions-hide-action')).to - .throw; + expect(within(indexRow).queryByTestId('index-actions-hide-action')).to.not + .exist; if (index.status === 'creating') { expect(() => within(indexRow).getByTestId('index-actions-delete-action') @@ -283,8 +283,8 @@ describe('RegularIndexesTable Component', function () { expect(within(indexRow).getByTestId(indexCell)).to.exist; } - expect(() => within(indexRow).getByTestId('index-actions-hide-action')).to - .throw; + expect(within(indexRow).queryByTestId('index-actions-hide-action')).to.not + .exist; expect(() => within(indexRow).getByTestId('index-actions-delete-action') ).to.throw(); diff --git a/packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx b/packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx index 297ffd083e1..11d766f3e29 100644 --- a/packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx +++ b/packages/compass-indexes/src/components/search-indexes-table/search-indexes-table.tsx @@ -127,7 +127,7 @@ const statusBadgeVariants: Record = { READY: BadgeVariant.Green, STALE: BadgeVariant.LightGray, DELETING: BadgeVariant.Red, -}; +} as const; function IndexStatus({ status, diff --git a/packages/compass-indexes/src/modules/create-index.tsx b/packages/compass-indexes/src/modules/create-index.tsx index 1c235c165ce..21351245f2d 100644 --- a/packages/compass-indexes/src/modules/create-index.tsx +++ b/packages/compass-indexes/src/modules/create-index.tsx @@ -369,7 +369,7 @@ export const createIndexFormSubmitted = (): IndexesThunkAction< const formIndexOptions = getState().createIndex.options; - let spec: Record = {}; + let spec: Record = Object.create(null); try { // Gather from the index input fields diff --git a/packages/compass-indexes/src/modules/search-indexes.ts b/packages/compass-indexes/src/modules/search-indexes.ts index 71f7426652c..e2faa1411e6 100644 --- a/packages/compass-indexes/src/modules/search-indexes.ts +++ b/packages/compass-indexes/src/modules/search-indexes.ts @@ -23,7 +23,7 @@ const ATLAS_SEARCH_SERVER_ERRORS: Record = { InvalidIndexSpecificationOption: 'Invalid index definition.', IndexAlreadyExists: 'This index name is already in use. Please choose another one.', -}; +} as const; export const ActionTypes = { // Fetch indexes diff --git a/packages/compass-saved-aggregations-queries/src/index.spec.tsx b/packages/compass-saved-aggregations-queries/src/index.spec.tsx index 1e0c9a7d251..4882896cb49 100644 --- a/packages/compass-saved-aggregations-queries/src/index.spec.tsx +++ b/packages/compass-saved-aggregations-queries/src/index.spec.tsx @@ -484,8 +484,8 @@ describe('AggregationsAndQueriesAndUpdatemanyList', function () { expect(screen.getByText('Select a Namespace')).to.exist; expect(screen.getByTestId('description')).to.exist; // connection is already selected because there is only one - expect(() => screen.getByTestId('connection-select-field')).to - .throw; + expect(screen.queryByTestId('connection-select-field')).to.not + .exist; expect(screen.getByTestId('database-select-field')).to.exist; expect(screen.getByTestId('collection-select-field')).to.exist; @@ -548,8 +548,8 @@ describe('AggregationsAndQueriesAndUpdatemanyList', function () { // We don't show description in this modal expect(() => screen.getByTestId('description')).to.throw(); // connection is already selected because there is only one - expect(() => screen.getByTestId('connection-select-field')).to - .throw; + expect(screen.queryByTestId('connection-select-field')).to.not + .exist; expect(screen.getByTestId('database-select-field')).to.exist; expect(screen.getByTestId('collection-select-field')).to.exist; diff --git a/packages/compass-schema/src/components/export-schema-modal.tsx b/packages/compass-schema/src/components/export-schema-modal.tsx index c674708ca8d..daa89bbdc43 100644 --- a/packages/compass-schema/src/components/export-schema-modal.tsx +++ b/packages/compass-schema/src/components/export-schema-modal.tsx @@ -109,7 +109,7 @@ const exportSchemaFormatOptionDetails: Record< ), }, -}; +} as const; const formatTypeRadioBoxGroupId = 'export-schema-format-type-box-group'; const formatTypeRadioBoxGroupLabelId = `${formatTypeRadioBoxGroupId}-label`; diff --git a/packages/compass-schema/src/modules/geo.spec.ts b/packages/compass-schema/src/modules/geo.spec.ts index 5c91f3da129..8fcf2359bc4 100644 --- a/packages/compass-schema/src/modules/geo.spec.ts +++ b/packages/compass-schema/src/modules/geo.spec.ts @@ -61,7 +61,7 @@ describe('geo module', function () { context('when there is one circle layer', function () { const layers: Record = { 1: { field: 'field', lat: 10, lng: 5, radius: 20, type: 'circle' }, - }; + } as const; it('returns the $geoWithin query', function () { expect(generateGeoQuery(layers)).to.deep.equal({ @@ -76,7 +76,7 @@ describe('geo module', function () { const layers: Record = { 1: { field: 'field', lat: 10, lng: 5, radius: 20, type: 'circle' }, 2: { field: 'field', lat: 11, lng: 6, radius: 21, type: 'circle' }, - }; + } as const; it('returns the $or with all $geoWithin queries', function () { expect(generateGeoQuery(layers)).to.deep.equal({ @@ -115,7 +115,7 @@ describe('geo module', function () { coordinates: coordinates, type: 'polygon', }, - }; + } as const; it('returns the geoJSON query', function () { expect(generateGeoQuery(layers)).to.deep.equal({ @@ -151,7 +151,7 @@ describe('geo module', function () { const layers: Record = { 1: { field: 'field', coordinates: coordinates1, type: 'polygon' }, 2: { field: 'field', coordinates: coordinates2, type: 'polygon' }, - }; + } as const; it('returns the geoJSON query', function () { expect(generateGeoQuery(layers)).to.deep.equal({ @@ -193,7 +193,7 @@ describe('geo module', function () { const layers: Record = { 1: { field: 'field', coordinates: coordinates, type: 'polygon' }, 2: { field: 'field', lat: 10, lng: 5, radius: 20, type: 'circle' }, - }; + } as const; it('returns the geoJSON query', function () { expect(generateGeoQuery(layers)).to.deep.equal({ diff --git a/packages/compass-settings/src/components/settings/proxy-settings.tsx b/packages/compass-settings/src/components/settings/proxy-settings.tsx index ee5c7a61afd..9d57976d3c5 100644 --- a/packages/compass-settings/src/components/settings/proxy-settings.tsx +++ b/packages/compass-settings/src/components/settings/proxy-settings.tsx @@ -72,7 +72,7 @@ const UnconnectedProxySettings: React.FunctionComponent = ({ proxy: '', useEnvironmentVariableProxies: true, }, - }; + } as const; setProxyOptions({ ...proxyOptions, ...update[type] }); }, [proxyOptions, setProxyOptions] diff --git a/packages/compass-sidebar/src/components/use-filtered-connections.ts b/packages/compass-sidebar/src/components/use-filtered-connections.ts index 107b19b1b46..0075906dc9d 100644 --- a/packages/compass-sidebar/src/components/use-filtered-connections.ts +++ b/packages/compass-sidebar/src/components/use-filtered-connections.ts @@ -490,14 +490,16 @@ export const useFilteredConnections = ({ const expandedMemo: ConnectionsNavigationTreeProps['expanded'] = useMemo(() => { - const result: Record> = {}; + const result: Record> = + Object.create(null); for (const { connectionInfo, connectionStatus } of connections) { if (connectionStatus !== 'connected') { result[connectionInfo.id] = false; continue; } - const expandedItemsInConnection: Record = {}; + const expandedItemsInConnection: Record = + Object.create(null); const { state: expandedState, databases: expandedDatabases } = expanded[ connectionInfo.id ] ?? { databases: {} }; diff --git a/packages/compass/src/main/auto-update-manager.ts b/packages/compass/src/main/auto-update-manager.ts index b9c5e34fdfd..9bf645a81c5 100644 --- a/packages/compass/src/main/auto-update-manager.ts +++ b/packages/compass/src/main/auto-update-manager.ts @@ -274,9 +274,8 @@ const noop = () => { * State update map defined as `{ state: [fromStates, enter()]}` where `enter` is * the action that needs to happen when entering the respective state. */ -const STATE_UPDATE: Record< - AutoUpdateManagerState, - AutoUpdateManagerStateDefinition +const STATE_UPDATE: Readonly< + Record > = { [AutoUpdateManagerStates.Initial]: { nextStates: [ @@ -638,7 +637,7 @@ const STATE_UPDATE: Record< /** * Map package.json product names to API endpoint product names. */ -const API_PRODUCT: Record = { +const API_PRODUCT: Readonly> = { 'mongodb-compass': 'compass', 'mongodb-compass-readonly': 'compass-readonly', }; diff --git a/packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-gssapi.tsx b/packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-gssapi.tsx index b92416954c4..ba21804072b 100644 --- a/packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-gssapi.tsx +++ b/packages/connection-form/src/components/advanced-options-tabs/authentication-tab/authentication-gssapi.tsx @@ -30,7 +30,7 @@ const GSSAPI_CANONICALIZE_HOST_NAME_OPTIONS: Record< label: 'Forward and reverse', value: 'forwardAndReverse', }, -}; +} as const; function AuthenticationGSSAPI({ errors, diff --git a/packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.spec.tsx b/packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.spec.tsx index 1bf47125b51..77d7ae27ffd 100644 --- a/packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.spec.tsx +++ b/packages/connection-form/src/components/advanced-options-tabs/csfle-tab/csfle-tab.spec.tsx @@ -404,7 +404,7 @@ describe('In-Use Encryption', function () { fireEvent.click(screen.getByText('Local KMS')); fireEvent.click(screen.getByText('Add item')); - const kmsProviders: Record = {}; + const kmsProviders: Record = Object.create(null); for (const kmsProviderName of ['local', 'local:1'] as const) { const kmsCard = screen.getByTestId(`${kmsProviderName}-kms-card-item`); @@ -452,7 +452,7 @@ describe('In-Use Encryption', function () { renameKMSProvider('local', 'new_name_1'); renameKMSProvider('local:1', 'new_name_2'); - const kmsProviders: Record = {}; + const kmsProviders: Record = Object.create(null); for (const kmsProviderName of [ 'local:new_name_1', diff --git a/packages/connection-form/src/hooks/use-connection-color.ts b/packages/connection-form/src/hooks/use-connection-color.ts index 0b84862f56c..bba389b016f 100644 --- a/packages/connection-form/src/hooks/use-connection-color.ts +++ b/packages/connection-form/src/hooks/use-connection-color.ts @@ -70,7 +70,7 @@ const COLOR_CODES_TO_UI_COLORS_DARK_THEME_MAP: Record = { color8: palette.purple.light2, color9: palette.gray.base, color10: palette.gray.light1, -}; +} as const; export const COLOR_CODE_TO_NAME: Record = { color1: 'Green', @@ -83,7 +83,7 @@ export const COLOR_CODE_TO_NAME: Record = { color8: 'Orange', color9: 'Yellow', color10: 'Gray', -}; +} as const; export const CONNECTION_COLOR_CODES = Object.keys( COLOR_CODES_TO_UI_COLORS_DARK_THEME_MAP diff --git a/packages/connection-form/src/utils/csfle-kms-fields.ts b/packages/connection-form/src/utils/csfle-kms-fields.ts index 5a72b802427..fd61ffcf22c 100644 --- a/packages/connection-form/src/utils/csfle-kms-fields.ts +++ b/packages/connection-form/src/utils/csfle-kms-fields.ts @@ -48,7 +48,7 @@ type DecayUnion = { function decayUnion(value: T): DecayUnion { return value; } -const empty: Record = {}; +const empty: Record = {} as const; const GCPFields: KMSField<'gcp'>[] = [ { diff --git a/packages/data-service/src/data-service.ts b/packages/data-service/src/data-service.ts index edac6012dfc..91dd7cd4ed6 100644 --- a/packages/data-service/src/data-service.ts +++ b/packages/data-service/src/data-service.ts @@ -1193,8 +1193,19 @@ class DataServiceImpl extends WithLogContext implements DataService { const coll = this._collection(ns, 'CRUD'); // Build the aggregation pipeline dynamically based on collection type - const groupStage: Record = { - __proto__: null, + const groupStage: { + _id: null; + capped: { $first: string }; + count: { $sum: string }; + size: { $sum: { $toDouble: string } }; + storageSize: { $sum: { $toDouble: string } }; + totalIndexSize: { $sum: { $toDouble: string } }; + freeStorageSize: { $sum: { $toDouble: string } }; + unscaledCollSize: { $sum: { $multiply: unknown[] } }; + nindexes: { $max: string }; + timeseriesBucketCount?: { $first: string }; + timeseriesAvgBucketSize?: { $first: string }; + } = { _id: null, capped: { $first: '$storageStats.capped' }, count: { $sum: '$storageStats.count' },