Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: Update npm modules#710

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 2 commits intomasterfromcs/update-npm-module
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,521 changes: 192 additions & 2,329 deletionspackage-lock.json
View file
Open in desktop

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -672,24 +672,23 @@
"lint": "tslint --project tsconfig.json -e src/*.d.ts -t verbose"
},
"devDependencies": {
"@types/fs-extra": "5.0.0",
"@types/highlight.js": "^9.12.3",
"@types/lodash": "^4.14.123",
"@types/fs-extra": "^9.0.11",
"@types/lodash": "^4.14.170",
"@types/markdown-it": "0.0.7",
"@types/mocha": "^2.2.42",
"@types/node": "^7.0.43",
"@types/node": "^14.14.33",
"@types/require-from-string": "^1.2.0",
"@types/vscode": "1.42.0",
"tslint": "^5.9.1",
"typescript": "^2.6.1"
"tslint": "^5.20.1",
"typescript": "^4.3.2"
},
"dependencies": {
"fs-extra": "^6.0.1",
"highlight.js": "^9.15.6",
"lodash": "^4.17.19",
"fs-extra": "^10.0.0",
"highlight.js": "^10.7.2",
"lodash": "^4.17.21",
"markdown-it": "^8.4.2",
"require-from-string": "^2.0.2",
"unescape-js": "^1.1.1",
"unescape-js": "^1.1.4",
"vsc-leetcode-cli": "2.8.0"
}
}
14 changes: 7 additions & 7 deletionssrc/leetCodeManager.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -83,7 +83,7 @@ class LeetCodeManager extends EventEmitter {
env: createEnvOption(),
});

childProc.stdout.on("data", async (data: string | Buffer) => {
childProc.stdout?.on("data", async (data: string | Buffer) => {
data = data.toString();
leetCodeChannel.append(data);
if (data.includes("twoFactorCode")) {
Expand All@@ -96,19 +96,19 @@ class LeetCodeManager extends EventEmitter {
childProc.kill();
return resolve(undefined);
}
childProc.stdin.write(`${twoFactor}\n`);
childProc.stdin?.write(`${twoFactor}\n`);
}
const successMatch: RegExpMatchArray | null = data.match(this.successRegex);
if (successMatch && successMatch[1]) {
childProc.stdin.end();
childProc.stdin?.end();
return resolve(successMatch[1]);
} else if (data.match(this.failRegex)) {
childProc.stdin.end();
childProc.stdin?.end();
return reject(new Error("Faile to login"));
}
});

childProc.stderr.on("data", (data: string | Buffer) => leetCodeChannel.append(data.toString()));
childProc.stderr?.on("data", (data: string | Buffer) => leetCodeChannel.append(data.toString()));

childProc.on("error", reject);
const name: string | undefined = await vscode.window.showInputBox({
Expand All@@ -120,7 +120,7 @@ class LeetCodeManager extends EventEmitter {
childProc.kill();
return resolve(undefined);
}
childProc.stdin.write(`${name}\n`);
childProc.stdin?.write(`${name}\n`);
const pwd: string | undefined = await vscode.window.showInputBox({
prompt: isByCookie ? "Enter cookie" : "Enter password.",
password: true,
Expand All@@ -131,7 +131,7 @@ class LeetCodeManager extends EventEmitter {
childProc.kill();
return resolve(undefined);
}
childProc.stdin.write(`${pwd}\n`);
childProc.stdin?.write(`${pwd}\n`);
});
if (userName) {
vscode.window.showInformationMessage(`Successfully ${inMessage}.`);
Expand Down
6 changes: 3 additions & 3 deletionssrc/utils/cpUtils.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,13 +15,13 @@ export async function executeCommand(command: string, args: string[], options: c

const childProc: cp.ChildProcess = cp.spawn(command, args, { ...options, env: createEnvOption() });

childProc.stdout.on("data", (data: string | Buffer) => {
childProc.stdout?.on("data", (data: string | Buffer) => {
data = data.toString();
result = result.concat(data);
leetCodeChannel.append(data);
});

childProc.stderr.on("data", (data: string | Buffer) => leetCodeChannel.append(data.toString()));
childProc.stderr?.on("data", (data: string | Buffer) => leetCodeChannel.append(data.toString()));

childProc.on("error", reject);

Expand All@@ -42,7 +42,7 @@ export async function executeCommand(command: string, args: string[], options: c
export async function executeCommandWithProgress(message: string, command: string, args: string[], options: cp.SpawnOptions = { shell: true }): Promise<string> {
let result: string = "";
await vscode.window.withProgress({ location: vscode.ProgressLocation.Notification }, async (p: vscode.Progress<{}>) => {
return new Promise(async (resolve: () => void, reject: (e: Error) => void): Promise<void> => {
return new Promise<void>(async (resolve: () => void, reject: (e: Error) => void): Promise<void> => {
p.report({ message });
try {
result = await executeCommand(command, args, options);
Expand Down
2 changes: 0 additions & 2 deletionssrc/webview/leetCodePreviewProvider.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -130,8 +130,6 @@ class LeetCodePreviewProvider extends LeetCodeWebview {

protected onDidDisposeWebview(): void {
super.onDidDisposeWebview();
delete this.node;
delete this.description;
this.sideMode = false;
}

Expand Down
1 change: 0 additions & 1 deletionsrc/webview/leetCodeSolutionProvider.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -64,7 +64,6 @@ class LeetCodeSolutionProvider extends LeetCodeWebview {

protected onDidDisposeWebview(): void {
super.onDidDisposeWebview();
delete this.solution;
}

private parseSolution(raw: string): Solution {
Expand Down
1 change: 0 additions & 1 deletionsrc/webview/leetCodeSubmissionProvider.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -59,7 +59,6 @@ class LeetCodeSubmissionProvider extends LeetCodeWebview {

protected onDidDisposeWebview(): void {
super.onDidDisposeWebview();
delete this.result;
}

private async showKeybindingsHint(): Promise<void> {
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp