Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/changed-log-level-error-exec-npm
Browse files Browse the repository at this point in the history
  • Loading branch information
joaomoreno authored Jan 13, 2020
2 parents e0d73c9 + 2a02458 commit ef3322b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down
2 changes: 1 addition & 1 deletion src/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 || '';
Expand Down

0 comments on commit ef3322b

Please sign in to comment.