A library providing SQL language support for the Monaco Editor, including syntax highlighting, code completion, and error diagnostics for multiple SQL dialects. Based on monaco-languages, it supports Hive, Spark, MySQL, PostgreSQL, Flink, Trino, Impala, and a generic SQL mode. Current stable version 1.1.0 requires Node >=18 and monaco-editor >=0.37.1. Released under MIT, actively maintained on GitHub by DTStack. Key differentiator: comprehensive dialect coverage with built-in completion logic, good for embedding SQL editing in web apps running on modern Node.js.
npm install monaco-sql-languagesNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Registers MySQL language support for Monaco Editor and creates an editor instance with sample SQL.
Upgrade Node.js to version 18 or higher.
Update monaco-editor to version 0.37.1 or later.
Import from specific paths like 'monaco-sql-languages/esm' or use dynamic imports to reduce bundle size.
Use 'registerLanguage' instead.
Use 'SQLDialect' enum and 'registerLanguage' which have full type support.
Run 'npm install monaco-editor' (ensure version >=0.37.1).
Use 'import { getCompletions } from 'monaco-sql-languages/esm';' instead.Install the package: 'npm install monaco-sql-languages'. Ensure tsconfig.json includes 'node_modules' in compilerOptions.paths if using custom resolution.
Set 'type': 'module' in package.json or use dynamic import(). For Node <18, upgrade Node.