@codingame/monaco-vscode-editor-api 4.5.0 → 4.5.2

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.
@@ -1046,13 +1046,15 @@ function createMultiFileDiffEditor(domElement, override) {
1046
1046
  }
1047
1047
  function addCommand(descriptor) {
1048
1048
  if ((typeof descriptor.id !== 'string') || (typeof descriptor.run !== 'function')) {
1049
- throw new Error('Invalid command descriptor, `id` and `run` are required properties!');
1049
+ throw ( new Error('Invalid command descriptor, `id` and `run` are required properties!'));
1050
1050
  }
1051
1051
  return CommandsRegistry.registerCommand(descriptor.id, descriptor.run);
1052
1052
  }
1053
1053
  function addEditorAction(descriptor) {
1054
1054
  if ((typeof descriptor.id !== 'string') || (typeof descriptor.label !== 'string') || (typeof descriptor.run !== 'function')) {
1055
- throw new Error('Invalid action descriptor, `id`, `label` and `run` are required properties!');
1055
+ throw ( new Error(
1056
+ 'Invalid action descriptor, `id`, `label` and `run` are required properties!'
1057
+ ));
1056
1058
  }
1057
1059
  const precondition = ContextKeyExpr.deserialize(descriptor.precondition);
1058
1060
  const run = (accessor, ...args) => {
@@ -1660,7 +1662,7 @@ class Rule {
1660
1662
  }
1661
1663
  function compile(languageId, json) {
1662
1664
  if (!json || typeof (json) !== 'object') {
1663
- throw new Error('Monarch: expecting a language definition object');
1665
+ throw ( new Error('Monarch: expecting a language definition object'));
1664
1666
  }
1665
1667
  const lexer = {};
1666
1668
  lexer.languageId = languageId;
@@ -1830,7 +1832,7 @@ function onLanguageEncountered(languageId, callback) {
1830
1832
  function setLanguageConfiguration(languageId, configuration) {
1831
1833
  const languageService = StandaloneServices.get(ILanguageService);
1832
1834
  if (!languageService.isRegisteredLanguageId(languageId)) {
1833
- throw new Error(`Cannot set configuration for unknown language ${languageId}`);
1835
+ throw ( new Error(`Cannot set configuration for unknown language ${languageId}`));
1834
1836
  }
1835
1837
  const languageConfigurationService = StandaloneServices.get(ILanguageConfigurationService);
1836
1838
  return languageConfigurationService.register(languageId, configuration, 100);
@@ -1849,7 +1851,7 @@ class EncodedTokenizationSupportAdapter {
1849
1851
  if (typeof this._actual.tokenize === 'function') {
1850
1852
  return TokenizationSupportAdapter.adaptTokenize(this._languageId, this._actual, line, state);
1851
1853
  }
1852
- throw new Error('Not supported!');
1854
+ throw ( new Error('Not supported!'));
1853
1855
  }
1854
1856
  tokenizeEncoded(line, hasEOL, state) {
1855
1857
  const result = this._actual.tokenizeEncoded(line, state);
@@ -1999,7 +2001,7 @@ function registerTokensProviderFactory(languageId, factory) {
1999
2001
  function setTokensProvider(languageId, provider) {
2000
2002
  const languageService = StandaloneServices.get(ILanguageService);
2001
2003
  if (!languageService.isRegisteredLanguageId(languageId)) {
2002
- throw new Error(`Cannot set tokens provider for unknown language ${languageId}`);
2004
+ throw ( new Error(`Cannot set tokens provider for unknown language ${languageId}`));
2003
2005
  }
2004
2006
  if (isThenable(provider)) {
2005
2007
  return registerTokensProviderFactory(languageId, { create: () => provider });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-editor-api",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -49,6 +49,6 @@
49
49
  "module": "esm/vs/editor/editor.api.js",
50
50
  "types": "esm/vs/editor/editor.api.d.ts",
51
51
  "dependencies": {
52
- "vscode": "npm:@codingame/monaco-vscode-api@4.5.0"
52
+ "vscode": "npm:@codingame/monaco-vscode-api@4.5.2"
53
53
  }
54
54
  }