Skip to content

Commit

Permalink
Merge from vscode 718331d
Browse files Browse the repository at this point in the history
  • Loading branch information
ADS Merger committed Feb 8, 2020
1 parent 8c61538 commit 2af13c1
Show file tree
Hide file tree
Showing 752 changed files with 16,450 additions and 10,055 deletions.
56 changes: 55 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@
"no-throw-literal": "warn",
"no-unsafe-finally": "warn",
"no-unused-labels": "warn",
"no-restricted-globals": ["warn", "name", "length", "event", "closed", "external", "status", "origin", "orientation"], // non-complete list of globals that are easy to access unintentionally
"no-restricted-globals": [
"warn",
"name",
"length",
"event",
"closed",
"external",
"status",
"origin",
"orientation"
], // non-complete list of globals that are easy to access unintentionally
"no-var": "warn",
"jsdoc/no-types": "warn",
"semi": "off",
Expand Down Expand Up @@ -259,6 +269,50 @@
"rules": {
"jsdoc/no-types": "off"
}
},
{
"files": [
"**/vscode.d.ts",
"**/vscode.proposed.d.ts"
],
"rules": {
"vscode-dts-create-func": "warn",
"vscode-dts-literal-or-types": "warn",
"vscode-dts-interface-naming": "warn",
"vscode-dts-event-naming": [
"warn",
{
"allowed": [
"onCancellationRequested",
"event"
],
"verbs": [
"accept",
"change",
"close",
"collapse",
"create",
"delete",
"dispose",
"end",
"expand",
"hide",
"open",
"override",
"receive",
"register",
"rename",
"save",
"send",
"start",
"terminate",
"trigger",
"unregister",
"write"
]
}
]
}
}
]
}
6 changes: 4 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@
"webRoot": "${workspaceFolder}",
// Settings for js-debug:
"pauseForSourceMap": false,
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
},
{
"type": "node",
Expand Down Expand Up @@ -197,7 +199,7 @@
"type": "node",
"request": "launch",
"name": "Run Unit Tests",
"program": "${workspaceFolder}/test/electron/index.js",
"program": "${workspaceFolder}/test/unit/electron/index.js",
"runtimeExecutable": "${workspaceFolder}/.build/electron/Azure Data Studio.app/Contents/MacOS/Electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/.build/electron/azuredatastudio.exe"
Expand Down
1 change: 0 additions & 1 deletion .vscode/searches/ts36031.code-search
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Query: \\w+\\?\\..+![(.[]
# Flags: RegExp
# ContextLines: 2

src/vs/base/browser/ui/tree/asyncDataTree.ts:
270 } : undefined,
271 isChecked: options.ariaProvider!.isChecked ? (e) => {
Expand Down
2 changes: 1 addition & 1 deletion .yarnrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
disturl "https://atom.io/download/electron"
target "6.1.6"
target "7.1.11"
runtime "electron"
17 changes: 9 additions & 8 deletions build/azure-pipelines/common/createAsset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ async function doesAssetExist(blobService: azure.BlobService, quality: string, b
return existsResult.exists;
}

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

await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, file, blobOptions, err => err ? e(err) : c()));
await new Promise((c, e) => blobService.createBlockBlobFromLocalFile(quality, blobName, filePath, blobOptions, err => err ? e(err) : c()));
}

