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:
parent
7bc4c86a9b
commit
a5407d8e42
|
@ -9,7 +9,7 @@ const server_dir = '../java-debug';
|
|||
|
||||
gulp.task("tslint", () => {
|
||||
return gulp.src(["**/*.ts", "!**/*.d.ts", "!node_modules/**", "!./src/views/node_modules/**"])
|
||||
.pipe(tslint())
|
||||
.pipe(tslint({formatter: "verbose"}))
|
||||
.pipe(tslint.report());
|
||||
});
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
|
@ -526,24 +526,24 @@
|
|||
"test": "npm run compile && node ./out/test/index.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash": "^4.14.116",
|
||||
"@types/mocha": "^5.2.5",
|
||||
"@types/node": "^8.10.22",
|
||||
"@types/vscode": "^1.32.0",
|
||||
"@types/lodash": "^4.14.137",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "^8.10.51",
|
||||
"@types/vscode": "1.32.0",
|
||||
"cross-env": "^5.2.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-tslint": "^8.1.2",
|
||||
"gulp": "^4.0.2",
|
||||
"gulp-tslint": "^8.1.4",
|
||||
"mocha": "^5.2.0",
|
||||
"shelljs": "^0.8.2",
|
||||
"ts-loader": "^5.3.3",
|
||||
"tslint": "^5.7.0",
|
||||
"typescript": "^3.0.1",
|
||||
"vscode-test": "^1.0.2",
|
||||
"webpack": "^4.29.3",
|
||||
"webpack-cli": "^3.2.3"
|
||||
"shelljs": "^0.8.3",
|
||||
"ts-loader": "^5.4.5",
|
||||
"tslint": "^5.18.0",
|
||||
"typescript": "^3.5.3",
|
||||
"vscode-test": "^1.2.0",
|
||||
"webpack": "^4.39.2",
|
||||
"webpack-cli": "^3.3.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"lodash": "^4.17.13",
|
||||
"lodash": "^4.17.15",
|
||||
"vscode-extension-telemetry": "0.1.1",
|
||||
"vscode-extension-telemetry-wrapper": "0.4.0"
|
||||
}
|
||||
|
|
|
@ -247,6 +247,7 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
|
|||
return config;
|
||||
} else {
|
||||
// Information for diagnostic:
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log("Cannot find a port for debugging session");
|
||||
throw new Error("Failed to start debug server.");
|
||||
}
|
||||
|
@ -302,7 +303,7 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
|
|||
if (mainEntries.length === 1) {
|
||||
return mainEntries[0];
|
||||
} 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.`);
|
||||
}
|
||||
}
|
||||
|
@ -310,13 +311,13 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
|
|||
const hintMessage = currentFile ?
|
||||
`No main class found in the file '${path.basename(currentFile)}', please select main class<project name> again.` :
|
||||
"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 validationResponse = await lsPlugin.validateLaunchConfig(folder, config.mainClass, config.projectName, containsExternalClasspaths);
|
||||
if (!validationResponse.mainClass.isValid || !validationResponse.projectName.isValid) {
|
||||
return await this.fixMainClass(folder, config, validationResponse);
|
||||
return this.fixMainClass(folder, config, validationResponse);
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -504,11 +505,13 @@ async function updateDebugSettings() {
|
|||
const javaHome = await utility.getJavaHome();
|
||||
if (debugSettingsRoot.settings && Object.keys(debugSettingsRoot.settings).length) {
|
||||
try {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log("settings:", await commands.executeJavaLanguageServerCommand(commands.JAVA_UPDATE_DEBUG_SETTINGS, JSON.stringify(
|
||||
{ ...debugSettingsRoot.settings, logLevel, javaHome })));
|
||||
} catch (err) {
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ class DebugCodeLensContainer implements vscode.Disposable {
|
|||
this.runCommand = instrumentOperationAsVsCodeCommand(JAVA_RUN_CODELENS_COMMAND, runJavaProgram);
|
||||
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);
|
||||
|
||||
if (isCodeLensEnabled) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import { dispose as disposeTelemetryWrapper, initializeFromJsonFile, instrumentO
|
|||
import * as commands from "./commands";
|
||||
import { JavaDebugConfigurationProvider } from "./configurationProvider";
|
||||
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 { IMainMethod, resolveMainMethod } from "./languageServerPlugin";
|
||||
import { logger, Type } from "./logger";
|
||||
|
@ -135,7 +135,7 @@ async function applyHCR() {
|
|||
await autobuildConfig.update("enabled", true);
|
||||
// Force an incremental build to avoid auto build is not finishing during HCR.
|
||||
try {
|
||||
await commands.executeJavaExtensionCommand(commands.JAVA_BUILD_WORKSPACE, false)
|
||||
await commands.executeJavaExtensionCommand(commands.JAVA_BUILD_WORKSPACE, false);
|
||||
} catch (err) {
|
||||
// do nothing.
|
||||
}
|
||||
|
|
|
@ -73,5 +73,5 @@ export async function detectPreviewFlag(className: string, projectName: string):
|
|||
const expectedOptions = {
|
||||
[COMPILER_PB_ENABLE_PREVIEW_FEATURES]: "enabled",
|
||||
};
|
||||
return await checkProjectSettings(className, projectName, true, expectedOptions);
|
||||
return checkProjectSettings(className, projectName, true, expectedOptions);
|
||||
}
|
||||
|
|
|
@ -56,17 +56,17 @@ function logMessage(message: ILoggingMessage): void {
|
|||
|
||||
export async function showInformationMessage(message: ILoggingMessage, ...items: string[]): Promise<string | undefined> {
|
||||
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> {
|
||||
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> {
|
||||
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> {
|
||||
|
|
|
@ -17,7 +17,6 @@ async function main(): Promise<void> {
|
|||
// Download VS Code, unzip it and run the integration test
|
||||
await runTests({ extensionDevelopmentPath, extensionTestsPath });
|
||||
} catch (err) {
|
||||
console.error("Failed to run tests");
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
|
19
tslint.json
19
tslint.json
|
@ -7,10 +7,11 @@
|
|||
],
|
||||
"no-unused-expression": true,
|
||||
"no-duplicate-variable": true,
|
||||
"max-classes-per-file": [
|
||||
false
|
||||
"max-classes-per-file": 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,
|
||||
"object-literal-sort-keys": false,
|
||||
"curly": true,
|
||||
|
@ -24,15 +25,17 @@
|
|||
"check-separator",
|
||||
"check-type"
|
||||
],
|
||||
"semicolon": [
|
||||
"always"
|
||||
],
|
||||
"semicolon": true,
|
||||
"triple-equals": true,
|
||||
"max-line-length": [
|
||||
true,
|
||||
150
|
||||
],
|
||||
],
|
||||
"no-angle-bracket-type-assertion": false,
|
||||
"no-console": ["log","error"]
|
||||
"no-console": [
|
||||
true,
|
||||
"log",
|
||||
"error"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue