@vscode/vsce 3.5.1-1 → 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 +5 -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
  }
@@ -424,7 +427,7 @@ class TagsProcessor extends BaseProcessor {
424
427
  const languageModels = doesContribute('languageModels') ? ['language-models'] : [];
425
428
  const mcp = doesContribute('modelContextServerCollections') ? ['mcp', 'language-model-tools'] : [];
426
429
  const localizationContributions = ((contributes && contributes['localizations']) ?? []).reduce((r, l) => [...r, `lp-${l.languageId}`, ...toLanguagePackTags(l.translations, l.languageId)], []);
427
- 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 ?? [])], []);
428
431
  const languageActivations = activationEvents
429
432
  .map(e => /^onLanguage:(.*)$/.exec(e))
430
433
  .filter(util.nonnull)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vscode/vsce",
3
- "version": "3.5.1-1",
3
+ "version": "3.5.1-2",
4
4
  "description": "VS Code Extensions Manager",
5
5
  "repository": {
6
6
  "type": "git",