update dependencies (#633)

* update dependencies

Signed-off-by: Yan Zhang <yanzh@microsoft.com>

* fix tslint

Signed-off-by: Yan Zhang <yanzh@microsoft.com>
This commit is contained in:
Yan Zhang 2019-08-20 13:04:33 +08:00 committed by GitHub
parent 7bc4c86a9b
commit a5407d8e42
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 1328 additions and 3269 deletions

View File

@ -9,7 +9,7 @@ const server_dir = '../java-debug';
gulp.task("tslint", () => { gulp.task("tslint", () => {
return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"]) return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
.pipe(tslint()) .pipe(tslint({formatter: "verbose"}))
.pipe(tslint.report()); .pipe(tslint.report());
}); });

4380
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -526,24 +526,24 @@
"test": "npm run compile && node ./out/test/index.js" "test": "npm run compile && node ./out/test/index.js"
}, },
"devDependencies": { "devDependencies": {
"@types/lodash": "^4.14.116", "@types/lodash": "^4.14.137",
"@types/mocha": "^5.2.5", "@types/mocha": "^5.2.7",
"@types/node": "^8.10.22", "@types/node": "^8.10.51",
"@types/vscode": "^1.32.0", "@types/vscode": "1.32.0",
"cross-env": "^5.2.0", "cross-env": "^5.2.0",
"gulp": "^4.0.0", "gulp": "^4.0.2",
"gulp-tslint": "^8.1.2", "gulp-tslint": "^8.1.4",
"mocha": "^5.2.0", "mocha": "^5.2.0",
"shelljs": "^0.8.2", "shelljs": "^0.8.3",
"ts-loader": "^5.3.3", "ts-loader": "^5.4.5",
"tslint": "^5.7.0", "tslint": "^5.18.0",
"typescript": "^3.0.1", "typescript": "^3.5.3",
"vscode-test": "^1.0.2", "vscode-test": "^1.2.0",
"webpack": "^4.29.3", "webpack": "^4.39.2",
"webpack-cli": "^3.2.3" "webpack-cli": "^3.3.7"
}, },
"dependencies": { "dependencies": {
"lodash": "^4.17.13", "lodash": "^4.17.15",
"vscode-extension-telemetry": "0.1.1", "vscode-extension-telemetry": "0.1.1",
"vscode-extension-telemetry-wrapper": "0.4.0" "vscode-extension-telemetry-wrapper": "0.4.0"
} }

View File

