@codingame/monaco-vscode-textmate-service-override 1.83.2 → 1.83.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-textmate-service-override",
3
- "version": "1.83.2",
3
+ "version": "1.83.3",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -18,7 +18,7 @@
18
18
  "module": "index.js",
19
19
  "types": "index.d.ts",
20
20
  "dependencies": {
21
- "vscode": "npm:@codingame/monaco-vscode-api@1.83.2",
21
+ "vscode": "npm:@codingame/monaco-vscode-api@1.83.3",
22
22
  "monaco-editor": "0.44.0",
23
23
  "vscode-oniguruma": "1.7.0",
24
24
  "vscode-textmate": "9.0.0"
@@ -162,7 +162,7 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
162
162
  }
163
163
  startDebugMode(printFn, onStop) {
164
164
  if (this._debugMode) {
165
- this._notificationService.error(( nls.localize('alreadyDebugging', "Already Logging.")));
165
+ this._notificationService.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'alreadyDebugging', "Already Logging."));
166
166
  return;
167
167
  }
168
168
  this._debugModePrintFunc = printFn;
@@ -170,18 +170,15 @@ let TextMateTokenizationFeature = class TextMateTokenizationFeature extends Disp
170
170
  if (this._debugMode) {
171
171
  this._progressService.withProgress({
172
172
  location: 15 ,
173
- buttons: [( nls.localize('stop', "Stop"))]
173
+ buttons: [nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'stop', "Stop")]
174
174
  }, (progress) => {
175
175
  progress.report({
176
- message: ( nls.localize(
177
- 'progress1',
178
- "Preparing to log TM Grammar parsing. Press Stop when finished."
179
- ))
176
+ message: nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'progress1', "Preparing to log TM Grammar parsing. Press Stop when finished.")
180
177
  });
181
178
  return this._getVSCodeOniguruma().then((vscodeOniguruma) => {
182
179
  vscodeOniguruma.setDefaultDebugCall(true);
183
180
  progress.report({
184
- message: ( nls.localize('progress2', "Now logging TM Grammar parsing. Press Stop when finished."))
181
+ message: nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'progress2', "Now logging TM Grammar parsing. Press Stop when finished.")
185
182
  });
186
183
  return ( new Promise((resolve, reject) => { }));
187
184
  });
@@ -385,68 +382,32 @@ function equalsTokenRules(a, b) {
385
382
  }
