monaco-languageclient 7.0.2 → 7.1.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/CHANGELOG.md CHANGED
@@ -2,9 +2,14 @@
2
2
 
3
3
  All notable changes to this npm module are documented in this file.
4
4
 
5
+ ## [7.1.0] - 2023-11-27
6
+
7
+ - Updated to `monaco-vscode-api@1.83.12`.
8
+ - BREAKING: If you want to use `getConfigurationServiceOverride` you need to provide a `workspaceConfig` along the `userServices` in `initServices`.
9
+
5
10
  ## [7.0.2] - 2023-11-15
6
11
 
7
- - Updated to `monaco-vscode-api` `1.83.7`.
12
+ - Updated to `monaco-vscode-api@1.83.7`.
8
13
 
9
14
  ## [7.0.1] - 2023-11-10
10
15
 
@@ -1,5 +1,5 @@
1
1
  import { editor, Environment } from 'monaco-editor';
2
- import { LogLevel } from 'vscode/services';
2
+ import { IWorkbenchConstructionOptions } from 'vscode/services';
3
3
  import { OpenEditor } from '@codingame/monaco-vscode-editor-service-override';
4
4
  export interface MonacoEnvironmentEnhanced extends Environment {
5
5
  vscodeApiInitialised: boolean;
@@ -7,7 +7,7 @@ export interface MonacoEnvironmentEnhanced extends Environment {
7
7
  export type InitializeServiceConfig = {
8
8
  userServices?: editor.IEditorOverrideServices;
9
9
  debugLogging?: boolean;
10
- logLevel?: LogLevel;
10
+ workspaceConfig?: IWorkbenchConstructionOptions;
11
11
  };
12
12
  export declare const wasVscodeApiInitialized: () => boolean;
13
13
  export declare const initServices: (config?: InitializeServiceConfig) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"monaco-vscode-api-services.d.ts","sourceRoot":"","sources":["../src/monaco-vscode-api-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAA2B,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,kDAAkD,CAAC;AA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CACnD,CAAC;AAEF,eAAO,MAAM,uBAAuB,eAEnC,CAAC;AAEF,eAAO,MAAM,YAAY,YAAmB,uBAAuB,kBAGlE,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAmB,uBAAuB,kBAexE,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAmB,uBAAuB,kBAK1E,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,UAG/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,aAAc,OAAO,uBAAuB,gBAAgB,OAAO,SAMnG,CAAC;AAEF,eAAO,MAAM,aAAa,aAAc,OAAO,uBAAuB,oBAAoB,OAAO,uBAAuB,SAIvH,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,YAAmB,uBAAuB,kBA+BvE,CAAC"}
@@ -65,7 +65,6 @@ export const mergeServices = (services, overrideServices) => {
65
65
  * - model
66
66
  */
67
67
  export const importAllServices = async (config) => {
68
- const serviceNames = [];
69
68
  const lc = config ?? {};
70
69
  const userServices = lc.userServices ?? {};
71
70
  const mlcDefautServices = {
@@ -74,21 +73,22 @@ export const importAllServices = async (config) => {
74
73
  };
75
74
  mergeServices(mlcDefautServices, userServices);
76
75
  reportServiceLoading(userServices, lc.debugLogging === true);
77
- const haveThemeService = serviceNames.includes('theme') || Object.keys(userServices).includes('themeService');
78
- const haveTextmateService = serviceNames.includes('textmate') || Object.keys(userServices).includes('textMateTokenizationFeature');
79
- const haveMarkersService = serviceNames.includes('markers');
80
- const haveViewsService = serviceNames.includes('views') || Object.keys(userServices).includes('viewsService');
76
+ const haveThemeService = Object.keys(userServices).includes('themeService');
77
+ const haveTextmateService = Object.keys(userServices).includes('textMateTokenizationFeature');
78
+ const haveMarkersService = Object.keys(userServices).includes('markersService');
79
+ const haveViewsService = Object.keys(userServices).includes('viewsService');
81
80
  // theme requires textmate
82
81
  if (haveThemeService && !haveTextmateService) {
83
- throw new Error('"theme" requires "textmate" service. Please add it to the "userServices".');
82
+ throw new Error('"theme" service requires "textmate" service. Please add it to the "userServices".');
84
83
  }
85
84
  // markers service requires views service
86
85
  if (haveMarkersService && !haveViewsService) {
87
- throw new Error('"markers" requires "views" service. Please add it to the "userServices".');
86
+ throw new Error('"markers" service requires "views" service. Please add it to the "userServices".');
88
87
  }
89
88
  await initialize(userServices);
90
- if (lc.logLevel) {
91
- StandaloneServices.get(ILogService).setLevel(lc.logLevel);
89
+ const logLevel = lc.workspaceConfig?.developmentOptions?.logLevel;
90
+ if (logLevel) {
91
+ StandaloneServices.get(ILogService).setLevel(logLevel);
92
92
  }
93
93
  };
94
94
  //# sourceMappingURL=monaco-vscode-api-services.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"monaco-vscode-api-services.js","sourceRoot":"","sources":["../src/monaco-vscode-api-services.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,WAAW,EAAE,UAAU,EAAY,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,UAAU,IAAI,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAE7E,OAAO,2BAA2B,MAAM,qDAAqD,CAAC;AAC9F,OAAO,uBAAuB,MAAM,iDAAiD,CAAC;AAYtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,EAAE;IACxC,OAAQ,MAAM,CAAC,iBAA+C,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAClG,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,EAAE,MAAgC,EAAE,EAAE;IACnE,MAAM,kBAAkB,CAAC,MAAM,CAAC,CAAC;IACjC,MAAM,oBAAoB,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,KAAK,EAAE,MAAgC,EAAE,EAAE;IACzE,IAAI,CAAC,uBAAuB,EAAE,EAAE;QAC5B,MAAM,iBAAiB,CAAC,MAAM,CAAC,CAAC;QAChC,IAAI,MAAM,E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M,QAAQ,GAAG,EAAE,CAAC,eAAe,EAAE,kBAAkB,EAAE,QAAQ,CAAC;IAClE,IAAI,QAAQ,EAAE,CAAC;QACX,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;AACL,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monaco-languageclient",
3
- "version": "7.0.2",
3
+ "version": "7.1.0",
4
4
  "description": "Monaco Language client implementation",
5
5
  "author": {
6
6
  "name": "TypeFox GmbH",
@@ -48,16 +48,16 @@
48
48
  "License.txt"
49
49
  ],
50
50
  "dependencies": {
51
- "@codingame/monaco-vscode-editor-service-override": "~1.83.7",
52
- "@codingame/monaco-vscode-languages-service-override": "~1.83.7",
53
- "@codingame/monaco-vscode-model-service-override": "~1.83.7",
54
- "monaco-editor": "npm:@codingame/monaco-editor-treemended@>=1.83.7 <1.84.0",
55
- "vscode": "npm:@codingame/monaco-vscode-api@>=1.83.7 <1.84.0",
51
+ "@codingame/monaco-vscode-editor-service-override": "~1.83.12",
52
+ "@codingame/monaco-vscode-languages-service-override": "~1.83.12",
53
+ "@codingame/monaco-vscode-model-service-override": "~1.83.12",
54
+ "monaco-editor": "npm:@codingame/monaco-editor-treemended@>=1.83.12 <1.84.0",
55
+ "vscode": "npm:@codingame/monaco-vscode-api@>=1.83.12 <1.84.0",
56
56
  "vscode-languageclient": "~9.0.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "monaco-editor": "0.44.0",
60
- "vscode": "npm:@codingame/monaco-vscode-api@>=1.83.7 <1.84.0"
60
+ "vscode": "npm:@codingame/monaco-vscode-api@>=1.83.12 <1.84.0"
61
61
  },
62
62
  "peerDependenciesMeta": {
63
63
  "monaco-editor": {
@@ -72,8 +72,8 @@
72
72
  "vscode": "$vscode"
73
73
  },
74
74
  "resolutions": {
75
- "monaco-editor": "npm:@codingame/monaco-editor-treemended@>=1.83.7 <1.84.0",
76
- "vscode": "npm:@codingame/monaco-vscode-api@>=1.83.7 <1.84.0"
75
+ "monaco-editor": "npm:@codingame/monaco-editor-treemended@>=1.83.12 <1.84.0",
76
+ "vscode": "npm:@codingame/monaco-vscode-api@>=1.83.12 <1.84.0"
77
77
  },
78
78
  "scripts": {
79
79
  "clean": "shx rm -fr lib *.tsbuildinfo",
@@ -4,7 +4,7 @@
4
4
  * ------------------------------------------------------------------------------------------ */
5
5
 
6
6
  import { editor, Environment } from 'monaco-editor';
7
- import { ILogService, initialize, LogLevel, StandaloneServices } from 'vscode/services';
7
+ import { ILogService, initialize, IWorkbenchConstructionOptions, StandaloneServices } from 'vscode/services';
8
8
  import { initialize as initializeVscodeExtensions } from 'vscode/extensions';
9
9
  import { OpenEditor } from '@codingame/monaco-vscode-editor-service-override';
10
10
  import getLanguagesServiceOverride from '@codingame/monaco-vscode-languages-service-override';
@@ -17,7 +17,7 @@ export interface MonacoEnvironmentEnhanced extends Environment {
17
17
  export type InitializeServiceConfig = {
18
18
  userServices?: editor.IEditorOverrideServices;
19
19
  debugLogging?: boolean;
20
- logLevel?: LogLevel
20
+ workspaceConfig?: IWorkbenchConstructionOptions;
21
21
  };
22
22
 
23
23
  export const wasVscodeApiInitialized = () => {
@@ -85,7 +85,6 @@ export const mergeServices = (services: editor.IEditorOverrideServices, override
85
85
  * - model
86
86
  */
87
87
  export const importAllServices = async (config?: InitializeServiceConfig) => {
88
- const serviceNames: string[] = [];
89
88
  const lc: InitializeServiceConfig = config ?? {};
90
89
  const userServices: editor.IEditorOverrideServices = lc.userServices ?? {};
91
90
 
@@ -96,23 +95,24 @@ export const importAllServices = async (config?: InitializeServiceConfig) => {
96
95
  mergeServices(mlcDefautServices, userServices);
97
96
  reportServiceLoading(userServices, lc.debugLogging === true);
98
97
 
99
- const haveThemeService = serviceNames.includes('theme') || Object.keys(userServices).includes('themeService');
100
- const haveTextmateService = serviceNames.includes('textmate') || Object.keys(userServices).includes('textMateTokenizationFeature');
101
- const haveMarkersService = serviceNames.includes('markers');
102
- const haveViewsService = serviceNames.includes('views') || Object.keys(userServices).includes('viewsService');
98
+ const haveThemeService = Object.keys(userServices).includes('themeService');
99
+ const haveTextmateService = Object.keys(userServices).includes('textMateTokenizationFeature');
100
+ const haveMarkersService = Object.keys(userServices).includes('markersService');
101
+ const haveViewsService = Object.keys(userServices).includes('viewsService');
103
102
 
104
103
  // theme requires textmate
105
104
  if (haveThemeService && !haveTextmateService) {
106
- throw new Error('"theme" requires "textmate" service. Please add it to the "userServices".');
105
+ throw new Error('"theme" service requires "textmate" service. Please add it to the "userServices".');
107
106
  }
108
107
 
109
108
  // markers service requires views service
110
109
  if (haveMarkersService && !haveViewsService) {
111
- throw new Error('"markers" requires "views" service. Please add it to the "userServices".');
110
+ throw new Error('"markers" service requires "views" service. Please add it to the "userServices".');
112
111
  }
113
112
 
114
113
  await initialize(userServices);
115
- if (lc.logLevel) {
116
- StandaloneServices.get(ILogService).setLevel(lc.logLevel);
114
+ const logLevel = lc.workspaceConfig?.developmentOptions?.logLevel;
115
+ if (logLevel) {
116
+ StandaloneServices.get(ILogService).setLevel(logLevel);
117
117
  }
118
118
  };