Skip to content

Commit 57b293e

Browse files
committed
Merge branch 'main' into pr/418
2 parents 2e76a86 + 8321419 commit 57b293e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5217
-2089
lines changed

Diff for: .dockerignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules/
2+
out/
3+
npm-debug.log
4+
!src/test/**/node_modules
5+
package-lock.json
6+
Dockerfile
7+
.gitignore
8+
LICENSE
9+
README.md
10+
ThirdPartyNotices.txt

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules/
22
out/
33
npm-debug.log
44
!src/test/**/node_modules
5-
package-lock.json
5+
yarn.lock

Diff for: .npmignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@ yarn.lock
99
.travis.yml
1010
.vscode/
1111
out/**/*.d.ts
12-
!out/api.d.ts
12+
!out/api.d.ts
13+
.dockerignore
14+
Dockerfile

Diff for: .prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
out
2+
resources
3+
fixtures

Diff for: .vscode/extensions.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
33
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
44
// List of extensions which should be recommended for users of this workspace.
5-
"recommendations": [
6-
"hbenl.vscode-mocha-test-adapter",
7-
],
5+
"recommendations": ["hbenl.vscode-mocha-test-adapter"],
86
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
97
"unwantedRecommendations": []
10-
}
8+
}

Diff for: .vscode/launch.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
"type": "node",
99
"request": "launch",
1010
"name": "Launch Program",
11+
// "cwd": "<absolute path to your extension>",
1112
"program": "${workspaceFolder}/out/vsce",
1213
"args": [
1314
"--version"
15+
// "ls", "package", "publish"
1416
],
1517
"sourceMaps": true,
16-
"outputCapture": "std",
17-
"preLaunchTask": "compile"
18+
"outputCapture": "std"
1819
}
1920
]
20-
}
21+
}

Diff for: .vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
},
88
"typescript.tsdk": "./node_modules/typescript/lib",
99
"mochaExplorer.files": "out/**/test/*.test.js"
10-
}
10+
}

Diff for: .vscode/tasks.json

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
33
// for the documentation about the tasks.json format
44
"version": "2.0.0",
55
"tasks": [
66
{
77
"type": "npm",
88
"script": "watch",
9-
"problemMatcher": [
10-
"$tsc-watch"
11-
],
12-
"group": "build",
9+
"problemMatcher": ["$tsc-watch"],
10+
"group": {
11+
"kind": "build",
12+
"isDefault": true
13+
},
1314
"isBackground": true
15+
},
16+
{
17+
"type": "npm",
18+
"script": "test"
1419
}
1520
]
16-
}
21+
}

Diff for: Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM node:12-alpine
2+
WORKDIR /opt/vsce
3+
COPY package.json .
4+
COPY yarn.lock .
5+
RUN yarn
6+
COPY . .
7+
RUN yarn compile
8+
VOLUME /workspace
9+
WORKDIR /workspace
10+
ENTRYPOINT ["/opt/vsce/out/vsce"]

Diff for: README.md

+42-8
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,66 @@
11
# vsce
22

3-
> *The Visual Studio Code Extension Manager*
3+
> _The Visual Studio Code Extension Manager_
44
5-
[![Build Status](https://dev.azure.com/vscode/VSCE/_apis/build/status/VSCE?branchName=master)](https://dev.azure.com/vscode/VSCE/_build/latest?definitionId=16&branchName=master) [![npm version](https://badge.fury.io/js/vsce.svg)](https://badge.fury.io/js/vsce)
5+
[![Build Status](https://dev.azure.com/vscode/VSCE/_apis/build/status/VSCE?branchName=main)](https://dev.azure.com/vscode/VSCE/_build/latest?definitionId=16&branchName=main) [![npm version](https://badge.fury.io/js/vsce.svg)](https://badge.fury.io/js/vsce)
66

77
## Requirements
88

9-
- [Node.js](https://nodejs.org/en/) at least `8.x.x`
9+
- [Node.js](https://nodejs.org/en/) at least `10.x.x`
10+
11+
Or simply [Docker](#via-docker).
1012

1113
## Usage
1214

13-
`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).
15+
Install vsce globally:
16+
17+
```sh
18+
npm install -g vsce
19+
```
20+
21+
Verify the installation:
22+
23+
```sh
24+
vsce --version
25+
```
26+
27+
`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.
28+
29+
## Usage via Docker
30+
31+
You can also build a container for running vsce:
1432

15-
> **Warning:** When using vsce as a library be sure to sanitize any user input used in API calls, as a security measurement.
33+
```sh
34+
git clone https://github.com/microsoft/vscode-vsce
35+
cd vscode-vsce
36+
docker build -t vsce .
37+
```
38+
39+
Validate the container:
40+
41+
```sh
42+
docker run -it vsce --version
43+
```
44+
45+
Publish your local extension:
46+
47+
```sh
48+
docker run -it -v $(pwd):/workspace vsce publish
49+
```
1650

1751
## Development
1852

1953
First clone this repository, then:
2054

2155
```sh
22-
yarn
23-
yarn watch # or `watch-test` to also run tests
56+
npm i
57+
npm run watch # or `watch-test` to also run tests
2458
```
2559

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

2862
```sh
29-
yarn vsce
63+
npm run vsce
3064
```
3165

3266
### Publish to NPM

Diff for: SECURITY.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK -->
2+
3+
## Security
4+
5+
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
6+
7+
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](<https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)>), please report it to us as described below.
8+
9+
## Reporting Security Issues
10+
11+
**Please do not report security vulnerabilities through public GitHub issues.**
12+
13+
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report).
14+
15+
If you prefer to submit without logging in, send email to [[email protected]](mailto:[email protected]). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc).
16+
17+
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc).
18+
19+
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
20+
21+
- Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
22+
- Full paths of source file(s) related to the manifestation of the issue
23+
- The location of the affected source code (tag/branch/commit or direct URL)
24+
- Any special configuration required to reproduce the issue
25+
- Step-by-step instructions to reproduce the issue
26+
- Proof-of-concept or exploit code (if possible)
27+
- Impact of the issue, including how an attacker might exploit the issue
28+
29+
This information will help us triage your report more quickly.
30+
31+
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs.
32+
33+
## Preferred Languages
34+
35+
We prefer all communications to be in English.
36+
37+
## Policy
38+
39+
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd).
40+
41+
<!-- END MICROSOFT SECURITY.MD BLOCK -->

Diff for: azure-pipelines.yml

+19-19
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,27 @@ trigger:
55
include: ['*']
66

77
steps:
8-
- task: NodeTool@0
9-
inputs:
10-
versionSpec: "8.x"
8+
- task: NodeTool@0
9+
inputs:
10+
versionSpec: '10.x'
1111

12-
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
13-
inputs:
14-
versionSpec: "1.x"
12+
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
13+
inputs:
14+
versionSpec: '1.x'
1515

16-
- script: yarn
17-
displayName: Install Dependencies
16+
- script: yarn
17+
displayName: Install Dependencies
1818

19-
- script: yarn compile
20-
displayName: Compile
19+
- script: yarn compile
20+
displayName: Compile
2121

22-
- script: yarn test
23-
displayName: Run Tests
22+
- script: yarn test
23+
displayName: Run Tests
2424

25-
- task: Npm@1
26-
displayName: 'Publish to NPM'
27-
inputs:
28-
command: publish
29-
verbose: false
30-
publishEndpoint: 'NPM'
31-
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
25+
- task: Npm@1
26+
displayName: 'Publish to NPM'
27+
inputs:
28+
command: publish
29+
verbose: false
30+
publishEndpoint: 'NPM'
31+
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))

0 commit comments

Comments
 (0)