@kusto/monaco-kusto 10.0.21 → 11.0.0

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,23 @@ 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
 
84
+ ### 11.0.0
85
+
86
+ - BREAKING CHANGE: Removed the useIntellisenseV2 option; it now defaults to true.
87
+ - feat: upgrade language service next to 11.5.5
88
+
75
89
  ### 10.0.0
76
90
 
77
- - BREAKING CHANGE: addClusterToSchema know excepts databases as an object with name and alternative name instead of just a string name.
91
+ - BREAKING CHANGE: addClusterToSchema know excepts databases as an object with name and alternative name instead of just
92
+ a string name.
78
93
 
79
94
  ### 9.0.0
80
95
 
@@ -101,7 +116,8 @@ There are 2 APIs to set a Kusto schema:
101
116
 
102
117
  ### 7.2.0
103
118
 
104
- - Added "themeNames" object to exports which contains the theme we register with monaco: kusto-light, kusto-dark, and kusto-dark2
119
+ - Added "themeNames" object to exports which contains the theme we register with monaco: kusto-light, kusto-dark, and
120
+ kusto-dark2
105
121
 
106
122
  ### 7.0.1
107
123
 
@@ -110,7 +126,8 @@ There are 2 APIs to set a Kusto schema:
110
126
  ### 7.0.0
111
127
 
112
128
  - 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
129
+ - This version of monaco-editor no longer requires a patch to work with Parcel. Details
130
+ here: https://github.com/microsoft/monaco-editor/issues/2966
114
131
  - fix: "monaco is not defined" errors when consuming esm files
115
132
  - Moved types from global interface (`monaco.languages.kusto.*`) to esm index
116
133
  file `import { SomeType } from '@kusto/monaco-kusto`. With this, esm
@@ -216,8 +233,10 @@ There are 2 APIs to set a Kusto schema:
216
233
 
217
234
  ### 3.2.0
218
235
 
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.
236
+ - A function validation fails (shows squiggly red lines), if the function is defined with a parameter that has a default
237
+ value, but it is used without passing a value for that parameter.
238
+ - Fix bug: Scalars function parameters are always showing "Table expected" error with squiggly error red line when using
239
+ setSchemaFromShowSchema.
221
240
 
222
241
  ### 3.1.0-beta.3
223
242
 
@@ -225,7 +244,8 @@ There are 2 APIs to set a Kusto schema:
225
244
 
226
245
  ### 3.0.1
227
246
 
228
- - Fix exception "Cannot read property 'getText' of null TypeError: Cannot read property 'getText' of null at e.parseDocumentV2"
247
+ - Fix exception "Cannot read property 'getText' of null TypeError: Cannot read property 'getText' of null at
248
+ e.parseDocumentV2"
229
249
  - Added a sample react project
230
250
 
231
251
  ### 3.0.0
@@ -333,7 +353,8 @@ There are 2 APIs to set a Kusto schema:
333
353
 
334
354
  #### Added
335
355
 
336
- - Added `getReferencedGlobalParams` that returns the global (ambient) parameters that are actually being referenced in the query.
356
+ - Added `getReferencedGlobalParams` that returns the global (ambient) parameters that are actually being referenced in
357
+ the query.
337
358
 
338
359
  ### 2.0.3
339
360
 
@@ -388,7 +409,8 @@ There are 2 APIs to set a Kusto schema:
388
409
 
389
410
  #### Added
390
411
 
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.
412
+ - Introduce a new function in language service called `getQueryParams`. it will return an array of all delcared query
413
+ parameters for the query on cursor.
392
414
 
393
415
  ### 1.1.14 (9/16/2019)
394
416
 
@@ -431,7 +453,8 @@ There are 2 APIs to set a Kusto schema:
431
453
 
432
454
  #### Bug fix
433
455
 
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.
456
+ - don't kill web worker after 2 minutes of inactivity by default. Reason: In exterme cases where schema is very large,
457
+ trying to stringify the schema in web worker causes an OOM. This is configurable though.
435
458
 
436
459
  ### 1.0.6 (6/6/2019)
437
460
 
@@ -566,7 +589,8 @@ There are 2 APIs to set a Kusto schema:
566
589
 
567
590
  #### Bug Fix
568
591
 
569
- - fix quirks in interactions between non-semantic and semantic colorization by not using semantic coloring to color plain text.
592
+ - fix quirks in interactions between non-semantic and semantic colorization by not using semantic coloring to color
593
+ plain text.
570
594
 
571
595
  ### 0.1.11
572
596
 
@@ -579,16 +603,19 @@ There are 2 APIs to set a Kusto schema:
579
603
  ### Bug Fixes
580
604
 
581
605
  - 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).
606
+ - Monarch colorization now colorizes sub-opeators the same as semantic colorization (which makes the changes less
607
+ jarring when completing semantic colorization).
583
608
  - When switching context, colorization didn't recolorize.
584
609
  - (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.
610
+ - (perf) don't deeply parse the entire doc when doing completion. just get the list of commands and then parse the
611
+ relevant command's all tokns.
586
612
 
587
613
  ### 0.1.1
588
614
 
589
615
  ### Added
590
616
 
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
617
+ - removed semantic colorization from main thread. From now on basic colorization (schema-unaware) will happen on main
618
+ thread, and semantic colorization will happen in background thread. This should improve typing performance
592
619
  on long rows, or on large databases.
593
620
 
594
621
  ### 0.1.0
@@ -631,7 +658,8 @@ There are 2 APIs to set a Kusto schema:
631
658
 
632
659
  #### Bug Fixes
633
660
 
634
- - **[breaking]** Cache clutsser schema in memory. This breaks backward compatibility since it now requries schema to include minor and major version of databases.
661
+ - **[breaking]** Cache clutsser schema in memory. This breaks backward compatibility since it now requries schema to
662
+ include minor and major version of databases.
635
663
 
636
664
  ### 0.89
637
665
 
@@ -682,7 +710,8 @@ There are 2 APIs to set a Kusto schema:
682
710
  - update version of @kusto/language-service-next to 0.0.10, integrated following functionality:
683
711
 
684
712
  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)
713
+ 2. add support for the cursor not ending in the end of the completion text (like in the 1st parmaeter7 of a function for
714
+ example)
686
715
  3. add '|' after table name
687
716
 
688
717
  - Make sure to never parse the same text more than once.
@@ -714,7 +743,8 @@ There are 2 APIs to set a Kusto schema:
714
743
 
715
744
  #### Bug Fixes
716
745
 
717
- - **[breaking]** - Update monaco-editor peer dependency to "^0.12.0" because of bug fixes performed there. Also making the
746
+ - **[breaking]** - Update monaco-editor peer dependency to "^0.12.0" because of bug fixes performed there. Also making
747
+ the
718
748
  dependency more permissive (allow later minor versions).
719
749
 
720
750
  ### 0.67
@@ -727,19 +757,22 @@ There are 2 APIs to set a Kusto schema:
727
757
 
728
758
  #### Functionality
729
759
 
730
- - updated @kusto/lagnuage-service to latest version. this contains the latest operators, documentation, and charting logic.
760
+ - updated @kusto/lagnuage-service to latest version. this contains the latest operators, documentation, and charting
761
+ logic.
731
762
 
732
763
  ### 0.64
733
764
 
734
765
  #### Bug Fixes
735
766
 
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.
767
+ - Added peer dependency for `monaco-editor@0.11` so that consumers of the package get a warning if their version of
768
+ monaco is too old.
737
769
 
738
770
  ### 0.63
739
771
 
740
772
  #### Functionality
741
773
 
742
- - **[breaking]** - The package now requires `monaco-editor@0.11.1` to function correctly. adds support for markdown in intellisense documentation.
774
+ - **[breaking]** - The package now requires `monaco-editor@0.11.1` to function correctly. adds support for markdown in
775
+ intellisense documentation.
743
776
 
744
777
  ### 0.62
745
778
 
@@ -751,7 +784,8 @@ There are 2 APIs to set a Kusto schema:
751
784
 
752
785
  #### Functionality
753
786
 
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).
787
+ - **[breaking]**: make setSchema async so that big schemas do not block the ui thread (specifically - tokenization code
788
+ is running in ui thread so it can block rendering).
755
789
 
756
790
  ### 0.60
757
791
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kusto/monaco-kusto",
3
- "version": "10.0.21",
3
+ "version": "11.0.0",
4
4
  "description": "CSL, KQL plugin for the Monaco Editor",
5
5
  "author": {
6
6
  "name": "Microsoft"
@@ -21,7 +21,11 @@
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": "jest",
27
+ "test:integration": "playwright test --trace=retain-on-failure -c tests/integration/playwright.config.ts",
28
+ "test:integration:watch": "ts-node ./scripts/test.ts"
25
29
  },
26
30
  "types": "./release/esm/monaco.contribution.d.ts",
27
31
  "module": "./release/esm/monaco.contribution.js",
@@ -38,6 +42,7 @@
38
42
  "@babel/core": "^7.22.20",
39
43
  "@babel/preset-env": "^7.22.20",
40
44
  "@babel/preset-typescript": "^7.22.15",
45
+ "@playwright/test": "^1.44.0",
41
46
  "@rollup/plugin-alias": "^5.0.0",
42
47
  "@rollup/plugin-babel": "^6.0.3",
43
48
  "@rollup/plugin-commonjs": "^25.0.4",
@@ -52,22 +57,26 @@
52
57
  "browser-sync": "^3.0.2",
53
58
  "concurrently": "^8.2.1",
54
59
  "http-server": "^14.1.1",
55
- "monaco-editor": "^0.46.0",
60
+ "jest": "^29.7.0",
61
+ "monaco-editor": "^0.49.0",
56
62
  "rimraf": "^5.0.1",
57
63
  "rollup": "^3.29.2",
58
64
  "terser": "^5.19.4",
65
+ "ts-jest": "^29.1.4",
59
66
  "ts-node": "^10.9.1",
60
67
  "typescript": "^5.2.2",
68
+ "vite": "^5.2.11",
69
+ "vite-plugin-node-polyfills": "^0.21.0",
61
70
  "vscode-languageserver-textdocument": "1.0.8"
62
71
  },
63
72
  "dependencies": {
64
73
  "@kusto/language-service": "0.0.278",
65
- "@kusto/language-service-next": "11.5.3",
74
+ "@kusto/language-service-next": "11.5.5",
66
75
  "lodash-es": "^4.17.21",
67
76
  "vscode-languageserver-types": "^3.17.4",
68
77
  "xregexp": "^5.1.1"
69
78
  },
70
79
  "peerDependencies": {
71
- "monaco-editor": "^0.46.0"
80
+ "monaco-editor": "0.49.0"
72
81
  }
73
82
  }