Skip to content

feat: bridge for git initial support #2449

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 29, 2024
Merged

feat: bridge for git initial support #2449

merged 1 commit into from
Aug 29, 2024

Conversation

ishche
Copy link
Contributor

@ishche ishche commented Aug 28, 2024

Checklist:

  • Each of my commits contains one meaningful change
  • I have performed rebase of my branch on top of the development
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@ishche ishche force-pushed the b4g-support branch 2 times, most recently from a50a5ca to 8176a45 Compare August 28, 2024 11:55
@ishche ishche force-pushed the b4g-support branch 2 times, most recently from 82e3ffe to c0cd349 Compare August 28, 2024 12:44
import * as t from "io-ts";
import { isLeft } from "fp-ts/Either";
import { PathReporter } from "io-ts/PathReporter";
import path = require("path");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, prefer VS code APIs which are universal across all environments instead of node specific APIs.

Typical example node:fs => vscode.workspace.fs and node:path => vscode.Uri.

if (pgCfg === undefined) {
return configObject;
}
const dialects: Preprocessor[] = [];
if (!Array.isArray(pgCfg.preprocessor)) {
if (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pgCfg.preprocessor in the else branch may be undefined.

if (typeof pgCfg.preprocessor === "string") {
  dialects.push(pgCfg.preprocessor);
}
else if (Array.isArray(pgCfg.preprocessor)) {
  for (const pp of pgCfg.preprocessor) {
    if (typeof pp === "object" && pp && "name" in pp) {
      dialects.push(pp.name);
    }
    else if (typeof pp === "string") {
      dialects.push(pp);
    }
  }
}
else if (pgCfg.preprocessor && typeof pgCfg.preprocessor === "object" && "name" in pgCfg.preprocessor) {
  dialects.push(pgCfg.preprocessor.name);
}

@ishche ishche force-pushed the b4g-support branch 2 times, most recently from 896da3f to 6beb43a Compare August 29, 2024 10:31
@ishche ishche requested a review from VitGottwald August 29, 2024 10:31
@ishche ishche merged commit 92365c4 into development Aug 29, 2024
17 checks passed
@ishche ishche deleted the b4g-support branch August 29, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants