@vscode/vsce 2.31.0 → 2.31.1-1
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/main.js +2 -1
- package/out/package.js +7 -4
- package/package.json +1 -1
package/out/main.js
CHANGED
|
@@ -85,7 +85,8 @@ module.exports = function (argv) {
|
|
|
85
85
|
// default must remain undefined for dependencies or we will fail to load defaults from package.json
|
|
86
86
|
.option('--dependencies', 'Enable dependency detection via npm or yarn', undefined)
|
|
87
87
|
.option('--no-dependencies', 'Disable dependency detection via npm or yarn', undefined)
|
|
88
|
-
.
|
|
88
|
+
.option('--readme-path <path>', 'Path to README file (defaults to README.md)')
|
|
89
|
+
.action(({ tree, yarn, packagedDependencies, ignoreFile, dependencies, readmePath }) => main((0, package_1.ls)({ tree, useYarn: yarn, packagedDependencies, ignoreFile, dependencies, readmePath })));
|
|
89
90
|
commander_1.default
|
|
90
91
|
.command('package [version]')
|
|
91
92
|
.alias('pack')
|
package/out/package.js
CHANGED
|
@@ -354,6 +354,7 @@ class ManifestProcessor extends BaseProcessor {
|
|
|
354
354
|
: '',
|
|
355
355
|
enabledApiProposals: manifest.enabledApiProposals ? manifest.enabledApiProposals.join(',') : '',
|
|
356
356
|
preRelease: !!this.options.preRelease,
|
|
357
|
+
executesCode: !!(manifest.main ?? manifest.browser),
|
|
357
358
|
sponsorLink: manifest.sponsor?.url || '',
|
|
358
359
|
};
|
|
359
360
|
if (isGitHub) {
|
|
@@ -1085,6 +1086,7 @@ async function toVsixManifest(vsix) {
|
|
|
1085
1086
|
<Property Id="Microsoft.VisualStudio.Code.LocalizedLanguages" Value="${escape(vsix.localizedLanguages)}" />
|
|
1086
1087
|
<Property Id="Microsoft.VisualStudio.Code.EnabledApiProposals" Value="${escape(vsix.enabledApiProposals)}" />
|
|
1087
1088
|
${vsix.preRelease ? `<Property Id="Microsoft.VisualStudio.Code.PreRelease" Value="${escape(vsix.preRelease)}" />` : ''}
|
|
1089
|
+
${vsix.executesCode ? `<Property Id="Microsoft.VisualStudio.Code.ExecutesCode" Value="${escape(vsix.executesCode)}" />` : ''}
|
|
1088
1090
|
${vsix.sponsorLink
|
|
1089
1091
|
? `<Property Id="Microsoft.VisualStudio.Code.SponsorLink" Value="${escape(vsix.sponsorLink)}" />`
|
|
1090
1092
|
: ''}
|
|
@@ -1188,7 +1190,6 @@ const defaultIgnore = [
|
|
|
1188
1190
|
'**/.vscode-test/**',
|
|
1189
1191
|
'**/.vscode-test-web/**',
|
|
1190
1192
|
];
|
|
1191
|
-
const notIgnored = ['!package.json', '!README.md'];
|
|
1192
1193
|
async function collectAllFiles(cwd, dependencies, dependencyEntryPoints) {
|
|
1193
1194
|
const deps = await (0, npm_1.getDependencies)(cwd, dependencies, dependencyEntryPoints);
|
|
1194
1195
|
const promises = deps.map(dep => (0, util_1.promisify)(glob_1.default)('**', { cwd: dep, nodir: true, dot: true, ignore: 'node_modules/**' }).then(files => files.map(f => path.relative(cwd, path.join(dep, f))).map(f => f.replace(/\\/g, '/'))));
|
|
@@ -1207,7 +1208,9 @@ function getDependenciesOption(options) {
|
|
|
1207
1208
|
return undefined;
|
|
1208
1209
|
}
|
|
1209
1210
|
}
|
|
1210
|
-
function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile, manifestFileIncludes) {
|
|
1211
|
+
function collectFiles(cwd, dependencies, dependencyEntryPoints, ignoreFile, manifestFileIncludes, readmePath) {
|
|
1212
|
+
readmePath = readmePath ?? 'README.md';
|
|
1213
|
+
const notIgnored = ['!package.json', `!${readmePath}`];
|
|
1211
1214
|
return collectAllFiles(cwd, dependencies, dependencyEntryPoints).then(files => {
|
|
1212
1215
|
files = files.filter(f => !/\r$/m.test(f));
|
|
1213
1216
|
return (fs.promises
|
|
@@ -1289,7 +1292,7 @@ function collect(manifest, options = {}) {
|
|
|
1289
1292
|
const packagedDependencies = options.dependencyEntryPoints || undefined;
|
|
1290
1293
|
const ignoreFile = options.ignoreFile || undefined;
|
|
1291
1294
|
const processors = createDefaultProcessors(manifest, options);
|
|
1292
|
-
return collectFiles(cwd, getDependenciesOption(options), packagedDependencies, ignoreFile, manifest.files).then(fileNames => {
|
|
1295
|
+
return collectFiles(cwd, getDependenciesOption(options), packagedDependencies, ignoreFile, manifest.files, options.readmePath).then(fileNames => {
|
|
1293
1296
|
const files = fileNames.map(f => ({ path: util.filePathToVsixPath(f), localPath: path.join(cwd, f) }));
|
|
1294
1297
|
return processFiles(processors, files);
|
|
1295
1298
|
});
|
|
@@ -1421,7 +1424,7 @@ async function listFiles(options = {}) {
|
|
|
1421
1424
|
if (options.prepublish) {
|
|
1422
1425
|
await prepublish(cwd, manifest, options.useYarn);
|
|
1423
1426
|
}
|
|
1424
|
-
return await collectFiles(cwd, getDependenciesOption(options), options.packagedDependencies, options.ignoreFile, manifest.files);
|
|
1427
|
+
return await collectFiles(cwd, getDependenciesOption(options), options.packagedDependencies, options.ignoreFile, manifest.files, options.readmePath);
|
|
1425
1428
|
}
|
|
1426
1429
|
exports.listFiles = listFiles;
|
|
1427
1430
|
/**
|