@kusto/monaco-kusto 10.0.21 → 10.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -28,7 +28,8 @@ Example at [/samples/amd](https://github.com/Azure/monaco-kusto/tree/master/samp
28
28
  1. Run `npm run copyMonacoFilesAMD <path>` or `yarn copyMonacoFilesAMD <path>`
29
29
  where <path> is where you want the monaco and kusto amd modules to be. These
30
30
  files will need to be served as-in.
31
- 2. Using a amd module loader, import `vs/language/kusto/monaco.contribution` 1. The monaco editors included loader can be made available via a global
31
+ 2. Using a amd module loader, import `vs/language/kusto/monaco.contribution` 1. The monaco editors included loader can
32
+ be made available via a global
32
33
  require `require` by adding the script tag: `<script src="<path>/vs/loader.js"></script>`
33
34
  3. You should now be able to create monaco editors with `language: 'kusto'`. The
34
35
  kusto worker can be reached via the monaco global:
@@ -58,6 +59,8 @@ There are 2 APIs to set a Kusto schema:
58
59
 
59
60
  ## Contributing
60
61
 
62
+ Every PR should come with a test that checks it.
63
+
61
64
  ### Setting up a dev environment
62
65
 
63
66
  1. Install Node.js 20 https://nodejs.org/
@@ -70,11 +73,18 @@ There are 2 APIs to set a Kusto schema:
70
73
  1. Set CI environment variable to "tru"
71
74
  2. Run `yarn build`
72
75
 
76
+ ## Running integration tests
77
+
78
+ 1. Run `yarn test:install` from the root of the project
79
+ 2. Run `yarn test` from the package folder to run the tests in headless mode
80
+ 3. Run `yarn test:watch` from the package folder to run the tests in a browser and rebuild after each change
81
+
73
82
  ## Changelog
74
83
 
75
84
  ### 10.0.0
76
85
 
77
- - BREAKING CHANGE: addClusterToSchema know excepts databases as an object with name and alternative name instead of just a string name.
86
+ - BREAKING CHANGE: addClusterToSchema know excepts databases as an object with name and alternative name instead of just
87
+ a string name.
78
88
 
79
89
  ### 9.0.0
80
90
 
@@ -101,7 +111,8 @@ There are 2 APIs to set a Kusto schema:
101
111
 
102
112
  ### 7.2.0
103
113
 
104
- - Added "themeNames" object to exports which contains the theme we register with monaco: kusto-light, kusto-dark, and kusto-dark2
114
+ - Added "themeNames" object to exports which contains the theme we register with monaco: kusto-light, kusto-dark, and
115
+ kusto-dark2
105
116
 
106
117
  ### 7.0.1
107
118
 
@@ -110,7 +121,8 @@ There are 2 APIs to set a Kusto schema:
110
121
  ### 7.0.0
111
122
 
112
123
  - BREAKING CHANGE: Bumped monaco-editor peer dependency to ~0.37.0
113
- - This version of monaco-editor no longer requires a patch to work with Parcel. Details here: https://github.com/microsoft/monaco-editor/issues/2966
124
+ - This version of monaco-editor no longer requires a patch to work with Parcel. Details
125
+ here: https://github.com/microsoft/monaco-editor/issues/2966
114
126
  - fix: "monaco is not defined" errors when consuming esm files
115
127
  - Moved types from global interface (`monaco.languages.kusto.*`) to esm index
116
128
  file `import { SomeType } from '@kusto/monaco-kusto`. With this, esm
@@ -216,8 +228,10 @@ There are 2 APIs to set a Kusto schema:
216
228
 
217
229
  ### 3.2.0
218
230
 
219
- - A function validation fails (shows squiggly red lines), if the function is defined with a parameter that has a default value, but it is used without passing a value for that parameter.
220
- - Fix bug: Scalars function parameters are always showing "Table expected" error with squiggly error red line when using setSchemaFromShowSchema.
231
+ - A function validation fails (shows squiggly red lines), if the function is defined with a parameter that has a default
232
+ value, but it is used without passing a value for that parameter.
233
+ - Fix bug: Scalars function parameters are always showing "Table expected" error with squiggly error red line when using
234
+ setSchemaFromShowSchema.
221
235
 
222
236
  ### 3.1.0-beta.3
223
237
 
@@ -225,7 +239,8 @@ There are 2 APIs to set a Kusto schema:
225
239
 
226
240
  ### 3.0.1
227
241
 
228
- - Fix exception "Cannot read property 'getText' of null TypeError: Cannot read property 'getText' of null at e.parseDocumentV2"
242
+ - Fix exception "Cannot read property 'getText' of null TypeError: Cannot read property 'getText' of null at
243
+ e.parseDocumentV2"
229
244
  - Added a sample react project
230
245
 
231
246
  ### 3.0.0
@@ -333,7 +348,8 @@ There are 2 APIs to set a Kusto schema:
333
348
 
334
349
  #### Added
335
350
 
336
- - Added `getReferencedGlobalParams` that returns the global (ambient) parameters that are actually being referenced in the query.
351
+ - Added `getReferencedGlobalParams` that returns the global (ambient) parameters that are actually being referenced in
352
+ the query.
337
353
 
338
354
  ### 2.0.3
339
355
 
@@ -388,7 +404,8 @@ There are 2 APIs to set a Kusto schema:
388
404
 
389
405
  #### Added
390
406
 
391
- - Introduce a new function in language service called `getQueryParams`. it will return an array of all delcared query parameters for the query on cursor.
407
+ - Introduce a new function in language service called `getQueryParams`. it will return an array of all delcared query
408
+ parameters for the query on cursor.
392
409
 
393
410
  ### 1.1.14 (9/16/2019)
394
411
 
@@ -431,7 +448,8 @@ There are 2 APIs to set a Kusto schema:
431
448
 
432
449
  #### Bug fix
433
450
 
434
- - don't kill web worker after 2 minutes of inactivity by default. Reason: In exterme cases where schema is very large, trying to stringify the schema in web worker causes an OOM. This is configurable though.
451
+ - don't kill web worker after 2 minutes of inactivity by default. Reason: In exterme cases where schema is very large,
452
+ trying to stringify the schema in web worker causes an OOM. This is configurable though.
435
453
 
436
454
  ### 1.0.6 (6/6/2019)
437
455
 
@@ -566,7 +584,8 @@ There are 2 APIs to set a Kusto schema:
566
584
 
567
585
  #### Bug Fix
568
586
 
569
- - fix quirks in interactions between non-semantic and semantic colorization by not using semantic coloring to color plain text.
587
+ - fix quirks in interactions between non-semantic and semantic colorization by not using semantic coloring to color
588
+ plain text.
570
589
 
571
590
  ### 0.1.11
572
591
 
@@ -579,16 +598,19 @@ There are 2 APIs to set a Kusto schema:
579
598
  ### Bug Fixes
580
599
 
581
600
  - Intellisense didn't work properly when editing in the middle of a block that is not the 1st block on the page.
582
- - Monarch colorization now colorizes sub-opeators the same as semantic colorization (which makes the changes less jarring when completing semantic colorization).
601
+ - Monarch colorization now colorizes sub-opeators the same as semantic colorization (which makes the changes less
602
+ jarring when completing semantic colorization).
583
603
  - When switching context, colorization didn't recolorize.
584
604
  - (perf) Only colorize the currently edited block(s) - this supports multi-cursor editing
585
- - (perf) don't deeply parse the entire doc when doing completion. just get the list of commands and then parse the relevant command's all tokns.
605
+ - (perf) don't deeply parse the entire doc when doing completion. just get the list of commands and then parse the
606
+ relevant command's all tokns.
586
607
 
587
608
  ### 0.1.1
588
609
 
589
610
  ### Added
590
611
 
591
- - removed semantic colorization from main thread. From now on basic colorization (schema-unaware) will happen on main thread, and semantic colorization will happen in background thread. This should improve typing performance
612
+ - removed semantic colorization from main thread. From now on basic colorization (schema-unaware) will happen on main
613
+ thread, and semantic colorization will happen in background thread. This should improve typing performance
592
614
  on long rows, or on large databases.
593
615
 
594
616
  ### 0.1.0
@@ -631,7 +653,8 @@ There are 2 APIs to set a Kusto schema:
631
653
 
632
654
  #### Bug Fixes
633
655
 
634
- - **[breaking]** Cache clutsser schema in memory. This breaks backward compatibility since it now requries schema to include minor and major version of databases.
656
+ - **[breaking]** Cache clutsser schema in memory. This breaks backward compatibility since it now requries schema to
657
+ include minor and major version of databases.
635
658
 
636
659
  ### 0.89
637
660
 
@@ -682,7 +705,8 @@ There are 2 APIs to set a Kusto schema:
682
705
  - update version of @kusto/language-service-next to 0.0.10, integrated following functionality:
683
706
 
684
707
  1. library orders items on its own, so no need to order in monaco-kusto
685
- 2. add support for the cursor not ending in the end of the completion text (like in the 1st parmaeter7 of a function for example)
708
+ 2. add support for the cursor not ending in the end of the completion text (like in the 1st parmaeter7 of a function for
709
+ example)
686
710
  3. add '|' after table name
687
711
 
688
712
  - Make sure to never parse the same text more than once.
@@ -714,7 +738,8 @@ There are 2 APIs to set a Kusto schema:
714
738
 
715
739
  #### Bug Fixes
716
740
 
717
- - **[breaking]** - Update monaco-editor peer dependency to "^0.12.0" because of bug fixes performed there. Also making the
741
+ - **[breaking]** - Update monaco-editor peer dependency to "^0.12.0" because of bug fixes performed there. Also making
742
+ the
718
743
  dependency more permissive (allow later minor versions).
719
744
 
720
745
  ### 0.67
@@ -727,19 +752,22 @@ There are 2 APIs to set a Kusto schema:
727
752
 
728
753
  #### Functionality
729
754
 
730
- - updated @kusto/lagnuage-service to latest version. this contains the latest operators, documentation, and charting logic.
755
+ - updated @kusto/lagnuage-service to latest version. this contains the latest operators, documentation, and charting
756
+ logic.
731
757
 
732
758
  ### 0.64
733
759
 
734
760
  #### Bug Fixes
735
761
 
736
- - Added peer dependency for `monaco-editor@0.11` so that consumers of the package get a warning if their version of monaco is too old.
762
+ - Added peer dependency for `monaco-editor@0.11` so that consumers of the package get a warning if their version of
763
+ monaco is too old.
737
764
 
738
765
  ### 0.63
739
766
 
740
767
  #### Functionality
741
768
 
742
- - **[breaking]** - The package now requires `monaco-editor@0.11.1` to function correctly. adds support for markdown in intellisense documentation.
769
+ - **[breaking]** - The package now requires `monaco-editor@0.11.1` to function correctly. adds support for markdown in
770
+ intellisense documentation.
743
771
 
744
772
  ### 0.62
745
773
 
@@ -751,7 +779,8 @@ There are 2 APIs to set a Kusto schema:
751
779
 
752
780
  #### Functionality
753
781
 
754
- - **[breaking]**: make setSchema async so that big schemas do not block the ui thread (specifically - tokenization code is running in ui thread so it can block rendering).
782
+ - **[breaking]**: make setSchema async so that big schemas do not block the ui thread (specifically - tokenization code
783
+ is running in ui thread so it can block rendering).
755
784
 
756
785
  ### 0.60
757
786
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kusto/monaco-kusto",
3
- "version": "10.0.21",
3
+ "version": "10.0.22",
4
4
  "description": "CSL, KQL plugin for the Monaco Editor",
5
5
  "author": {
6
6
  "name": "Microsoft"
@@ -21,7 +21,10 @@
21
21
  "watch": "ts-node ./scripts/watch.ts",
22
22
  "typecheck": "tsc",
23
23
  "test_release": "echo release > test/mode.txt && http-server -c-1 -p 8080 ./ -o index.html",
24
- "clean": "rimraf ./release"
24
+ "clean": "rimraf ./release",
25
+ "start": "ts-node ./scripts/dev.ts",
26
+ "test": "playwright test --trace=retain-on-failure -c tests/playwright.config.ts",
27
+ "test:watch": "ts-node ./scripts/test.ts"
25
28
  },
26
29
  "types": "./release/esm/monaco.contribution.d.ts",
27
30
  "module": "./release/esm/monaco.contribution.js",
@@ -38,6 +41,7 @@
38
41
  "@babel/core": "^7.22.20",
39
42
  "@babel/preset-env": "^7.22.20",
40
43
  "@babel/preset-typescript": "^7.22.15",
44
+ "@playwright/test": "^1.44.0",
41
45
  "@rollup/plugin-alias": "^5.0.0",
42
46
  "@rollup/plugin-babel": "^6.0.3",
43
47
  "@rollup/plugin-commonjs": "^25.0.4",
@@ -58,6 +62,8 @@
58
62
  "terser": "^5.19.4",
59
63
  "ts-node": "^10.9.1",
60
64
  "typescript": "^5.2.2",
65
+ "vite": "^5.2.11",
66
+ "vite-plugin-node-polyfills": "^0.21.0",
61
67
  "vscode-languageserver-textdocument": "1.0.8"
62
68
  },
