Skip to content

Commit ee6278b

Browse files
authored
Merge branch 'master' into issue/88294
2 parents 39f7650 + 57ac3ed commit ee6278b

833 files changed

Lines changed: 33780 additions & 28319 deletions

File tree

Some content is hidden

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

.eslintrc.json

Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,17 @@
2626
"no-throw-literal": "warn",
2727
"no-unsafe-finally": "warn",
2828
"no-unused-labels": "warn",
29-
"no-restricted-globals": ["warn", "name", "length", "event", "closed", "external", "status", "origin", "orientation"], // non-complete list of globals that are easy to access unintentionally
29+
"no-restricted-globals": [
30+
"warn",
31+
"name",
32+
"length",
33+
"event",
34+
"closed",
35+
"external",
36+
"status",
37+
"origin",
38+
"orientation"
39+
], // non-complete list of globals that are easy to access unintentionally
3040
"no-var": "warn",
3141
"jsdoc/no-types": "warn",
3242
"semi": "off",
@@ -604,9 +614,20 @@
604614
"*"
605615
]
606616
},
617+
{
618+
"target": "**/test/integration/**",
619+
"restrictions": [
620+
"**/test/integration/**",
621+
"*"
622+
]
623+
},
624+
{
625+
"target": "{**/api/**.test.ts,}",
626+
"restrictions": "{**/vs/**,assert,sinon,crypto,vscode}"
627+
},
607628
{
608629
"target": "{**/**.test.ts,**/test/**}",
609-
"restrictions": "{**/vs/**,assert,sinon,crypto}"
630+
"restrictions": "{**/vs/**,assert,sinon,crypto,xterm*}"
610631
},
611632
{
612633
"target": "**/{common,browser,workbench}/**",
@@ -622,6 +643,50 @@
622643
"rules": {
623644
"jsdoc/no-types": "off"
624645
}
646+
},
647+
{
648+
"files": [
649+
"**/vscode.d.ts",
650+
"**/vscode.proposed.d.ts"
651+
],
652+
"rules": {
653+
"vscode-dts-create-func": "warn",
654+
"vscode-dts-literal-or-types": "warn",
655+
"vscode-dts-interface-naming": "warn",
656+
"vscode-dts-event-naming": [
657+
"warn",
658+
{
659+
"allowed": [
660+
"onCancellationRequested",
661+
"event"
662+
],
663+
"verbs": [
664+
"accept",
665+
"change",
666+
"close",
667+
"collapse",
668+
"create",
669+
"delete",
670+
"dispose",
671+
"end",
672+
"expand",
673+
"hide",
674+
"open",
675+
"override",
676+
"receive",
677+
"register",
678+
"rename",
679+
"save",
680+
"send",
681+
"start",
682+
"terminate",
683+
"trigger",
684+
"unregister",
685+
"write"
686+
]
687+
}
688+
]
689+
}
625690
}
626691
]
627692
}

.github/workflows/ci.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
2222
- run: |
2323
sudo apt-get update
24-
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0
24+
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
2525
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
2626
sudo chmod +x /etc/init.d/xvfb
2727
sudo update-rc.d xvfb defaults
@@ -46,9 +46,11 @@ jobs:
4646
- run: yarn download-builtin-extensions
4747
name: Download Built-in Extensions
4848
- run: DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
49-
name: Run Unit Tests
49+
name: Run Unit Tests (Electron)
50+
- run: DISPLAY=:10 yarn test-browser --browser chromium
51+
name: Run Unit Tests (Browser)
5052
- run: DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests"
51-
name: Run Integration Tests
53+
name: Run Integration Tests (Electron)
5254

5355
windows:
5456
runs-on: windows-2016
@@ -78,9 +80,11 @@ jobs:
7880
- run: yarn download-builtin-extensions
7981
name: Download Built-in Extensions
8082
- run: .\scripts\test.bat --tfs "Unit Tests"
81-
name: Run Unit Tests
83+
name: Run Unit Tests (Electron)
84+
- run: yarn test-browser --browser chromium
85+
name: Run Unit Tests (Browser)
8286
- run: .\scripts\test-integration.bat --tfs "Integration Tests"
83-
name: Run Integration Tests
87+
name: Run Integration Tests (Electron)
8488

8589
darwin:
8690
runs-on: macos-latest
@@ -107,6 +111,8 @@ jobs:
107111
- run: yarn download-builtin-extensions
108112
name: Download Built-in Extensions
109113
- run: ./scripts/test.sh --tfs "Unit Tests"
110-
name: Run Unit Tests
114+
name: Run Unit Tests (Electron)
115+
- run: yarn test-browser --browser chromium --browser webkit
116+
name: Run Unit Tests (Browser)
111117
- run: ./scripts/test-integration.sh --tfs "Integration Tests"
112-
name: Run Integration Tests
118+
name: Run Integration Tests (Electron)

