mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Removing some unnecessary differences (#9495)
* work on removing some unncessary differences * fix compile * skip another test
This commit is contained in:
@@ -83,11 +83,6 @@ node-pty/deps/**
|
|||||||
!node-pty/build/Release/*.dll
|
!node-pty/build/Release/*.dll
|
||||||
!node-pty/build/Release/*.node
|
!node-pty/build/Release/*.node
|
||||||
|
|
||||||
emmet/node_modules/**
|
|
||||||
|
|
||||||
pty.js/build/**
|
|
||||||
!pty.js/build/Release/**
|
|
||||||
|
|
||||||
# START SQL Modules
|
# START SQL Modules
|
||||||
|
|
||||||
@angular/**/src/**
|
@angular/**/src/**
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
trigger:
|
|
||||||
branches:
|
|
||||||
include: ['master']
|
|
||||||
pr: none
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
- job: ExplorationMerge
|
|
||||||
pool:
|
|
||||||
vmImage: Ubuntu-16.04
|
|
||||||
steps:
|
|
||||||
- task: NodeTool@0
|
|
||||||
inputs:
|
|
||||||
versionSpec: "10.15.1"
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set -e
|
|
||||||
|
|
||||||
cat << EOF > ~/.netrc
|
|
||||||
machine mssqltools.visualstudio.com
|
|
||||||
login azuredatastudio
|
|
||||||
password $(DEVOPS_PASSWORD)
|
|
||||||
EOF
|
|
||||||
|
|
||||||
git config user.email "andresse@microsoft.com"
|
|
||||||
git config user.name "AzureDataStudio"
|
|
||||||
|
|
||||||
git remote add explore "$ADS_EXPLORE_REPO"
|
|
||||||
git fetch explore
|
|
||||||
|
|
||||||
git checkout -b merge-branch explore/master
|
|
||||||
|
|
||||||
git merge origin/master
|
|
||||||
|
|
||||||
git push explore HEAD:master
|
|
||||||
|
|
||||||
displayName: Sync & Merge Explore
|
|
||||||
env:
|
|
||||||
ADS_EXPLORE_REPO: $(ADS_EXPLORE_REPO)
|
|
||||||
DEVOPS_PASSWORD: $(DEVOPS_PASSWORD)
|
|
||||||
@@ -67,7 +67,6 @@ const indentationFilter = [
|
|||||||
|
|
||||||
// except multiple specific files
|
// except multiple specific files
|
||||||
'!**/package.json',
|
'!**/package.json',
|
||||||
'!**/package-lock.json', // {{SQL CARBON EDIT}}
|
|
||||||
'!**/yarn.lock',
|
'!**/yarn.lock',
|
||||||
'!**/yarn-error.log',
|
'!**/yarn-error.log',
|
||||||
|
|
||||||
@@ -406,7 +405,7 @@ function createGitIndexVinyls(paths) {
|
|||||||
return e(err);
|
return e(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
cp.exec(`git show ":${relativePath}"`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
|
cp.exec(`git show :${relativePath}`, { maxBuffer: 2000 * 1024, encoding: 'buffer' }, (err, out) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
return e(err);
|
return e(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,12 +32,11 @@ function log(prefix: string, message: string): void {
|
|||||||
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
|
||||||
export function loaderConfig(emptyPaths?: string[]) {
|
export function loaderConfig(emptyPaths?: string[]) {
|
||||||
const result: any = {
|
const result: any = {
|
||||||
paths: {
|
paths: {
|
||||||
'vs': 'out-build/vs',
|
'vs': 'out-build/vs',
|
||||||
'sql': 'out-build/sql',
|
'sql': 'out-build/sql', // {{SQL CARBON EDIT}}
|
||||||
'vscode': 'empty:'
|
'vscode': 'empty:'
|
||||||
},
|
},
|
||||||
nodeModules: emptyPaths || []
|
nodeModules: emptyPaths || []
|
||||||
|
|||||||
@@ -92,55 +92,54 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} - Comment out function that is unused due to our edit below
|
/* {{SQL CARBON EDIT}} - Comment out function that is unused due to our edit below
|
||||||
// async function isGitRepository(folder: WorkspaceFolder): Promise<boolean> {
|
async function isGitRepository(folder: WorkspaceFolder): Promise<boolean> {
|
||||||
// if (folder.uri.scheme !== 'file') {
|
if (folder.uri.scheme !== 'file') {
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// const dotGit = path.join(folder.uri.fsPath, '.git');
|
const dotGit = path.join(folder.uri.fsPath, '.git');
|
||||||
|
|
||||||
// try {
|
try {
|
||||||
// const dotGitStat = await new Promise<fs.Stats>((c, e) => fs.stat(dotGit, (err, stat) => err ? e(err) : c(stat)));
|
const dotGitStat = await new Promise<fs.Stats>((c, e) => fs.stat(dotGit, (err, stat) => err ? e(err) : c(stat)));
|
||||||
// return dotGitStat.isDirectory();
|
return dotGitStat.isDirectory();
|
||||||
// } catch (err) {
|
} catch (err) {
|
||||||
// return false;
|
return false;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} - Comment out function that is unused due to our edit below
|
async function warnAboutMissingGit(): Promise<void> {
|
||||||
// async function warnAboutMissingGit(): Promise<void> {
|
const config = workspace.getConfiguration('git');
|
||||||
// const config = workspace.getConfiguration('git');
|
const shouldIgnore = config.get<boolean>('ignoreMissingGitWarning') === true;
|
||||||
// const shouldIgnore = config.get<boolean>('ignoreMissingGitWarning') === true;
|
|
||||||
|
|
||||||
// if (shouldIgnore) {
|
if (shouldIgnore) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// if (!workspace.workspaceFolders) {
|
if (!workspace.workspaceFolders) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// const areGitRepositories = await Promise.all(workspace.workspaceFolders.map(isGitRepository));
|
const areGitRepositories = await Promise.all(workspace.workspaceFolders.map(isGitRepository));
|
||||||
|
|
||||||
// if (areGitRepositories.every(isGitRepository => !isGitRepository)) {
|
if (areGitRepositories.every(isGitRepository => !isGitRepository)) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// const download = localize('downloadgit', "Download Git");
|
const download = localize('downloadgit', "Download Git");
|
||||||
// const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||||
// const choice = await window.showWarningMessage(
|
const choice = await window.showWarningMessage(
|
||||||
// localize('notfound', "Git not found. Install it or configure it using the 'git.path' setting."),
|
localize('notfound', "Git not found. Install it or configure it using the 'git.path' setting."),
|
||||||
// download,
|
download,
|
||||||
// neverShowAgain
|
neverShowAgain
|
||||||
// );
|
);
|
||||||
|
|
||||||
// if (choice === download) {
|
if (choice === download) {
|
||||||
// commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||||
// } else if (choice === neverShowAgain) {
|
} else if (choice === neverShowAgain) {
|
||||||
// await config.update('ignoreMissingGitWarning', true, true);
|
await config.update('ignoreMissingGitWarning', true, true);
|
||||||
// }
|
}
|
||||||
// }
|
}*/
|
||||||
|
|
||||||
export async function activate(context: ExtensionContext): Promise<GitExtension> {
|
export async function activate(context: ExtensionContext): Promise<GitExtension> {
|
||||||
const disposables: Disposable[] = [];
|
const disposables: Disposable[] = [];
|
||||||
@@ -174,9 +173,8 @@ export async function activate(context: ExtensionContext): Promise<GitExtension>
|
|||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} turn-off Git missing prompt
|
// console.warn(err.message); {{SQL CARBON EDIT}} turn-off Git missing prompt
|
||||||
// console.warn(err.message);
|
// outputChannel.appendLine(err.message); {{SQL CARBON EDIT}} turn-off Git missing prompt
|
||||||
// outputChannel.appendLine(err.message);
|
|
||||||
|
|
||||||
commands.executeCommand('setContext', 'git.missing', true);
|
commands.executeCommand('setContext', 'git.missing', true);
|
||||||
// warnAboutMissingGit(); {{SQL CARBON EDIT}} turn-off Git missing prompt
|
// warnAboutMissingGit(); {{SQL CARBON EDIT}} turn-off Git missing prompt
|
||||||
@@ -187,36 +185,31 @@ export async function activate(context: ExtensionContext): Promise<GitExtension>
|
|||||||
|
|
||||||
// {{SQL CARBON EDIT}} - Rename info to _info to prevent error due to unused variable
|
// {{SQL CARBON EDIT}} - Rename info to _info to prevent error due to unused variable
|
||||||
async function checkGitVersion(_info: IGit): Promise<void> {
|
async function checkGitVersion(_info: IGit): Promise<void> {
|
||||||
|
return; /* {{SQL CARBON EDIT}} return immediately
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}}
|
const config = workspace.getConfiguration('git');
|
||||||
// remove Git version check for azuredatastudio
|
const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
||||||
|
|
||||||
return;
|
if (shouldIgnore) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// const config = workspace.getConfiguration('git');
|
if (!/^[01]/.test(info.version)) {
|
||||||
// const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// if (shouldIgnore) {
|
const update = localize('updateGit', "Update Git");
|
||||||
// return;
|
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||||
// }
|
|
||||||
|
|
||||||
// if (!/^[01]/.test(info.version)) {
|
const choice = await window.showWarningMessage(
|
||||||
// return;
|
localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version),
|
||||||
// }
|
update,
|
||||||
|
neverShowAgain
|
||||||
|
);
|
||||||
|
|
||||||
// const update = localize('updateGit', "Update Git");
|
if (choice === update) {
|
||||||
// const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||||
|
} else if (choice === neverShowAgain) {
|
||||||
// const choice = await window.showWarningMessage(
|
await config.update('ignoreLegacyWarning', true, true);
|
||||||
// localize('git20', "You seem to have git {0} installed. Code works best with git >= 2", info.version),
|
}*/
|
||||||
// update,
|
|
||||||
// neverShowAgain
|
|
||||||
// );
|
|
||||||
|
|
||||||
// if (choice === update) {
|
|
||||||
// commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
|
||||||
// } else if (choice === neverShowAgain) {
|
|
||||||
// await config.update('ignoreLegacyWarning', true, true);
|
|
||||||
// }
|
|
||||||
// {{SQL CARBON EDIT}} - End
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
# Licensed under the Source EULA. See License.txt in the project root for license information.
|
# Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
|
||||||
function realpath() { /usr/bin/python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
|
function realpath() { python -c "import os,sys; print(os.path.realpath(sys.argv[1]))" "$0"; }
|
||||||
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"
|
CONTENTS="$(dirname "$(dirname "$(dirname "$(dirname "$(realpath "$0")")")")")"
|
||||||
ELECTRON="$CONTENTS/MacOS/Electron"
|
ELECTRON="$CONTENTS/MacOS/Electron"
|
||||||
CLI="$CONTENTS/Resources/app/out/cli.js"
|
CLI="$CONTENTS/Resources/app/out/cli.js"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ fi
|
|||||||
|
|
||||||
cd $ROOT
|
cd $ROOT
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
NAME=`node -p "require('./product.json').nameLong"`
|
NAME=`node -p "require('./product.json').nameLong"`
|
||||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||||
else
|
else
|
||||||
@@ -32,7 +32,7 @@ test -d node_modules || yarn
|
|||||||
yarn electron
|
yarn electron
|
||||||
|
|
||||||
# Unit Tests
|
# Unit Tests
|
||||||
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
cd $ROOT ; ulimit -n 4096 ; \
|
cd $ROOT ; ulimit -n 4096 ; \
|
||||||
ELECTRON_ENABLE_LOGGING=1 \
|
ELECTRON_ENABLE_LOGGING=1 \
|
||||||
"$CODE" \
|
"$CODE" \
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
gulp --max_old_space_size=2000 watch || { echo 'gulp electron failed' ; exit 1; }
|
|
||||||
10
src/typings/semver-umd.d.ts
vendored
10
src/typings/semver-umd.d.ts
vendored
@@ -1,10 +0,0 @@
|
|||||||
/*---------------------------------------------------------------------------------------------
|
|
||||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
||||||
*--------------------------------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
declare module 'semver-umd' {
|
|
||||||
|
|
||||||
export * from "semver";
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -695,6 +695,39 @@ suite('TelemetryService', () => {
|
|||||||
this.clock.tick(ErrorTelemetry.ERROR_FLUSH_TIMEOUT);
|
this.clock.tick(ErrorTelemetry.ERROR_FLUSH_TIMEOUT);
|
||||||
await service.join();
|
await service.join();
|
||||||
|
|
||||||
|
assert.notEqual(testAppender.events[0].data.msg.indexOf(settings.noSuchFilePrefix), -1);
|
||||||
|
assert.equal(testAppender.events[0].data.msg.indexOf(settings.personalInfo), -1);
|
||||||
|
assert.equal(testAppender.events[0].data.msg.indexOf(settings.filePrefix), -1);
|
||||||
|
assert.notEqual(testAppender.events[0].data.callstack.indexOf(settings.noSuchFilePrefix), -1);
|
||||||
|
assert.equal(testAppender.events[0].data.callstack.indexOf(settings.personalInfo), -1);
|
||||||
|
assert.equal(testAppender.events[0].data.callstack.indexOf(settings.filePrefix), -1);
|
||||||
|
assert.notEqual(testAppender.events[0].data.callstack.indexOf(settings.stack[4].replace(settings.randomUserFile, settings.anonymizedRandomUserFile)), -1);
|
||||||
|
assert.equal(testAppender.events[0].data.callstack.split('\n').length, settings.stack.length);
|
||||||
|
errorTelemetry.dispose();
|
||||||
|
service.dispose();
|
||||||
|
} finally {
|
||||||
|
Errors.setUnexpectedErrorHandler(origErrorHandler);
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
test.skip('Uncaught Error Telemetry removes PII but preserves No Such File error message', sinon.test(async function (this: any) { // {{SQL CARBON EDIT}} skip tests
|
||||||
|
let origErrorHandler = Errors.errorHandler.getUnexpectedErrorHandler();
|
||||||
|
Errors.setUnexpectedErrorHandler(() => { });
|
||||||
|
try {
|
||||||
|
let errorStub = sinon.stub();
|
||||||
|
window.onerror = errorStub;
|
||||||
|
let settings = new ErrorTestingSettings();
|
||||||
|
let testAppender = new TestTelemetryAppender();
|
||||||
|
let service = new JoinableTelemetryService({ appender: testAppender }, undefined!);
|
||||||
|
const errorTelemetry = new ErrorTelemetry(service);
|
||||||
|
let noSuchFileError: any = new Error('noSuchFileMessage');
|
||||||
|
noSuchFileError.stack = settings.stack;
|
||||||
|
(<any>window.onerror)(settings.noSuchFileMessage, 'test.js', 2, 42, noSuchFileError);
|
||||||
|
this.clock.tick(ErrorTelemetry.ERROR_FLUSH_TIMEOUT);
|
||||||
|
await service.join();
|
||||||
|
assert.equal(errorStub.callCount, 1);
|
||||||
|
// Test that no file information remains, but this particular
|
||||||
|
// error message does (ENOENT: no such file or directory)
|
||||||
|
Errors.onUnexpectedError(noSuchFileError);
|
||||||
assert.notEqual(testAppender.events[0].data.msg.indexOf(settings.noSuchFilePrefix), -1);
|
assert.notEqual(testAppender.events[0].data.msg.indexOf(settings.noSuchFilePrefix), -1);
|
||||||
assert.equal(testAppender.events[0].data.msg.indexOf(settings.personalInfo), -1);
|
assert.equal(testAppender.events[0].data.msg.indexOf(settings.personalInfo), -1);
|
||||||
assert.equal(testAppender.events[0].data.msg.indexOf(settings.filePrefix), -1);
|
assert.equal(testAppender.events[0].data.msg.indexOf(settings.filePrefix), -1);
|
||||||
|
|||||||
@@ -263,22 +263,22 @@ MenuRegistry.appendMenuItem(MenuId.CommandPalette, {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// {{SQL CARBON EDIT}} - Disable unused menu item
|
/* {{SQL CARBON EDIT}} - Disable unused menu item
|
||||||
// MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||||
// group: '3_snippets',
|
group: '3_snippets',
|
||||||
// command: {
|
command: {
|
||||||
// id,
|
id,
|
||||||
// title: nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets")
|
title: nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets")
|
||||||
// },
|
},
|
||||||
// order: 1
|
order: 1
|
||||||
// });
|
});
|
||||||
|
|
||||||
// MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||||
// group: '3_snippets',
|
group: '3_snippets',
|
||||||
// command: {
|
command: {
|
||||||
// id,
|
id,
|
||||||
// title: nls.localize('userSnippets', "User Snippets")
|
title: nls.localize('userSnippets', "User Snippets")
|
||||||
// },
|
},
|
||||||
// order: 1
|
order: 1
|
||||||
// });
|
});
|
||||||
// {{SQL CARBON EDIT}} - End
|
*/
|
||||||
|
|||||||
@@ -256,9 +256,7 @@ export class Code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async waitForWindowIds(fn: (windowIds: number[]) => boolean): Promise<void> {
|
async waitForWindowIds(fn: (windowIds: number[]) => boolean): Promise<void> {
|
||||||
// {{SQL CARBON EDIT}}
|
await poll(() => this.driver.getWindowIds(), fn, `get window ids`, 600, 100); // {{SQL CARBON EDIT}}
|
||||||
await poll(() => this.driver.getWindowIds(), fn, `get window ids`, 600, 100);
|
|
||||||
// {{END}}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async dispatchKeybinding(keybinding: string): Promise<void> {
|
async dispatchKeybinding(keybinding: string): Promise<void> {
|
||||||
|
|||||||
Reference in New Issue
Block a user