From 297484315ec10f2dcd063917c35fab887d49c80f Mon Sep 17 00:00:00 2001 From: Alena Khineika Date: Fri, 19 May 2023 06:35:28 +0200 Subject: [PATCH] feat: add autocomplete support for $percentile, $median and $$USER_ROLES COMPASS-6780 COMPASS-6781 (#523) --- package-lock.json | 14 +++++++------- package.json | 2 +- syntaxes/mongodbInjection.tmLanguage.json | 18 ++++++++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14959edbc..5ba6729be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,7 @@ "@iconify/react": "^1.1.4", "@leafygreen-ui/logo": "^6.3.0", "@leafygreen-ui/toggle": "^7.0.5", - "@mongodb-js/mongodb-constants": "^0.4.0", + "@mongodb-js/mongodb-constants": "^0.6.0", "@mongosh/browser-runtime-electron": "^1.8.0", "@mongosh/i18n": "^1.8.0", "@mongosh/service-provider-server": "^1.8.0", @@ -3274,9 +3274,9 @@ } }, "node_modules/@mongodb-js/mongodb-constants": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-constants/-/mongodb-constants-0.4.0.tgz", - "integrity": "sha512-Y+If46eMf9PFZmrv4TtBLHJ9T6QfpTvReaRuQTwJg1F/vWdNSW/Ro4F8LbUv7RRZU/Zx/n+mxvnS6nUBkj2ZEA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-constants/-/mongodb-constants-0.6.0.tgz", + "integrity": "sha512-O1jGPP2vSIvlmUW/kv6i2l0frQgLc8Brwfg1O0xq8OCucEZklhE3UJMTUEE2/3VOeZaLL2BPzG3rWvwy47dbXQ==", "dependencies": { "semver": "^7.3.8" } @@ -26590,9 +26590,9 @@ } }, "@mongodb-js/mongodb-constants": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-constants/-/mongodb-constants-0.4.0.tgz", - "integrity": "sha512-Y+If46eMf9PFZmrv4TtBLHJ9T6QfpTvReaRuQTwJg1F/vWdNSW/Ro4F8LbUv7RRZU/Zx/n+mxvnS6nUBkj2ZEA==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@mongodb-js/mongodb-constants/-/mongodb-constants-0.6.0.tgz", + "integrity": "sha512-O1jGPP2vSIvlmUW/kv6i2l0frQgLc8Brwfg1O0xq8OCucEZklhE3UJMTUEE2/3VOeZaLL2BPzG3rWvwy47dbXQ==", "requires": { "semver": "^7.3.8" } diff --git a/package.json b/package.json index d8246a9d5..459f32c47 100644 --- a/package.json +++ b/package.json @@ -969,7 +969,7 @@ "@iconify/react": "^1.1.4", "@leafygreen-ui/logo": "^6.3.0", "@leafygreen-ui/toggle": "^7.0.5", - "@mongodb-js/mongodb-constants": "^0.4.0", + "@mongodb-js/mongodb-constants": "^0.6.0", "@mongosh/browser-runtime-electron": "^1.8.0", "@mongosh/i18n": "^1.8.0", "@mongosh/service-provider-server": "^1.8.0", diff --git a/syntaxes/mongodbInjection.tmLanguage.json b/syntaxes/mongodbInjection.tmLanguage.json index a6fc81f2b..7ebd0707c 100644 --- a/syntaxes/mongodbInjection.tmLanguage.json +++ b/syntaxes/mongodbInjection.tmLanguage.json @@ -180,6 +180,15 @@ } } }, + { + "name": "meta.object.member.mongodb", + "match": "\\$median\\b", + "captures": { + "0": { + "name": "keyword.other.$median.mongodb" + } + } + }, { "name": "meta.object.member.mongodb", "match": "\\$min\\b", @@ -198,6 +207,15 @@ } } }, + { + "name": "meta.object.member.mongodb", + "match": "\\$percentile\\b", + "captures": { + "0": { + "name": "keyword.other.$percentile.mongodb" + } + } + }, { "name": "meta.object.member.mongodb", "match": "\\$push\\b",