@vscode/vsce 2.31.1-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 +5 -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
|
@@ -1190,7 +1190,6 @@ const defaultIgnore = [
|
|
|
1190
1190
|
'**/.vscode-test/**',
|
|
1191
1191
|
'**/.vscode-test-web/**',
|
|
1192
1192
|
];
|
|
1193
|
-
const notIgnored = ['!package.json', '!README.md'];
|
|
1194
1193
|
async function collectAllFiles(cwd, dependencies, dependencyEntryPoints) {
|
|
1195
1194
|
const deps = await (0, npm_1.getDependencies)(cwd, dependencies, dependencyEntryPoints);
|
|
1196
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, '/'))));
|
|
@@ -1209,7 +1208,9 @@ function getDependenciesOption(options) {
|
|
|
1209
1208
|
return undefined;
|
|
1210
1209
|
}
|
|
1211
1210
|
}
|
|
1212
|
-
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}`];
|
|
1213
1214
|
return collectAllFiles(cwd, dependencies, dependencyEntryPoints).then(files => {
|
|
1214
1215
|
files = files.filter(f => !/\r$/m.test(f));
|
|
1215
1216
|
return (fs.promises
|
|
@@ -1291,7 +1292,7 @@ function collect(manifest, options = {}) {
|
|
|
1291
1292
|
const packagedDependencies = options.dependencyEntryPoints || undefined;
|
|
1292
1293
|
const ignoreFile = options.ignoreFile || undefined;
|
|
1293
1294
|
const processors = createDefaultProcessors(manifest, options);
|
|
1294
|
-
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 => {
|
|
1295
1296
|
const files = fileNames.map(f => ({ path: util.filePathToVsixPath(f), localPath: path.join(cwd, f) }));
|
|
1296
1297
|
return processFiles(processors, files);
|
|
1297
1298
|
});
|
|
@@ -1423,7 +1424,7 @@ async function listFiles(options = {}) {
|
|
|
1423
1424
|
if (options.prepublish) {
|
|
1424
1425
|
await prepublish(cwd, manifest, options.useYarn);
|
|
1425
1426
|
}
|
|
1426
|
-
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);
|
|
1427
1428
|
}
|
|
1428
1429
|
exports.listFiles = listFiles;
|
|
1429
1430
|
/**
|