Merge branch 'master' into bugfix/changed-log-level-error-exec-npm

This commit is contained in:
João Moreno 2020-01-13 15:17:14 +01:00 committed by GitHub
commit ef3322b35a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 2 deletions

View file

@ -8,6 +8,12 @@
- [Node.js](https://nodejs.org/en/) at least `8.x.x`
## Usage
`vsce` is meant to be mainly used as a command line tool. It can also be used a library since it exposes a small [API](https://github.com/microsoft/vscode-vsce/blob/master/src/api.ts).
> **Warning:** When using vsce as a library be sure to sanitize any user input used in API calls, as a security measurement.
## Development
First clone this repository, then:

View file

@ -54,7 +54,7 @@ function checkNPM(cancellationToken?: CancellationToken): Promise<void> {
function getNpmDependencies(cwd: string): Promise<string[]> {
return checkNPM()
.then(() => exec('npm list --production --parseable --depth=99999 --loglevel=error', { cwd, maxBuffer: 5000 * 1024 }))
.then(() => exec('npm list --production --parseable --depth=99999 --loglevel=error --link=true', { cwd, maxBuffer: 5000 * 1024 }))
.then(({ stdout }) => stdout
.split(/[\r\n]/)
.filter(dir => path.isAbsolute(dir)));

View file

@ -73,7 +73,7 @@ async function _publish(packagePath: string, pat: string, manifest: Manifest): P
return promise
.catch(err => Promise.reject(err.statusCode === 409 ? `${fullName} already exists.` : err))
.then(() => log.done(`Published ${fullName}\nYour extension will live at ${getPublishedUrl(name)} (might take a few seconds for it to show up).`));
.then(() => log.done(`Published ${fullName}\nYour extension will live at ${getPublishedUrl(name)} (might take a few minutes for it to show up).`));
})
.catch(err => {
const message = err && err.message || '';