386
383
  function validateGrammarExtensionPoint(extensionLocation, syntax, collector, _languageService) {
387
384
  if (syntax.language && ((typeof syntax.language !== 'string') || !_languageService.isRegisteredLanguageId(syntax.language))) {
388
- collector.error(( nls.localize(
389
- 'invalid.language',
390
- "Unknown language in `contributes.{0}.language`. Provided value: {1}",
391
- grammarsExtPoint.name,
392
- String(syntax.language)
393
- )));
385
+ collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.language', "Unknown language in `contributes.{0}.language`. Provided value: {1}", grammarsExtPoint.name, String(syntax.language)));
394
386
  return false;
395
387
  }
396
388
  if (!syntax.scopeName || (typeof syntax.scopeName !== 'string')) {
397
- collector.error(( nls.localize(
398
- 'invalid.scopeName',
399
- "Expected string in `contributes.{0}.scopeName`. Provided value: {1}",
400
- grammarsExtPoint.name,
401
- String(syntax.scopeName)
402
- )));
389
+ collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.scopeName', "Expected string in `contributes.{0}.scopeName`. Provided value: {1}", grammarsExtPoint.name, String(syntax.scopeName)));
403
390
  return false;
404
391
  }
405
392
  if (!syntax.path || (typeof syntax.path !== 'string')) {
406
- collector.error(( nls.localize(
407
- 'invalid.path.0',
408
- "Expected string in `contributes.{0}.path`. Provided value: {1}",
409
- grammarsExtPoint.name,
410
- String(syntax.path)
411
- )));
393
+ collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.path.0', "Expected string in `contributes.{0}.path`. Provided value: {1}", grammarsExtPoint.name, String(syntax.path)));
412
394
  return false;
413
395
  }
414
396
  if (syntax.injectTo && (!Array.isArray(syntax.injectTo) || ( syntax.injectTo.some(scope => typeof scope !== 'string')))) {
415
- collector.error(( nls.localize(
416
- 'invalid.injectTo',
417
- "Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}",
418
- grammarsExtPoint.name,
419
- JSON.stringify(syntax.injectTo)
420
- )));
397
+ collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.injectTo', "Invalid value in `contributes.{0}.injectTo`. Must be an array of language scope names. Provided value: {1}", grammarsExtPoint.name, JSON.stringify(syntax.injectTo)));
421
398
  return false;
422
399
  }
423
400
  if (syntax.embeddedLanguages && !types.isObject(syntax.embeddedLanguages)) {
424
- collector.error(( nls.localize(
425
- 'invalid.embeddedLanguages',
426
- "Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}",
427
- grammarsExtPoint.name,
428
- JSON.stringify(syntax.embeddedLanguages)
429
- )));
401
+ collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.embeddedLanguages', "Invalid value in `contributes.{0}.embeddedLanguages`. Must be an object map from scope name to language. Provided value: {1}", grammarsExtPoint.name, JSON.stringify(syntax.embeddedLanguages)));
430
402
  return false;
431
403
  }
432
404
  if (syntax.tokenTypes && !types.isObject(syntax.tokenTypes)) {
433
- collector.error(( nls.localize(
434
- 'invalid.tokenTypes',
435
- "Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}",
436
- grammarsExtPoint.name,
437
- JSON.stringify(syntax.tokenTypes)
438
- )));
405
+ collector.error(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.tokenTypes', "Invalid value in `contributes.{0}.tokenTypes`. Must be an object map from scope name to token type. Provided value: {1}", grammarsExtPoint.name, JSON.stringify(syntax.tokenTypes)));
439
406
  return false;
440
407
  }
441
408
  const grammarLocation = resources.joinPath(extensionLocation, syntax.path);
442
409
  if (!resources.isEqualOrParent(grammarLocation, extensionLocation)) {
443
- collector.warn(( nls.localize(
444
- 'invalid.path.1',
445
- "Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.",
446
- grammarsExtPoint.name,
447
- grammarLocation.path,
448
- extensionLocation.path
449
- )));
410
+ collector.warn(nls.localizeWithPath('vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl', 'invalid.path.1', "Expected `contributes.{0}.path` ({1}) to be included inside extension's folder ({2}). This might make the extension non-portable.", grammarsExtPoint.name, grammarLocation.path, extensionLocation.path));
450
411
  }
451
412
  return true;
452
413
  }
@@ -6,10 +6,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
6
6
  extensionPoint: 'grammars',
7
7
  deps: [languagesExtPoint],
8
8
  jsonSchema: {
9
- description: ( nls.localize(
10
- 'vscode.extension.contributes.grammars',
11
- 'Contributes textmate tokenizers.'
12
- )),
9
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars', 'Contributes textmate tokenizers.'),
13
10
  type: 'array',
14
11
  defaultSnippets: [{ body: [{ language: '${1:id}', scopeName: 'source.${2:id}', path: './syntaxes/${3:id}.tmLanguage.' }] }],
15
12
  items: {
@@ -17,58 +14,37 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
17
14
  defaultSnippets: [{ body: { language: '${1:id}', scopeName: 'source.${2:id}', path: './syntaxes/${3:id}.tmLanguage.' } }],
18
15
  properties: {
19
16
  language: {
20
- description: ( nls.localize(
21
- 'vscode.extension.contributes.grammars.language',
22
- 'Language identifier for which this syntax is contributed to.'
23
- )),
17
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.language', 'Language identifier for which this syntax is contributed to.'),
24
18
  type: 'string'
25
19
  },
26
20
  scopeName: {
27
- description: ( nls.localize(
28
- 'vscode.extension.contributes.grammars.scopeName',
29
- 'Textmate scope name used by the tmLanguage file.'
30
- )),
21
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.scopeName', 'Textmate scope name used by the tmLanguage file.'),
31
22
  type: 'string'
32
23
  },
33
24
  path: {
34
- description: ( nls.localize(
35
- 'vscode.extension.contributes.grammars.path',
36
- 'Path of the tmLanguage file. The path is relative to the extension folder and typically starts with \'./syntaxes/\'.'
37
- )),
25
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.path', 'Path of the tmLanguage file. The path is relative to the extension folder and typically starts with \'./syntaxes/\'.'),
38
26
  type: 'string'
39
27
  },
40
28
  embeddedLanguages: {
41
- description: ( nls.localize(
42
- 'vscode.extension.contributes.grammars.embeddedLanguages',
43
- 'A map of scope name to language id if this grammar contains embedded languages.'
44
- )),
29
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.embeddedLanguages', 'A map of scope name to language id if this grammar contains embedded languages.'),
45
30
  type: 'object'
46
31
  },
47
32
  tokenTypes: {
48
- description: ( nls.localize(
49
- 'vscode.extension.contributes.grammars.tokenTypes',
50
- 'A map of scope name to token types.'
51
- )),
33
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.tokenTypes', 'A map of scope name to token types.'),
52
34
  type: 'object',
53
35
  additionalProperties: {
54
36
  enum: ['string', 'comment', 'other']
55
37
  }
56
38
  },
57
39
  injectTo: {
58
- description: ( nls.localize(
59
- 'vscode.extension.contributes.grammars.injectTo',
60
- 'List of language scope names to which this grammar is injected to.'
61
- )),
40
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.injectTo', 'List of language scope names to which this grammar is injected to.'),
62
41
  type: 'array',
63
42
  items: {
64
43
  type: 'string'
65
44
  }
66
45
  },
67
46
  balancedBracketScopes: {
68
- description: ( nls.localize(
69
- 'vscode.extension.contributes.grammars.balancedBracketScopes',
70
- 'Defines which scope names contain balanced brackets.'
71
- )),
47
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.balancedBracketScopes', 'Defines which scope names contain balanced brackets.'),
72
48
  type: 'array',
73
49
  items: {
74
50
  type: 'string'
@@ -76,10 +52,7 @@ const grammarsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
76
52
  default: ['*'],
77
53
  },
78
54
  unbalancedBracketScopes: {
79
- description: ( nls.localize(
80
- 'vscode.extension.contributes.grammars.unbalancedBracketScopes',
81
- 'Defines which scope names do not contain balanced brackets.'
82
- )),
55
+ description: nls.localizeWithPath('vs/workbench/services/textMate/common/TMGrammars', 'vscode.extension.contributes.grammars.unbalancedBracketScopes', 'Defines which scope names do not contain balanced brackets.'),
83
56
  type: 'array',
84
57
  items: {
85
58
  type: 'string'