diff --git a/CHANGELOG.md b/CHANGELOG.md index 97cf4c20..c159b3e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,41 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.15.1](https://github.com/DTStack/monaco-sql-languages/compare/v0.15.0...v0.15.1) (2025-06-06) + + +### Bug Fixes + +* [#166](https://github.com/DTStack/monaco-sql-languages/issues/166) upgrade dt-sql-parser version ([#183](https://github.com/DTStack/monaco-sql-languages/issues/183)) ([fea3c3c](https://github.com/DTStack/monaco-sql-languages/commit/fea3c3c79682eed760dd7c00a4a5b830a60d9565)) + +## [0.15.0](https://github.com/DTStack/monaco-sql-languages/compare/v0.14.0...v0.15.0) (2025-05-16) + + +### Features + +* **sqlParser:** upgrade dt-sql-parser@4.3.0 ([58a4304](https://github.com/DTStack/monaco-sql-languages/commit/58a430403d2f3a97e91c500e14d9fd3f4be7427c)) + +## [0.14.0](https://github.com/DTStack/monaco-sql-languages/compare/v0.13.1...v0.14.0) (2025-05-09) + + +### Features + +* **dependency:** upgrade dt-sql-parser@4.2.0 ([6d0d6c2](https://github.com/DTStack/monaco-sql-languages/commit/6d0d6c26c80a31325dd8c400b43ab331dab9ac95)) +* support built-in sql snippets ([#154](https://github.com/DTStack/monaco-sql-languages/issues/154)) ([a5d68bb](https://github.com/DTStack/monaco-sql-languages/commit/a5d68bbb32d219715d4caf6abcb9b98cc754b861)) + + +### Bug Fixes + +* **scripts:** resolve configuration conflicts ([76d728c](https://github.com/DTStack/monaco-sql-languages/commit/76d728ce75c75dea0e0eaf69b2b9bba44c644952)) + +### [0.13.1](https://github.com/DTStack/monaco-sql-languages/compare/v0.13.0...v0.13.1) (2025-02-17) + + +### Features + +* [#167](https://github.com/DTStack/monaco-sql-languages/issues/167) support dt highlight style ([#168](https://github.com/DTStack/monaco-sql-languages/issues/168)) ([7beb537](https://github.com/DTStack/monaco-sql-languages/commit/7beb5373a40317a7ecd18a9cc66f5f133e27345b)) +* update dt-sql-parser's version ([#174](https://github.com/DTStack/monaco-sql-languages/issues/174)) ([159df20](https://github.com/DTStack/monaco-sql-languages/commit/159df20946198d549705afb61cbbdc7ef72e7d88)) + ## [0.13.0](https://github.com/DTStack/monaco-sql-languages/compare/v0.12.1...v0.13.0) (2025-02-13) diff --git a/package.json b/package.json index 4ed60883..82f749ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "monaco-sql-languages", - "version": "0.13.0", + "version": "0.15.1", "description": "SQL languages for the Monaco Editor, based on monaco-languages.", "scripts": { "prepublishOnly": "npm run build", @@ -66,9 +66,6 @@ "simple-git-hooks": { "pre-commit": "npx pretty-quick --staged" }, - "dependencies": { - "dt-sql-parser": "4.2.0" - }, "peerDependencies": { "monaco-editor": ">=0.31.0" }, @@ -85,5 +82,8 @@ "*": [ "prettier --write --ignore-unknown" ] + }, + "dependencies": { + "dt-sql-parser": "4.3.1" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 986d2d9f..c8202e3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: dt-sql-parser: - specifier: 4.2.0 - version: 4.2.0(antlr4ng-cli@1.0.7) + specifier: 4.3.1 + version: 4.3.1(antlr4ng-cli@1.0.7) devDependencies: '@commitlint/cli': specifier: ^17.7.2 @@ -715,8 +715,8 @@ packages: resolution: {integrity: sha512-sCm11ak2oY6DglEPpCB8TixLjWAxd3kJTs6UIcSasNYxXdFPV+YKlye92c8H4kKFqV5qYMIh7d+cYecEg0dIkA==} engines: {node: '>=6'} - dt-sql-parser@4.2.0: - resolution: {integrity: sha512-tsTHGNGIeTd7xACh8FNzSCaQHYyITJeSTMZPxGFkROiccPxj82uEqOeUgJ+bYof9hEacf4h61LsiMyxPy+tl7g==} + dt-sql-parser@4.3.1: + resolution: {integrity: sha512-WlFB9of+ChwWtc5M222jHGIpzqHx51szLe/11GAwwbA+4hRaVkMpWMf2bbYj4i855edSoTQ52zyLJVOpe+4OVg==} engines: {node: '>=18'} email-addresses@3.1.0: @@ -1497,7 +1497,6 @@ packages: engines: {node: '>=0.6.0', teleport: '>=0.2.0'} deprecated: |- You or someone you depend on is using Q, the JavaScript Promise library that gave JavaScript developers strong feelings about promises. They can almost certainly migrate to the native JavaScript promise now. Thank you literally everyone for joining me in this bet against the odds. Be excellent to each other. - (For a CapTP with native promises, see @endo/eventual-send and @endo/captp) querystringify@2.2.0: @@ -2062,7 +2061,7 @@ snapshots: '@types/node': 20.5.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.5.4) - cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.4))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.4))(typescript@5.5.4) + cosmiconfig-typescript-loader: 4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.4))(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -2578,7 +2577,7 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.4))(ts-node@10.9.2(@types/node@20.5.1)(typescript@5.5.4))(typescript@5.5.4): + cosmiconfig-typescript-loader@4.4.0(@types/node@20.5.1)(cosmiconfig@8.3.6(typescript@5.5.4))(ts-node@10.9.2(@types/node@20.14.14)(typescript@5.5.4))(typescript@5.5.4): dependencies: '@types/node': 20.5.1 cosmiconfig: 8.3.6(typescript@5.5.4) @@ -2704,7 +2703,7 @@ snapshots: find-up: 3.0.0 minimatch: 3.1.2 - dt-sql-parser@4.2.0(antlr4ng-cli@1.0.7): + dt-sql-parser@4.3.1(antlr4ng-cli@1.0.7): dependencies: antlr4-c3: 3.3.7(antlr4ng-cli@1.0.7) antlr4ng: 2.0.11(antlr4ng-cli@1.0.7) diff --git a/src/languages/flink/flink.ts b/src/languages/flink/flink.ts index c3d0b5f2..dec89534 100644 --- a/src/languages/flink/flink.ts +++ b/src/languages/flink/flink.ts @@ -489,13 +489,14 @@ export const language = { { include: '@comments' }, { include: '@whitespace' }, { include: '@pseudoColumns' }, + { include: '@customParams' }, { include: '@numbers' }, { include: '@strings' }, { include: '@complexIdentifiers' }, { include: '@scopes' }, { include: '@complexDataTypes' }, { include: '@complexFunctions' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@#$]+/, @@ -535,6 +536,10 @@ export const language = { } ] ], + customParams: [ + [/\${[A-Za-z0-9._-]*}/, TokenClassConsts.VARIABLE], + [/\@\@{[A-Za-z0-9._-]*}/, TokenClassConsts.VARIABLE] + ], numbers: [ [/0[xX][0-9a-fA-F]*/, TokenClassConsts.NUMBER_HEX], [/[$][+-]*\d*(\.\d*)?/, TokenClassConsts.NUMBER], diff --git a/src/languages/hive/hive.ts b/src/languages/hive/hive.ts index 9f18e6a3..151a1bfd 100644 --- a/src/languages/hive/hive.ts +++ b/src/languages/hive/hive.ts @@ -515,7 +515,7 @@ export const language = { { include: '@complexIdentifiers' }, { include: '@scopes' }, { include: '@complexDataTypes' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@#$]+/, diff --git a/src/languages/impala/impala.ts b/src/languages/impala/impala.ts index 92b71bd2..0991684a 100644 --- a/src/languages/impala/impala.ts +++ b/src/languages/impala/impala.ts @@ -474,7 +474,7 @@ export const language = { { include: '@scopes' }, { include: '@complexDataTypes' }, { include: '@complexOperators' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@#$]+/, diff --git a/src/languages/mysql/mysql.ts b/src/languages/mysql/mysql.ts index 4545430d..616438c9 100644 --- a/src/languages/mysql/mysql.ts +++ b/src/languages/mysql/mysql.ts @@ -911,7 +911,7 @@ export const language = { { include: '@complexIdentifiers' }, { include: '@scopes' }, { include: '@complexOperators' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@]+/, diff --git a/src/languages/pgsql/pgsql.ts b/src/languages/pgsql/pgsql.ts index acfb0d69..7c49cd23 100644 --- a/src/languages/pgsql/pgsql.ts +++ b/src/languages/pgsql/pgsql.ts @@ -980,7 +980,7 @@ export const language = { { include: '@complexIdentifiers' }, { include: '@scopes' }, { include: '@complexDataTypes' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@#$]+/, diff --git a/src/languages/spark/spark.ts b/src/languages/spark/spark.ts index 3d5689df..b5440e90 100644 --- a/src/languages/spark/spark.ts +++ b/src/languages/spark/spark.ts @@ -699,7 +699,7 @@ export const language = { { include: '@complexIdentifiers' }, { include: '@scopes' }, { include: '@complexDataTypes' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@#$]+/, diff --git a/src/languages/trino/trino.ts b/src/languages/trino/trino.ts index 93c9b936..3d90a391 100644 --- a/src/languages/trino/trino.ts +++ b/src/languages/trino/trino.ts @@ -636,7 +636,7 @@ export const language = { { include: '@complexIdentifiers' }, { include: '@scopes' }, { include: '@complexDataTypes' }, - [/[;,.]/, TokenClassConsts.DELIMITER], + [/[:;,.]/, TokenClassConsts.DELIMITER], [/[\(\)\[\]\{\}]/, '@brackets'], [ /[\w@$-]+/, // https://trino.io/docs/current/language/reserved.html#language-identifiers diff --git a/src/theme/vs-plus/light.ts b/src/theme/vs-plus/light.ts index 78539917..1da1bce6 100644 --- a/src/theme/vs-plus/light.ts +++ b/src/theme/vs-plus/light.ts @@ -8,31 +8,31 @@ export const lightThemeData: editor.IStandaloneThemeData = { base: 'vs', inherit: true, rules: [ - { token: postfixTokenClass(TokenClassConsts.BINARY), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.BINARY_ESCAPE), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.COMMENT), foreground: '008000' }, - { token: postfixTokenClass(TokenClassConsts.COMMENT_QUOTE), foreground: '008000' }, - { token: postfixTokenClass(TokenClassConsts.DELIMITER), foreground: '000000' }, - { token: postfixTokenClass(TokenClassConsts.DELIMITER_CURLY), foreground: '319331' }, - { token: postfixTokenClass(TokenClassConsts.DELIMITER_PAREN), foreground: '0431fa' }, - { token: postfixTokenClass(TokenClassConsts.DELIMITER_SQUARE), foreground: '0431fa' }, - { token: postfixTokenClass(TokenClassConsts.IDENTIFIER), foreground: '001080' }, - { token: postfixTokenClass(TokenClassConsts.IDENTIFIER_QUOTE), foreground: '001080' }, - { token: postfixTokenClass(TokenClassConsts.KEYWORD), foreground: '0000ff' }, - { token: postfixTokenClass(TokenClassConsts.KEYWORD_SCOPE), foreground: 'af00db' }, - { token: postfixTokenClass(TokenClassConsts.NUMBER), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.NUMBER_FLOAT), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.NUMBER_BINARY), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.NUMBER_OCTAL), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.NUMBER_HEX), foreground: '098658' }, - { token: postfixTokenClass(TokenClassConsts.OPERATOR), foreground: '000000' }, - { token: postfixTokenClass(TokenClassConsts.OPERATOR_KEYWORD), foreground: '0000ff' }, - { token: postfixTokenClass(TokenClassConsts.OPERATOR_SYMBOL), foreground: '000000' }, - { token: postfixTokenClass(TokenClassConsts.PREDEFINED), foreground: '795e26' }, - { token: postfixTokenClass(TokenClassConsts.STRING), foreground: 'a31515' }, - { token: postfixTokenClass(TokenClassConsts.STRING_ESCAPE), foreground: 'a31515' }, - { token: postfixTokenClass(TokenClassConsts.TYPE), foreground: '267f99' }, - { token: postfixTokenClass(TokenClassConsts.VARIABLE), foreground: '4fc1ff' } + { token: postfixTokenClass(TokenClassConsts.BINARY), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.BINARY_ESCAPE), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.NUMBER), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.NUMBER_FLOAT), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.NUMBER_BINARY), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.NUMBER_OCTAL), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.NUMBER_HEX), foreground: '45AB5A' }, + { token: postfixTokenClass(TokenClassConsts.COMMENT), foreground: 'B1B4C5' }, + { token: postfixTokenClass(TokenClassConsts.COMMENT_QUOTE), foreground: 'B1B4C5' }, + { token: postfixTokenClass(TokenClassConsts.DELIMITER), foreground: '7D98B1' }, + { token: postfixTokenClass(TokenClassConsts.OPERATOR), foreground: '7D98B1' }, + { token: postfixTokenClass(TokenClassConsts.OPERATOR_SYMBOL), foreground: '7D98B1' }, + { token: postfixTokenClass(TokenClassConsts.DELIMITER_CURLY), foreground: 'B1BB86' }, + { token: postfixTokenClass(TokenClassConsts.DELIMITER_PAREN), foreground: 'B1BB86' }, + { token: postfixTokenClass(TokenClassConsts.DELIMITER_SQUARE), foreground: 'B1BB86' }, + { token: postfixTokenClass(TokenClassConsts.IDENTIFIER), foreground: '201A1A' }, + { token: postfixTokenClass(TokenClassConsts.IDENTIFIER_QUOTE), foreground: '201A1A' }, + { token: postfixTokenClass(TokenClassConsts.KEYWORD), foreground: '3300FF' }, + { token: postfixTokenClass(TokenClassConsts.OPERATOR_KEYWORD), foreground: '3300FF' }, + { token: postfixTokenClass(TokenClassConsts.KEYWORD_SCOPE), foreground: 'E221DA' }, + { token: postfixTokenClass(TokenClassConsts.PREDEFINED), foreground: 'C3771C' }, + { token: postfixTokenClass(TokenClassConsts.STRING), foreground: 'BC1313' }, + { token: postfixTokenClass(TokenClassConsts.STRING_ESCAPE), foreground: 'BC1313' }, + { token: postfixTokenClass(TokenClassConsts.TYPE), foreground: '256FC6' }, + { token: postfixTokenClass(TokenClassConsts.VARIABLE), foreground: '00AD84' } ], colors: {} };