@vscode/vsce 3.5.1-1 → 3.5.1-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/out/package.js +9 -3
- 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(
|
|
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)
|
|
@@ -770,7 +773,10 @@ class LaunchEntryPointProcessor extends BaseProcessor {
|
|
|
770
773
|
}
|
|
771
774
|
if (missingEntryPoints.length > 0) {
|
|
772
775
|
const files = missingEntryPoints.join(',\n ');
|
|
773
|
-
|
|
776
|
+
const hint = this.manifest.files && this.manifest.files.length > 0
|
|
777
|
+
? `Make sure these files exist and are included by your "files" field in 'package.json'`
|
|
778
|
+
: `Make sure these files exist and aren't ignored by '.vscodeignore'`;
|
|
779
|
+
throw new Error(`Extension entrypoint(s) missing. ${hint}:\n ${files}`);
|
|
774
780
|
}
|
|
775
781
|
}
|
|
776
782
|
}
|