@ -247,6 +247,7 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
return config; return config;
} else { } else {
// Information for diagnostic: // Information for diagnostic:
// tslint:disable-next-line:no-console
console.log("Cannot find a port for debugging session"); console.log("Cannot find a port for debugging session");
throw new Error("Failed to start debug server."); throw new Error("Failed to start debug server.");
} }
@ -302,7 +303,7 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
if (mainEntries.length === 1) { if (mainEntries.length === 1) {
return mainEntries[0]; return mainEntries[0];
} else if (mainEntries.length > 1) { } else if (mainEntries.length > 1) {
return await this.showMainClassQuickPick(this.formatMainClassOptions(mainEntries), return this.showMainClassQuickPick(this.formatMainClassOptions(mainEntries),
`Multiple main classes found in the file '${path.basename(currentFile)}', please select one first.`); `Multiple main classes found in the file '${path.basename(currentFile)}', please select one first.`);
} }
} }
@ -310,13 +311,13 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
const hintMessage = currentFile ? const hintMessage = currentFile ?
`No main class found in the file '${path.basename(currentFile)}', please select main class<project name> again.` : `No main class found in the file '${path.basename(currentFile)}', please select main class<project name> again.` :
"Please select main class<project name>."; "Please select main class<project name>.";
return await this.promptMainClass(folder, hintMessage); return this.promptMainClass(folder, hintMessage);
} }
const containsExternalClasspaths = !_.isEmpty(config.classPaths) || !_.isEmpty(config.modulePaths); const containsExternalClasspaths = !_.isEmpty(config.classPaths) || !_.isEmpty(config.modulePaths);
const validationResponse = await lsPlugin.validateLaunchConfig(folder, config.mainClass, config.projectName, containsExternalClasspaths); const validationResponse = await lsPlugin.validateLaunchConfig(folder, config.mainClass, config.projectName, containsExternalClasspaths);
if (!validationResponse.mainClass.isValid || !validationResponse.projectName.isValid) { if (!validationResponse.mainClass.isValid || !validationResponse.projectName.isValid) {
return await this.fixMainClass(folder, config, validationResponse); return this.fixMainClass(folder, config, validationResponse);
} }
return { return {
@ -504,11 +505,13 @@ async function updateDebugSettings() {
const javaHome = await utility.getJavaHome(); const javaHome = await utility.getJavaHome();
if (debugSettingsRoot.settings && Object.keys(debugSettingsRoot.settings).length) { if (debugSettingsRoot.settings && Object.keys(debugSettingsRoot.settings).length) {
try { try {
// tslint:disable-next-line:no-console
console.log("settings:", await commands.executeJavaLanguageServerCommand(commands.JAVA_UPDATE_DEBUG_SETTINGS, JSON.stringify( console.log("settings:", await commands.executeJavaLanguageServerCommand(commands.JAVA_UPDATE_DEBUG_SETTINGS, JSON.stringify(
{ ...debugSettingsRoot.settings, logLevel, javaHome }))); { ...debugSettingsRoot.settings, logLevel, javaHome })));
} catch (err) { } catch (err) {
// log a warning message and continue, since update settings failure should not block debug session // log a warning message and continue, since update settings failure should not block debug session
console.log("Cannot update debug settings.", err) // tslint:disable-next-line:no-console
console.log("Cannot update debug settings.", err);
} }
} }
} }

View File

@ -43,7 +43,7 @@ class DebugCodeLensContainer implements vscode.Disposable {
this.runCommand = instrumentOperationAsVsCodeCommand(JAVA_RUN_CODELENS_COMMAND, runJavaProgram); this.runCommand = instrumentOperationAsVsCodeCommand(JAVA_RUN_CODELENS_COMMAND, runJavaProgram);
this.debugCommand = instrumentOperationAsVsCodeCommand(JAVA_DEBUG_CODELENS_COMMAND, debugJavaProgram); this.debugCommand = instrumentOperationAsVsCodeCommand(JAVA_DEBUG_CODELENS_COMMAND, debugJavaProgram);
const configuration = vscode.workspace.getConfiguration(JAVA_DEBUG_CONFIGURATION) const configuration = vscode.workspace.getConfiguration(JAVA_DEBUG_CONFIGURATION);
const isCodeLensEnabled = configuration.get<boolean>(ENABLE_CODE_LENS_VARIABLE); const isCodeLensEnabled = configuration.get<boolean>(ENABLE_CODE_LENS_VARIABLE);
if (isCodeLensEnabled) { if (isCodeLensEnabled) {

View File

@ -7,7 +7,7 @@ import { dispose as disposeTelemetryWrapper, initializeFromJsonFile, instrumentO
import * as commands from "./commands"; import * as commands from "./commands";
import { JavaDebugConfigurationProvider } from "./configurationProvider"; import { JavaDebugConfigurationProvider } from "./configurationProvider";
import { HCR_EVENT, JAVA_LANGID, USER_NOTIFICATION_EVENT } from "./constants"; import { HCR_EVENT, JAVA_LANGID, USER_NOTIFICATION_EVENT } from "./constants";
import { initializeCodeLensProvider, startDebugging } from "./debugCodeLensProvider" import { initializeCodeLensProvider, startDebugging } from "./debugCodeLensProvider";
import { handleHotCodeReplaceCustomEvent, initializeHotCodeReplace } from "./hotCodeReplace"; import { handleHotCodeReplaceCustomEvent, initializeHotCodeReplace } from "./hotCodeReplace";
import { IMainMethod, resolveMainMethod } from "./languageServerPlugin"; import { IMainMethod, resolveMainMethod } from "./languageServerPlugin";
import { logger, Type } from "./logger"; import { logger, Type } from "./logger";
@ -135,7 +135,7 @@ async function applyHCR() {
await autobuildConfig.update("enabled", true); await autobuildConfig.update("enabled", true);
// Force an incremental build to avoid auto build is not finishing during HCR. // Force an incremental build to avoid auto build is not finishing during HCR.
try { try {
await commands.executeJavaExtensionCommand(commands.JAVA_BUILD_WORKSPACE, false) await commands.executeJavaExtensionCommand(commands.JAVA_BUILD_WORKSPACE, false);
} catch (err) { } catch (err) {
// do nothing. // do nothing.
} }

View File

@ -73,5 +73,5 @@ export async function detectPreviewFlag(className: string, projectName: string):
const expectedOptions = { const expectedOptions = {
[COMPILER_PB_ENABLE_PREVIEW_FEATURES]: "enabled", [COMPILER_PB_ENABLE_PREVIEW_FEATURES]: "enabled",
}; };
return await checkProjectSettings(className, projectName, true, expectedOptions); return checkProjectSettings(className, projectName, true, expectedOptions);
} }

View File

@ -56,17 +56,17 @@ function logMessage(message: ILoggingMessage): void {
export async function showInformationMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> { export async function showInformationMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> {
logMessage(message); logMessage(message);
return await vscode.window.showInformationMessage(message.message, ...items); return vscode.window.showInformationMessage(message.message, ...items);
} }
export async function showWarningMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> { export async function showWarningMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> {
logMessage(message); logMessage(message);
return await vscode.window.showWarningMessage(message.message, ...items); return vscode.window.showWarningMessage(message.message, ...items);
} }
export async function showErrorMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> { export async function showErrorMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> {
logMessage(message); logMessage(message);
return await vscode.window.showErrorMessage(message.message, ...items); return vscode.window.showErrorMessage(message.message, ...items);
} }
export async function showInformationMessageWithTroubleshooting(message: ITroubleshootingMessage, ...items: string[]): Promise<string | undefined> { export async function showInformationMessageWithTroubleshooting(message: ITroubleshootingMessage, ...items: string[]): Promise<string | undefined> {

View File

@ -17,7 +17,6 @@ async function main(): Promise<void> {
// Download VS Code, unzip it and run the integration test // Download VS Code, unzip it and run the integration test
await runTests({ extensionDevelopmentPath, extensionTestsPath }); await runTests({ extensionDevelopmentPath, extensionTestsPath });
} catch (err) { } catch (err) {
console.error("Failed to run tests");
process.exit(1); process.exit(1);
} }
} }

View File

@ -7,10 +7,11 @@
], ],
"no-unused-expression": true, "no-unused-expression": true,
"no-duplicate-variable": true, "no-duplicate-variable": true,
"max-classes-per-file": [ "max-classes-per-file": false,
false "no-implicit-dependencies": [
false, // Turned off due to: https://github.com/microsoft/vscode/issues/78019
"dev"
], ],
"no-implicit-dependencies": [true, "dev"],
"no-empty": false, "no-empty": false,
"object-literal-sort-keys": false, "object-literal-sort-keys": false,
"curly": true, "curly": true,
@ -24,15 +25,17 @@
"check-separator", "check-separator",
"check-type" "check-type"
], ],
"semicolon": [ "semicolon": true,
"always"
],
"triple-equals": true, "triple-equals": true,
"max-line-length": [ "max-line-length": [
true, true,
150 150
], ],
"no-angle-bracket-type-assertion": false, "no-angle-bracket-type-assertion": false,
"no-console": ["log","error"] "no-console": [
true,
"log",
"error"
]
} }
} }