Skip to content
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

Add psql dialect in editor #6065

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Changes from all 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
8 changes: 8 additions & 0 deletions app/assets/javascripts/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@
return import("@replit/codemirror-lang-csharp").then(m => m.csharp());
}
}),
LanguageDescription.of({
name: "postgresql",
alias: ["psql"],
extensions: ["sql"],
load() {
return import("@codemirror/lang-sql").then(m => m.sql({ dialect: m.PostgreSQL }));

Check warning on line 184 in app/assets/javascripts/editor.ts

View check run for this annotation

Codecov / codecov/patch

app/assets/javascripts/editor.ts#L183-L184

Added lines #L183 - L184 were not covered by tests
}
})
Comment on lines +179 to +186
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Add missing direct dependency to package.json

Add @codemirror/lang-sql to your package.json dependencies:

{
  "dependencies": {
    "@codemirror/lang-sql": "^6.0.0"
  }
}
🔗 Analysis chain

Verify package dependency.

Ensure that @codemirror/lang-sql is added as a dependency in the project's package.json.

Let's verify the dependency:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the package is listed in package.json
jq '.dependencies["@codemirror/lang-sql"] // .devDependencies["@codemirror/lang-sql"]' package.json

# Check if the package is imported elsewhere
rg "@codemirror/lang-sql"

Length of output: 482

];


Expand Down
Loading