mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -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/*.node
|
||||
|
||||
emmet/node_modules/**
|
||||
|
||||
pty.js/build/**
|
||||
!pty.js/build/Release/**
|
||||
|
||||
# START SQL Modules
|
||||
|
||||
@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
|
||||
'!**/package.json',
|
||||
'!**/package-lock.json', // {{SQL CARBON EDIT}}
|
||||
'!**/yarn.lock',
|
||||
'!**/yarn-error.log',
|
||||
|
||||
@@ -406,7 +405,7 @@ function createGitIndexVinyls(paths) {
|
||||
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) {
|
||||
return e(err);
|
||||
}
|
||||
|
||||
@@ -32,12 +32,11 @@ function log(prefix: string, message: string): void {
|
||||
fancyLog(ansiColors.cyan('[' + prefix + ']'), message);
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
export function loaderConfig(emptyPaths?: string[]) {
|
||||
const result: any = {
|
||||
paths: {
|
||||
'vs': 'out-build/vs',
|
||||
'sql': 'out-build/sql',
|
||||
'sql': 'out-build/sql', // {{SQL CARBON EDIT}}
|
||||
'vscode': 'empty:'
|
||||
},
|
||||
nodeModules: emptyPaths || []
|
||||
|
||||
@@ -92,55 +92,54 @@ async function createModel(context: ExtensionContext, outputChannel: OutputChann
|
||||
return model;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - Comment out function that is unused due to our edit below
|
||||
// async function isGitRepository(folder: WorkspaceFolder): Promise<boolean> {
|
||||
// if (folder.uri.scheme !== 'file') {
|
||||
// return false;
|
||||
// }
|
||||
/* {{SQL CARBON EDIT}} - Comment out function that is unused due to our edit below
|
||||
async function isGitRepository(folder: WorkspaceFolder): Promise<boolean> {
|
||||
if (folder.uri.scheme !== 'file') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// const dotGit = path.join(folder.uri.fsPath, '.git');
|
||||
const dotGit = path.join(folder.uri.fsPath, '.git');
|
||||
|
||||
// try {
|
||||
// const dotGitStat = await new Promise<fs.Stats>((c, e) => fs.stat(dotGit, (err, stat) => err ? e(err) : c(stat)));
|
||||
// return dotGitStat.isDirectory();
|
||||
// } catch (err) {
|
||||
// return false;
|
||||
// }
|
||||
// }
|
||||
try {
|
||||
const dotGitStat = await new Promise<fs.Stats>((c, e) => fs.stat(dotGit, (err, stat) => err ? e(err) : c(stat)));
|
||||
return dotGitStat.isDirectory();
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} - Comment out function that is unused due to our edit below
|
||||
// async function warnAboutMissingGit(): Promise<void> {
|
||||
// const config = workspace.getConfiguration('git');
|
||||
// const shouldIgnore = config.get<boolean>('ignoreMissingGitWarning') === true;
|
||||
async function warnAboutMissingGit(): Promise<void> {
|
||||
const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreMissingGitWarning') === true;
|
||||
|
||||
// if (shouldIgnore) {
|
||||
// return;
|
||||
// }
|
||||
if (shouldIgnore) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if (!workspace.workspaceFolders) {
|
||||
// return;
|
||||
// }
|
||||
if (!workspace.workspaceFolders) {
|
||||
return;
|
||||
}
|
||||
|
||||
// const areGitRepositories = await Promise.all(workspace.workspaceFolders.map(isGitRepository));
|
||||
const areGitRepositories = await Promise.all(workspace.workspaceFolders.map(isGitRepository));
|
||||
|
||||
// if (areGitRepositories.every(isGitRepository => !isGitRepository)) {
|
||||
// return;
|
||||
// }
|
||||
if (areGitRepositories.every(isGitRepository => !isGitRepository)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// const download = localize('downloadgit', "Download Git");
|
||||
// const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
// const choice = await window.showWarningMessage(
|
||||
// localize('notfound', "Git not found. Install it or configure it using the 'git.path' setting."),
|
||||
// download,
|
||||
// neverShowAgain
|
||||
// );
|
||||
const download = localize('downloadgit', "Download Git");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
const choice = await window.showWarningMessage(
|
||||
localize('notfound', "Git not found. Install it or configure it using the 'git.path' setting."),
|
||||
download,
|
||||
neverShowAgain
|
||||
);
|
||||
|
||||
// if (choice === download) {
|
||||
// commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||
// } else if (choice === neverShowAgain) {
|
||||
// await config.update('ignoreMissingGitWarning', true, true);
|
||||
// }
|
||||
// }
|
||||
if (choice === download) {
|
||||
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||
} else if (choice === neverShowAgain) {
|
||||
await config.update('ignoreMissingGitWarning', true, true);
|
||||
}
|
||||
}*/
|
||||
|
||||
export async function activate(context: ExtensionContext): Promise<GitExtension> {
|
||||
const disposables: Disposable[] = [];
|
||||
@@ -174,9 +173,8 @@ export async function activate(context: ExtensionContext): Promise<GitExtension>
|
||||
throw err;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}} turn-off Git missing prompt
|
||||
// console.warn(err.message);
|
||||
// outputChannel.appendLine(err.message);
|
||||
// console.warn(err.message); {{SQL CARBON EDIT}} turn-off Git missing prompt
|
||||
// outputChannel.appendLine(err.message); {{SQL CARBON EDIT}} turn-off Git missing prompt
|
||||
|
||||
commands.executeCommand('setContext', 'git.missing', true);
|
||||
// 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
|
||||
async function checkGitVersion(_info: IGit): Promise<void> {
|
||||
return; /* {{SQL CARBON EDIT}} return immediately
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
// remove Git version check for azuredatastudio
|
||||
const config = workspace.getConfiguration('git');
|
||||
const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
||||
|
||||
return;
|
||||
if (shouldIgnore) {
|
||||
return;
|
||||
}
|
||||
|
||||
// const config = workspace.getConfiguration('git');
|
||||
// const shouldIgnore = config.get<boolean>('ignoreLegacyWarning') === true;
|
||||
if (!/^[01]/.test(info.version)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// if (shouldIgnore) {
|
||||
// return;
|
||||
// }
|
||||
const update = localize('updateGit', "Update Git");
|
||||
const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
|
||||
// if (!/^[01]/.test(info.version)) {
|
||||
// return;
|
||||
// }
|
||||
const choice = await window.showWarningMessage(
|
||||
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");
|
||||
// const neverShowAgain = localize('neverShowAgain', "Don't Show Again");
|
||||
|
||||
// const choice = await window.showWarningMessage(
|
||||
// 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
|
||||
if (choice === update) {
|
||||
commands.executeCommand('vscode.open', Uri.parse('https://git-scm.com/'));
|
||||
} else if (choice === neverShowAgain) {
|
||||
await config.update('ignoreLegacyWarning', true, true);
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# 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")")")")")"
|
||||
ELECTRON="$CONTENTS/MacOS/Electron"
|
||||
CLI="$CONTENTS/Resources/app/out/cli.js"
|
||||
|
||||
@@ -10,7 +10,7 @@ fi
|
||||
|
||||
cd $ROOT
|
||||
|
||||
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
NAME=`node -p "require('./product.json').nameLong"`
|
||||
CODE="./.build/electron/$NAME.app/Contents/MacOS/Electron"
|
||||
else
|
||||
@@ -32,7 +32,7 @@ test -d node_modules || yarn
|
||||
yarn electron
|
||||
|
||||
# Unit Tests
|
||||
if [[ "$OSTYPE" == "darwin"* ]] || [[ "$AGENT_OS" == "Darwin"* ]]; then
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
cd $ROOT ; ulimit -n 4096 ; \
|
||||
ELECTRON_ENABLE_LOGGING=1 \
|
||||
"$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);
|
||||
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.equal(testAppender.events[0].data.msg.indexOf(settings.personalInfo), -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
|
||||
// MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
// group: '3_snippets',
|
||||
// command: {
|
||||
// id,
|
||||
// title: nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets")
|
||||
// },
|
||||
// order: 1
|
||||
// });
|
||||
/* {{SQL CARBON EDIT}} - Disable unused menu item
|
||||
MenuRegistry.appendMenuItem(MenuId.MenubarPreferencesMenu, {
|
||||
group: '3_snippets',
|
||||
command: {
|
||||
id,
|
||||
title: nls.localize({ key: 'miOpenSnippets', comment: ['&& denotes a mnemonic'] }, "User &&Snippets")
|
||||
},
|
||||
order: 1
|
||||
});
|
||||
|
||||
// MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
// group: '3_snippets',
|
||||
// command: {
|
||||
// id,
|
||||
// title: nls.localize('userSnippets', "User Snippets")
|
||||
// },
|
||||
// order: 1
|
||||
// });
|
||||
// {{SQL CARBON EDIT}} - End
|
||||
MenuRegistry.appendMenuItem(MenuId.GlobalActivity, {
|
||||
group: '3_snippets',
|
||||
command: {
|
||||
id,
|
||||
title: nls.localize('userSnippets', "User Snippets")
|
||||
},
|
||||
order: 1
|
||||
});
|
||||
*/
|
||||
|
||||
@@ -256,9 +256,7 @@ export class Code {
|
||||
}
|
||||
|
||||
async waitForWindowIds(fn: (windowIds: number[]) => boolean): Promise<void> {
|
||||
// {{SQL CARBON EDIT}}
|
||||
await poll(() => this.driver.getWindowIds(), fn, `get window ids`, 600, 100);
|
||||
// {{END}}
|
||||
await poll(() => this.driver.getWindowIds(), fn, `get window ids`, 600, 100); // {{SQL CARBON EDIT}}
|
||||
}
|
||||
|
||||
async dispatchKeybinding(keybinding: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user