@vscode/vsce 3.5.1-0 → 3.5.1-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.
Files changed (2) hide show
  1. package/out/package.js +7 -2
  2. package/package.json +1 -1
package/out/package.js CHANGED
@@ -134,9 +134,12 @@ function getHomepageUrl(manifest, gitHost) {
134
134
  function escapeRegExp(value) {
135
135
  return value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
136
136
  }
137
+ function sanitizeTag(tag) {
138
+ return tag.replace(/[^\w-]/g, '');
139
+ }
137
140
  function toExtensionTags(extensions) {
138
141
  return extensions
139
- .map(s => s.replace(/\W/g, ''))
142
+ .map(sanitizeTag)
140
143
  .filter(s => !!s)
141
144
  .map(s => `__ext_${s}`);
142
145
  }
@@ -421,9 +424,10 @@ class TagsProcessor extends BaseProcessor {
421
424
  const remoteMenu = doesContribute('menus', 'statusBar/remoteIndicator') ? ['remote-menu'] : [];
422
425
  const chatParticipants = doesContribute('chatParticipants') ? ['chat-participant'] : [];
423
426
  const languageModelTools = doesContribute('languageModelTools') ? ['tools', 'language-model-tools'] : [];
427
+ const languageModels = doesContribute('languageModels') ? ['language-models'] : [];
424
428
  const mcp = doesContribute('modelContextServerCollections') ? ['mcp', 'language-model-tools'] : [];
425
429
  const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce((r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)], []);
426
- const languageContributions = ((contributes && contributes['languages']) ?? []).reduce((r, l) => [...r, l.id, ...(l.aliases ?? []), ...toExtensionTags(l.extensions ?? [])], []);
430
+ const languageContributions = ((contributes && contributes['languages']) ?? []).reduce((r, l) => [...r, l.id, ...(l.aliases ?? []).map(sanitizeTag), ...toExtensionTags(l.extensions ?? [])], []);
427
431
  const languageActivations = activationEvents
428
432
  .map(e => /^onLanguage:(.*)$/.exec(e))
429
433
  .filter(util.nonnull)
@@ -445,6 +449,7 @@ class TagsProcessor extends BaseProcessor {
445
449
  ...remoteMenu,
446
450
  ...chatParticipants,
447
451
  ...languageModelTools,
452
+ ...languageModels,
448
453
  ...mcp,
449
454
  ...localizationContributions,
450
455
  ...languageContributions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/vsce",
3
- "version": "3.5.1-0",
3
+ "version": "3.5.1-2",
4
4
  "description": "VS Code Extensions Manager",
5
5
  "repository": {
6
6
  "type": "git",