# vsce

> VSCode Extension Manager

Latest version **2.15.0** (published 2022-12-02) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install vsce
pnpm add vsce
yarn add vsce
bun add vsce
```

Provides the command `vsce`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.15.0 |
| Published | 2022-12-02 |
| First published | 2015-10-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 14 |
| Dependencies | 20 |
| Unpacked size | 146.9 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1047 |
| Author | Microsoft Corporation |
| Maintainers | joaomoreno.ms, kaimaetzel |
| Keywords | vscode, vsce, extension |

## Links

- npm: https://www.npmjs.com/package/vsce
- Repository: https://github.com/Microsoft/vsce
- Homepage: https://code.visualstudio.com
- Issues: https://github.com/Microsoft/vsce/issues
- npm.io page: https://npm.io/package/vsce

## Dependencies (20)

- [tmp](https://npm.io/package/tmp.md) ^0.2.1
- [glob](https://npm.io/package/glob.md) ^7.0.6
- [mime](https://npm.io/package/mime.md) ^1.3.4
- [read](https://npm.io/package/read.md) ^1.0.7
- [yazl](https://npm.io/package/yazl.md) ^2.2.2
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [leven](https://npm.io/package/leven.md) ^3.1.0
- [yauzl](https://npm.io/package/yauzl.md) ^2.3.1
- [keytar](https://npm.io/package/keytar.md) ^7.7.0
- [semver](https://npm.io/package/semver.md) ^5.1.0
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.23
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.9
- [url-join](https://npm.io/package/url-join.md) ^4.0.1
- [commander](https://npm.io/package/commander.md) ^6.1.0
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.3
- [markdown-it](https://npm.io/package/markdown-it.md) ^12.3.2
- [parse-semver](https://npm.io/package/parse-semver.md) ^1.1.1
- [hosted-git-info](https://npm.io/package/hosted-git-info.md) ^4.0.2
- [typed-rest-client](https://npm.io/package/typed-rest-client.md) ^1.8.4
- [azure-devops-node-api](https://npm.io/package/azure-devops-node-api.md) ^11.0.1

## Recent versions

- 2.15.0 (latest) — 2022-12-02
- 2.14.0 — 2022-11-07
- 2.13.0 — 2022-10-21
- 2.12.0 — 2022-10-19
- 2.11.0 — 2022-08-29
- 2.10.2 — 2022-08-19
- 2.10.1 — 2022-08-19
- 2.10.0 — 2022-07-19
- 2.9.3 — 2022-07-15
- 2.9.2 — 2022-06-21
- 2.9.1 — 2022-06-01
- 2.9.0 — 2022-05-30
- 2.8.0 — 2022-05-18
- 2.7.0 — 2022-03-11
- 2.6.7 — 2022-02-03
- … 176 more at https://npm.io/package/vsce/versions

## README

# vsce

> _The Visual Studio Code Extension Manager_

[![ci](https://github.com/microsoft/vsce/workflows/ci/badge.svg)](https://github.com/microsoft/vsce/actions?query=workflow%3Aci)
[![Version](https://img.shields.io/npm/v/vsce.svg)](https://npmjs.org/package/vsce)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)

## Requirements

- [Node.js](https://nodejs.org/en/) at least `14.x.x`

Or simply [Docker](#usage-via-docker).

### Linux

In order to save credentials safely, this project uses [keytar](https://www.npmjs.com/package/keytar) which uses `libsecret`, which you may need to install before publishing extensions. Setting the `VSCE_STORE=file` environment variable will revert back to the file credential store. Using the `VSCE_PAT` environment variable will also avoid using keytar.

Depending on your distribution, you will need to run the following command:

- Debian/Ubuntu: `sudo apt-get install libsecret-1-dev`
- Alpine: `apk add libsecret`
- Red Hat-based: `sudo yum install libsecret-devel`
- Arch Linux: `sudo pacman -S libsecret`

## Usage

Install vsce globally:

```console
npm install --global vsce
```

Verify the installation:

```console
vsce --version
```

`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/main/src/api.ts). When using vsce as a library be sure to sanitize any user input used in API calls, as a security measurement.

## Usage via Docker

You can also build a container for running vsce:

```console
$ DOCKER_BUILDKIT=1 docker build --tag vsce "https://github.com/microsoft/vscode-vsce.git#main"
```

Validate the container:

```console
docker run --rm -it vsce --version
```

Publish your local extension:

```console
docker run --rm -it -v "$(pwd)":/workspace vsce publish
```

## Configuration

You can configure the behavior of `vsce` by using CLI flags (run `vsce --help` to list them all). Example:

```console
vsce publish --baseImagesUrl https://my.custom/base/images/url
```

Or you can also set them in the `package.json`, so that you avoid having to retype the common options again. Example:

```jsonc
// package.json
{
  "vsce": {
    "baseImagesUrl": "https://my.custom/base/images/url"
    "dependencies": true,
    "yarn": false
  }
}
```

## Development

First clone this repository, then:

```console
$ npm install

$ npm run watch:build # or `watch:test` to also build tests
```

Once the watcher is up and running, you can run out of sources with:

```console
node vsce
```

This project uses [semantic-release](https://semantic-release.gitbook.io/semantic-release/) and commit messages must follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec. This allows us to effortlessly automate releases.

## About

This tool assists in packaging and publishing Visual Studio Code extensions.

Read the [**Documentation**](https://code.visualstudio.com/api/working-with-extensions/publishing-extension) on the VS Code website.

---
_Source: https://npm.io/package/vsce · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