63
69
  "dependencies": {
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-1cf16bbf'], (function (exports, monaco, main) { 'use strict';
8
+ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './main-2c182d5b'], (function (exports, monaco, main) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -1976,7 +1976,25 @@ define('vs/language/kusto/kustoMode', ['exports', 'vs/editor/editor.main', './ma
1976
1976
  comments: {
1977
1977
  lineComment: '//',
1978
1978
  blockComment: null
1979
- }
1979
+ },
1980
+ autoClosingPairs: [{
1981
+ open: '{',
1982
+ close: '}'
1983
+ }, {
1984
+ open: '[',
1985
+ close: ']'
1986
+ }, {
1987
+ open: '(',
1988
+ close: ')'
1989
+ }, {
1990
+ open: "'",
1991
+ close: "'",
1992
+ notIn: ['string', 'comment']
1993
+ }, {
1994
+ open: '"',
1995
+ close: '"',
1996
+ notIn: ['string', 'comment']
1997
+ }]
1980
1998
  });
1981
1999
  return kustoWorker;
1982
2000
  }
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/kustoWorker', ['exports', './main-1cf16bbf', './schema-8c33b807'], (function (exports, main, schema) { 'use strict';
8
+ define('vs/language/kusto/kustoWorker', ['exports', './main-2c182d5b', './schema-c6f82d74'], (function (exports, main, schema) { 'use strict';
9
9
 
10
10
  function _slicedToArray$2(arr, i) { return _arrayWithHoles$2(arr) || _iterableToArrayLimit$2(arr, i) || _unsupportedIterableToArray$3(arr, i) || _nonIterableRest$2(); }
11
11
  function _nonIterableRest$2() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -3753,7 +3753,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-1cf16bbf', './schema
3753
3753
  }).map(function (kItem, i) {
3754
3754
  var v1CompletionOption = new k.CompletionOption(_this2._toOptionKind[kItem.Kind] || k.OptionKind.None, kItem.DisplayText);
3755
3755
  var helpTopic = _this2.getTopic(v1CompletionOption);
3756
- // If we have AfterText it means that the cursor should no be placed at end of suggested text.
3756
+ // If we have AfterText it means that the cursor should not be placed at end of suggested text.
3757
3757
  // In that case we switch to snippet format and represent the point where the cursor should be as
3758
3758
  // as '\$0'
3759
3759
  var _ref = kItem.AfterText && kItem.AfterText.length > 0 ? {
@@ -3782,7 +3782,7 @@ define('vs/language/kusto/kustoWorker', ['exports', './main-1cf16bbf', './schema
3782
3782
  lsItem.textEdit = main.TextEdit.replace(main.Range.create(startPosition, endPosition), textToInsert);
3783
3783
  lsItem.sortText = _this2.getSortText(sortTextPrefix + i + 1);
3784
3784
  // Changing the first letter to be lower case, to ignore case-sensitive matching
3785
- lsItem.filterText = lsItem.label.charAt(0).toLowerCase() + lsItem.label.slice(1);
3785
+ lsItem.filterText = kItem.MatchText.charAt(0).toLowerCase() + kItem.MatchText.slice(1);
3786
3786
  lsItem.kind = _this2.kustoKindToLsKindV2(kItem.Kind);
3787
3787
  lsItem.insertTextFormat = format;
3788
3788
  lsItem.detail = helpTopic ? helpTopic.ShortDescription : undefined;
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/main-1cf16bbf', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/main-2c182d5b', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  /* --------------------------------------------------------------------------------------------
11
11
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-8c33b807'], (function (require, exports, monaco, schema) { 'use strict';
8
+ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/editor/editor.main', './schema-c6f82d74'], (function (require, exports, monaco, schema) { 'use strict';
9
9
 
10
10
  function _interopNamespaceDefault(e) {
11
11
  var n = Object.create(null);
@@ -164,7 +164,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
164
164
  // Theoretically you would expect this code to run only once in onDidCreateEditor.
165
165
  // Turns out that onDidCreateEditor is fired before the IStandaloneEditor is completely created (it is emitted by
166
166
  // the super ctor before the child ctor was able to fully run).
167
- // Thus we don't have a key binding provided yet when onDidCreateEditor is run, which is essential to call addAction.
167
+ // Thus we don't have a key binding provided yet when onDidCreateEditor is run, which is essential to call addAction.
168
168
  // By adding the action here in onDidChangeCursorSelection we're making sure that the editor has a key binding provider,
169
169
  // and we just need to make sure that this happens only once.
170
170
  if (!_this.actionAdded) {
@@ -496,7 +496,7 @@ define('vs/language/kusto/monaco.contribution', ['require', 'exports', 'vs/edito
496
496
  return;
497
497
  }
498
498
  event.selection;
499
- // OK so now we in a situation where we know a suggestion was selected and we want to trigger another one.
499
+ // OK so now we in a situation where we know a suggestion was selected, and we want to trigger another one.
500
500
  // the only problem is that the suggestion widget itself listens to this same event in order to know it needs to close.
501
501
  // The only problem is that we're ahead in line, so we're triggering a suggest operation that will be shut down once
502
502
  // the next callback is called. This is why we're waiting here - to let all the callbacks run synchronously and be
@@ -1,11 +1,11 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
7
7
 
8
- define('vs/language/kusto/schema-8c33b807', ['exports'], (function (exports) { 'use strict';
8
+ define('vs/language/kusto/schema-c6f82d74', ['exports'], (function (exports) { 'use strict';
9
9
 
10
10
  // Definition of schema object in the context of language services. This model is exposed to consumers of this library.
11
11
 
@@ -13,7 +13,7 @@ var KustoCommandFormatter = /** @class */ (function () {
13
13
  // Theoretically you would expect this code to run only once in onDidCreateEditor.
14
14
  // Turns out that onDidCreateEditor is fired before the IStandaloneEditor is completely created (it is emitted by
15
15
  // the super ctor before the child ctor was able to fully run).
16
- // Thus we don't have a key binding provided yet when onDidCreateEditor is run, which is essential to call addAction.
16
+ // Thus we don't have a key binding provided yet when onDidCreateEditor is run, which is essential to call addAction.
17
17
  // By adding the action here in onDidChangeCursorSelection we're making sure that the editor has a key binding provider,
18
18
  // and we just need to make sure that this happens only once.
19
19
  if (!_this.actionAdded) {
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/
@@ -8,7 +8,7 @@
8
8
  import * as worker from 'monaco-editor/esm/vs/editor/editor.worker';
9
9
  import * as ls from 'vscode-languageserver-types';
10
10
  import XRegExp from 'xregexp';
11
- import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-18e9c1bd.js';
11
+ import { d as getEntityDataTypeFromCslType, a as getCallName, b as getExpression, g as getCslTypeNameFromClrType } from './schema-f88560be.js';
12
12
  import '@kusto/language-service/bridge.min';
13
13
  import '@kusto/language-service/Kusto.JavaScript.Client.min';
14
14
  import '@kusto/language-service/newtonsoft.json.min';
@@ -283,7 +283,7 @@ class KustoLanguageService {
283
283
  let items = itemsAsArray.filter(item => !(item && item.MatchText && disabledItems[item.MatchText] !== undefined && (disabledItems[item.MatchText] === k2.CompletionKind.Unknown || disabledItems[item.MatchText] === item.Kind))).map((kItem, i) => {
284
284
  const v1CompletionOption = new k.CompletionOption(this._toOptionKind[kItem.Kind] || k.OptionKind.None, kItem.DisplayText);
285
285
  const helpTopic = this.getTopic(v1CompletionOption);
286
- // If we have AfterText it means that the cursor should no be placed at end of suggested text.
286
+ // If we have AfterText it means that the cursor should not be placed at end of suggested text.
287
287
  // In that case we switch to snippet format and represent the point where the cursor should be as
288
288
  // as '\$0'
289
289
  const {
@@ -311,7 +311,7 @@ class KustoLanguageService {
311
311
  lsItem.textEdit = ls.TextEdit.replace(ls.Range.create(startPosition, endPosition), textToInsert);
312
312
  lsItem.sortText = this.getSortText(sortTextPrefix + i + 1);
313
313
  // Changing the first letter to be lower case, to ignore case-sensitive matching
314
- lsItem.filterText = lsItem.label.charAt(0).toLowerCase() + lsItem.label.slice(1);
314
+ lsItem.filterText = kItem.MatchText.charAt(0).toLowerCase() + kItem.MatchText.slice(1);
315
315
  lsItem.kind = this.kustoKindToLsKindV2(kItem.Kind);
316
316
  lsItem.insertTextFormat = format;
317
317
  lsItem.detail = helpTopic ? helpTopic.ShortDescription : undefined;
@@ -146,6 +146,13 @@ export function setupMode(defaults, monacoInstance) {
146
146
  lineComment: '//',
147
147
  blockComment: null,
148
148
  },
149
+ autoClosingPairs: [
150
+ { open: '{', close: '}' },
151
+ { open: '[', close: ']' },
152
+ { open: '(', close: ')' },
153
+ { open: "'", close: "'", notIn: ['string', 'comment'] },
154
+ { open: '"', close: '"', notIn: ['string', 'comment'] },
155
+ ],
149
156
  });
150
157
  return kustoWorker;
151
158
  }
@@ -398,7 +398,7 @@ var KustoLanguageService = /** @class */ (function () {
398
398
  .map(function (kItem, i) {
399
399
  var v1CompletionOption = new k.CompletionOption(_this._toOptionKind[kItem.Kind] || k.OptionKind.None, kItem.DisplayText);
400
400
  var helpTopic = _this.getTopic(v1CompletionOption);
401
- // If we have AfterText it means that the cursor should no be placed at end of suggested text.
401
+ // If we have AfterText it means that the cursor should not be placed at end of suggested text.
402
402
  // In that case we switch to snippet format and represent the point where the cursor should be as
403
403
  // as '\$0'
404
404
  var _a = kItem.AfterText && kItem.AfterText.length > 0
@@ -424,7 +424,7 @@ var KustoLanguageService = /** @class */ (function () {
424
424
  lsItem.textEdit = ls.TextEdit.replace(ls.Range.create(startPosition, endPosition), textToInsert);
425
425
  lsItem.sortText = _this.getSortText(sortTextPrefix + i + 1);
426
426
  // Changing the first letter to be lower case, to ignore case-sensitive matching
427
- lsItem.filterText = lsItem.label.charAt(0).toLowerCase() + lsItem.label.slice(1);
427
+ lsItem.filterText = kItem.MatchText.charAt(0).toLowerCase() + kItem.MatchText.slice(1);
428
428
  lsItem.kind = _this.kustoKindToLsKindV2(kItem.Kind);
429
429
  lsItem.insertTextFormat = format;
430
430
  lsItem.detail = helpTopic ? helpTopic.ShortDescription : undefined;
@@ -181,7 +181,7 @@ function triggerSuggestDialogWhenCompletionItemSelected(editor) {
181
181
  return;
182
182
  }
183
183
  event.selection;
184
- // OK so now we in a situation where we know a suggestion was selected and we want to trigger another one.
184
+ // OK so now we in a situation where we know a suggestion was selected, and we want to trigger another one.
185
185
  // the only problem is that the suggestion widget itself listens to this same event in order to know it needs to close.
186
186
  // The only problem is that we're ahead in line, so we're triggering a suggest operation that will be shut down once
187
187
  // the next callback is called. This is why we're waiting here - to let all the callbacks run synchronously and be
@@ -1,6 +1,6 @@
1
1
  /*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * monaco-kusto version: 10.0.21(1a66aa7041bf94687bc1e155f25c36653c952049)
3
+ * monaco-kusto version: 10.0.22(7ecae10b6d90b8762a88e3cd029274be6df0fbd3)
4
4
  * Released under the MIT license
5
5
  * https://https://github.com/Azure/monaco-kusto/blob/master/README.md
6
6
  *-----------------------------------------------------------------------------*/