function getEnv(name: string): string {
Expand All @@ -66,24 +67,24 @@ function getEnv(name: string): string {
}

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

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

const stat = await new Promise<fs.Stats>((c, e) => fs.stat(file, (err, stat) => err ? e(err) : c(stat)));
const stat = await new Promise<fs.Stats>((c, e) => fs.stat(filePath, (err, stat) => err ? e(err) : c(stat)));
const size = stat.size;

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

const stream = fs.createReadStream(file);
const stream = fs.createReadStream(filePath);
const [sha1hash, sha256hash] = await Promise.all([hashStream('sha1', stream), hashStream('sha256', stream)]);

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

const blobName = commit + '/' + name;
const blobName = commit + '/' + fileName;
const storageAccount = process.env['AZURE_STORAGE_ACCOUNT_2']!;

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

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

await uploadBlob(blobService, quality, blobName, file);
await uploadBlob(blobService, quality, blobName, filePath, fileName);

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

Expand Down
3 changes: 3 additions & 0 deletions build/azure-pipelines/darwin/continuous-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ steps:
- script: |
./scripts/test.sh --tfs "Unit Tests"
displayName: Run Unit Tests
- script: |
yarn test-browser --browser chromium --browser webkit
displayName: Run Unit Tests (Browsers)
# - script: | {{SQL CARBON EDIT}} remove step
# ./scripts/test-integration.sh --tfs "Integration Tests"
# displayName: Run Integration Tests
Expand Down
12 changes: 12 additions & 0 deletions build/azure-pipelines/darwin/entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
72 changes: 57 additions & 15 deletions build/azure-pipelines/darwin/product-build-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ steps:
git config user.email "vscode@microsoft.com"
git config user.name "VSCode"
security create-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
security default-keychain -s $(agent.tempdirectory)/buildagent.keychain
security unlock-keychain -p pwd $(agent.tempdirectory)/buildagent.keychain
echo "$(macos-developer-certificate)" | base64 -D > $(agent.tempdirectory)/cert.p12
security import $(agent.tempdirectory)/cert.p12 -k $(agent.tempdirectory)/buildagent.keychain -P "$(macos-developer-certificate-key)" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k pwd $(agent.tempdirectory)/buildagent.keychain
displayName: Prepare tooling

- script: |
Expand Down Expand Up @@ -114,30 +121,25 @@ steps:
displayName: Run integration tests
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

# Web Smoke Tests disabled due to https://github.com/microsoft/vscode/issues/80308
# - script: |
# set -e
# cd test/smoke
# yarn compile
# cd -
# yarn smoketest --web --headless
# continueOnError: true
# displayName: Run web smoke tests
# condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

- script: |
set -e
cd test/smoke
yarn compile
cd -
VSCODE_REMOTE_SERVER_PATH="$(agent.builddirectory)/vscode-reh-web-darwin" \
yarn smoketest --web --headless
continueOnError: true
displayName: Run smoke tests
displayName: Run web smoke tests
condition: and(succeeded(), eq(variables['VSCODE_STEP_ON_IT'], 'false'))

- script: |
set -e
pushd ../VSCode-darwin && zip -r -X -y ../VSCode-darwin.zip * && popd
codesign -s 99FM488X57 --deep --force --options runtime --entitlements build/azure-pipelines/darwin/entitlements.plist $(agent.builddirectory)/VSCode-darwin/*.app
displayName: Set Hardened Entitlements

- script: |
set -e
pushd $(agent.builddirectory)/VSCode-darwin && zip -r -X -y $(agent.builddirectory)/VSCode-darwin.zip * && popd
displayName: Archive build

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
Expand All @@ -151,14 +153,54 @@ steps:
{
"keyCode": "CP-401337-Apple",
"operationSetCode": "MacAppDeveloperSign",
"parameters": [ ],
"parameters": [
{
"parameterName": "Hardening",
"parameterValue": "--options=runtime"
}
],
"toolName": "sign",
"toolVersion": "1.0"
}
]
SessionTimeout: 120
SessionTimeout: 60
displayName: Codesign

- script: |
zip -d $(agent.builddirectory)/VSCode-darwin.zip "*.pkg"
displayName: Clean Archive

- script: |
APP_ROOT=$(agent.builddirectory)/VSCode-darwin
APP_NAME="`ls $APP_ROOT | head -n 1`"
BUNDLE_IDENTIFIER=$(node -p "require(\"$APP_ROOT/$APP_NAME/Contents/Resources/app/product.json\").darwinBundleIdentifier")
echo "##vso[task.setvariable variable=BundleIdentifier]$BUNDLE_IDENTIFIER"
displayName: Export bundle identifier

- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'ESRP CodeSign'
FolderPath: '$(agent.builddirectory)'
Pattern: 'VSCode-darwin.zip'
signConfigType: inlineSignParams
inlineOperation: |
[
{
"keyCode": "CP-401337-Apple",
"operationSetCode": "MacAppNotarize",
"parameters": [
{
"parameterName": "BundleId",
"parameterValue": "$(BundleIdentifier)"
}
],
"toolName": "sign",
"toolVersion": "1.0"
}
]
SessionTimeout: 120
displayName: Notarization

- script: |
set -e
VSCODE_MIXIN_PASSWORD="$(github-distro-mixin-password)" \
Expand Down
3 changes: 0 additions & 3 deletions build/azure-pipelines/darwin/publish.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/env bash
set -e

# remove pkg from archive
zip -d ../VSCode-darwin.zip "*.pkg"

# publish the build
node build/azure-pipelines/common/createAsset.js \
darwin \
Expand Down
3 changes: 3 additions & 0 deletions build/azure-pipelines/linux/continuous-build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ steps:
- script: |
DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
displayName: Run Unit Tests
- script: |
DISPLAY=:10 yarn test-browser --browser chromium
displayName: Run Unit Tests (Browser)
# - script: | {{SQL CARBON EDIT}} remove step
# DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests"
# displayName: Run Integration Tests
Expand Down
4 changes: 2 additions & 2 deletions build/azure-pipelines/linux/xvfb.init
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
[ "${NETWORKING}" = "no" ] && exit 0

PROG="/usr/bin/Xvfb"
PROG_OPTIONS=":10 -ac"
PROG_OPTIONS=":10 -ac -screen 0 1024x768x24"
PROG_OUTPUT="/tmp/Xvfb.out"

case "$1" in
Expand Down Expand Up @@ -50,4 +50,4 @@ case "$1" in
exit 1
esac

exit $RETVAL
exit $RETVAL
2 changes: 1 addition & 1 deletion build/azure-pipelines/win32/ESRPClient/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="EsrpClient" version="1.0.27" />
<package id="Microsoft.ESRPClient" version="1.2.25" />
</packages>
3 changes: 3 additions & 0 deletions build/azure-pipelines/win32/continuous-build-win32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ steps:
- powershell: |
.\scripts\test.bat --tfs "Unit Tests"
displayName: Run Unit Tests
- powershell: |
yarn test-browser --browser chromium --browser webkit
displayName: Run Unit Tests (Browser)
# - powershell: | {{SQL CARBON EDIT}} remove step
# .\scripts\test-integration.bat --tfs "Integration Tests"
# displayName: Run Integration Tests
Expand Down
2 changes: 1 addition & 1 deletion build/azure-pipelines/win32/sign.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ $Input = Create-TmpJson @{

$Output = [System.IO.Path]::GetTempFileName()
$ScriptPath = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
& "$ScriptPath\ESRPClient\packages\EsrpClient.1.0.27\tools\ESRPClient.exe" Sign -a $Auth -p $Policy -i $Input -o $Output
& "$ScriptPath\ESRPClient\packages\Microsoft.ESRPClient.1.2.25\tools\ESRPClient.exe" Sign -a $Auth -p $Policy -i $Input -o $Output
7 changes: 6 additions & 1 deletion build/gulpfile.editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,13 @@ function toExternalDTS(contents) {
if (line.indexOf('declare namespace monaco.') === 0) {
lines[i] = line.replace('declare namespace monaco.', 'export namespace ');
}

if (line.indexOf('declare let MonacoEnvironment') === 0) {
lines[i] = `declare global {\n let MonacoEnvironment: Environment | undefined;\n}`;
// lines[i] = line.replace('declare namespace monaco.', 'export namespace ');
}
}
return lines.join('\n');
return lines.join('\n').replace(/\n\n\n+/g, '\n\n');
}

function filterStream(testFunc) {
Expand Down
6 changes: 3 additions & 3 deletions build/gulpfile.hygiene.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const all = [
'scripts/**/*',
'src/**/*',
'test/**/*',
'!test/**/out/**',
'!**/node_modules/**'
];

Expand All @@ -53,8 +54,7 @@ const indentationFilter = [
'!src/vs/base/common/marked/marked.js',
'!src/vs/base/node/terminateProcess.sh',
'!src/vs/base/node/cpuUsage.sh',
'!test/assert.js',
'!build/testSetup.js',
'!test/unit/assert.js',

// except specific folders
'!test/automation/out/**',
Expand Down Expand Up @@ -84,7 +84,7 @@ const indentationFilter = [
'!src/vs/*/**/*.d.ts',
'!src/typings/**/*.d.ts',
'!extensions/**/*.d.ts',
'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot,md,ps1,template,yaml,yml,d.ts.recipe,ico,icns}',
'!**/*.{svg,exe,png,bmp,scpt,bat,cmd,cur,ttf,woff,eot,md,ps1,template,yaml,yml,d.ts.recipe,ico,icns,plist}',
'!build/{lib,download}/**/*.js',
'!build/**/*.sh',
'!build/azure-pipelines/**/*.js',
Expand Down
Loading

0 comments on commit 2af13c1

Please sign in to comment.