.vscode/launch.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@
7979
"order": 6
8080
}
8181
},
82+
{
83+
"type": "extensionHost",
84+
"request": "launch",
85+
"name": "VS Code Git Tests",
86+
"runtimeExecutable": "${execPath}",
87+
"args": [
88+
"/tmp/my4g9l",
89+
"--extensionDevelopmentPath=${workspaceFolder}/extensions/git",
90+
"--extensionTestsPath=${workspaceFolder}/extensions/git/out/test"
91+
],
92+
"outFiles": [
93+
"${workspaceFolder}/extensions/git/out/**/*.js"
94+
],
95+
"presentation": {
96+
"group": "5_tests",
97+
"order": 6
98+
}
99+
},
82100
{
83101
"type": "extensionHost",
84102
"request": "launch",
@@ -167,7 +185,9 @@
167185
"webRoot": "${workspaceFolder}",
168186
// Settings for js-debug:
169187
"pauseForSourceMap": false,
170-
"outFiles": ["${workspaceFolder}/out/**/*.js"],
188+
"outFiles": [
189+
"${workspaceFolder}/out/**/*.js"
190+
],
171191
},
172192
{
173193
"type": "node",
@@ -282,7 +302,7 @@
282302
"type": "node",
283303
"request": "launch",
284304
"name": "Run Unit Tests",
285-
"program": "${workspaceFolder}/test/electron/index.js",
305+
"program": "${workspaceFolder}/test/unit/electron/index.js",
286306
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.app/Contents/MacOS/Electron",
287307
"windows": {
288308
"runtimeExecutable": "${workspaceFolder}/.build/electron/Code - OSS.exe"

.vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"i18n/**": true,
2323
"extensions/**/out/**": true,
2424
"test/smoke/out/**": true,
25+
"test/automation/out/**": true,
26+
"test/integration/browser/out/**": true,
2527
"src/vs/base/test/node/uri.test.data.txt": true
2628
},
2729
"lcov.path": [

.yarnrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
disturl "https://atom.io/download/electron"
2-
target "6.1.6"
2+
target "7.1.11"
33
runtime "electron"

build/azure-pipelines/common/createAsset.ts

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,16 @@ async function doesAssetExist(blobService: azure.BlobService, quality: string, b
4444
return existsResult.exists;
4545
}
4646

47-
async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, file: string): Promise<void> {
47+
async function uploadBlob(blobService: azure.BlobService, quality: string, blobName: string, filePath: string, fileName: string): Promise<void> {
4848
const blobOptions: azure.BlobService.CreateBlockBlobRequestOptions = {
4949
contentSettings: {
50-
contentType: mime.lookup(file),
50+
contentType: mime.lookup(filePath),
51+
contentDisposition: `attachment; filename="${fileName}"`,
5152
cacheControl: 'max-age=31536000, public'
5253
}
5354
};
5455

55-
await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c()));
56+
await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c()));
5657
}
5758

5859
function getEnv(name: string): string {
@@ -66,24 +67,24 @@ function getEnv(name: string): string {
6667
}
6768

6869
async function main(): Promise<void> {
69-
const [, , platform, type, name, file] = process.argv;
70+
const [, , platform, type, fileName, filePath] = process.argv;
7071
const quality = getEnv('VSCODE_QUALITY');
7172
const commit = getEnv('BUILD_SOURCEVERSION');
7273

7374
console.log('Creating asset...');
7475

75-
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
76+
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat)));
7677
const size = stat.size;
7778

7879
console.log('Size:', size);
7980

80-
const stream = fs.createReadStream(file);
81+
const stream = fs.createReadStream(filePath);
8182
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);
8283

8384
console.log('SHA1:', sha1hash);
8485
console.log('SHA256:', sha256hash);
8586

86-
const blobName = commit + '/' + name;
87+
const blobName = commit + '/' + fileName;
8788
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;
8889

8990
const blobService = azure.createBlobService(storageAccount, process.env['AZURE_STORAGE_ACCESS_KEY_2']!)
@@ -98,7 +99,7 @@ async function main(): Promise<void> {
9899

99100
console.log('Uploading blobs to Azure storage...');
100101

101-
await uploadBlob(blobService, quality, blobName, file);
102+
await uploadBlob(blobService, quality, blobName, filePath, fileName);
102103

103104
console.log('Blobs successfully uploaded.');
104105

build/azure-pipelines/darwin/continuous-build-darwin.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,13 @@ steps:
4040
displayName: Download Built-in Extensions
4141
- script: |
4242
./scripts/test.sh --tfs "Unit Tests"
43-
displayName: Run Unit Tests
43+
displayName: Run Unit Tests (Electron)
44+
- script: |
45+
yarn test-browser --browser chromium --browser webkit
46+
displayName: Run Unit Tests (Browser)
4447
- script: |
4548
./scripts/test-integration.sh --tfs "Integration Tests"
46-
displayName: Run Integration Tests
49+
displayName: Run Integration Tests (Electron)
4750
- task: PublishTestResults@2
4851
displayName: Publish Tests Results
4952
inputs:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
8+
<true/>
9+
<key>com.apple.security.cs.disable-library-validation</key>
10+
<true/>
11+
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
12+
<true/>
13+
</dict>
14+
</plist>

0 commit comments

Comments
 (0)